11import io
22import os
33from setuptools import find_packages , setup
4+ from typing import Dict , List
45
56HERE = os .path .abspath (os .path .dirname (__file__ ))
67
78
8- def load_readme ():
9+ def load_readme () -> str :
910 with io .open (os .path .join (HERE , "README.rst" ), "rt" , encoding = "utf8" ) as f :
1011 readme = f .read ()
1112 # Replace img src for publication on pypi
@@ -14,23 +15,22 @@ def load_readme():
1415 )
1516
1617
17- def load_about ():
18- about = {}
18+ def load_about () -> Dict [ str , str ] :
19+ about : Dict [ str , str ] = {}
1920 with io .open (
2021 os .path .join (HERE , "tutor" , "__about__.py" ), "rt" , encoding = "utf-8"
2122 ) as f :
2223 exec (f .read (), about ) # pylint: disable=exec-used
2324 return about
2425
2526
26- def load_requirements (filename : str ):
27+ def load_requirements (filename : str ) -> List [ str ] :
2728 with io .open (
2829 os .path .join (HERE , "requirements" , filename ), "rt" , encoding = "utf-8"
2930 ) as f :
3031 return [line .strip () for line in f if is_requirement (line )]
3132
32-
33- def is_requirement (line ):
33+ def is_requirement (line : str ) -> bool :
3434 return not (line .strip () == "" or line .startswith ("#" ))
3535
3636
@@ -72,4 +72,5 @@ def is_requirement(line):
7272 "Programming Language :: Python :: 3.9" ,
7373 "Programming Language :: Python :: 3.10" ,
7474 ],
75+ test_suite = "tests" ,
7576)
0 commit comments