Fix the annotations for `setup.py`

I have been converting type commentaries into annotations. For now, I'll fix some annotations from `setup.py`.
This commit is contained in:
Diego Ramirez 2021-06-23 12:20:20 -05:00 committed by GitHub
parent 4704da4dad
commit 189f63ac12
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 4 deletions

View File

@ -4,8 +4,7 @@ import sys
from setuptools import find_packages, setup
def read(rel_path):
# type: (str) -> str
def read(rel_path: str) -> str:
here = os.path.abspath(os.path.dirname(__file__))
# intentionally *not* adding an encoding option to open, See:
# https://github.com/pypa/virtualenv/issues/201#issuecomment-3145690
@ -13,8 +12,7 @@ def read(rel_path):
return fp.read()
def get_version(rel_path):
# type: (str) -> str
def get_version(rel_path: str) -> str:
for line in read(rel_path).splitlines():
if line.startswith("__version__"):
# __version__ = "0.9"