Explicitly open files as 'r' instead of leaving it out

This commit is contained in:
Lonami Exo
2018-06-29 11:34:57 +02:00
parent d64eb7ea2b
commit dd0eb7a90e
6 changed files with 12 additions and 11 deletions

View File

@@ -68,7 +68,7 @@ author = 'Lonami'
# built documents.
#
# The short X.Y version.
with open(os.path.join(root, 'telethon', 'version.py')) as f:
with open(os.path.join(root, 'telethon', 'version.py'), 'r') as f:
version = re.search(r"^__version__\s+=\s+'(.*)'$",
f.read(), flags=re.MULTILINE).group(1)