diff --git a/changelog.d/221.misc b/changelog.d/221.misc new file mode 100644 index 00000000..9e80fc78 --- /dev/null +++ b/changelog.d/221.misc @@ -0,0 +1 @@ +Document on improving static type checking using mypy. Contributed by Omar Mohamed. \ No newline at end of file diff --git a/setup.py b/setup.py index 551eefe5..f593e36b 100755 --- a/setup.py +++ b/setup.py @@ -16,7 +16,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -import os +import os.path +from os import PathLike +from typing import Union from setuptools import find_packages, setup @@ -25,7 +27,7 @@ # Used for the long_description. It's nice, because now 1) we have a top level # README file and 2) it's easier to type in the README file than to put a raw # string in below ... -def read(fname): +def read(fname: Union[str, "PathLike[str]"]) -> str: return open(os.path.join(os.path.dirname(__file__), fname)).read()