From f684a95490bda18f13d1f21926f4fa97eb0986b8 Mon Sep 17 00:00:00 2001 From: Karl Bartel Date: Tue, 2 Apr 2019 17:35:11 +0200 Subject: [PATCH] Declare raiden-contracts to be typed via PEP561 When other packages import raiden-contracts, the type signatures will not be used by mypy unless the package declares itself as properly types. This can be done via PEP561: https://mypy.readthedocs.io/en/latest/installed_packages.html#using-pep-561-compatible-packages-with-mypy Adding this will improve type checking quality in raiden-services (and potential other packages) whenever imports from raiden-contracts are used. --- raiden_contracts/py.typed | 0 setup.py | 1 + 2 files changed, 1 insertion(+) create mode 100644 raiden_contracts/py.typed diff --git a/raiden_contracts/py.typed b/raiden_contracts/py.typed new file mode 100644 index 000000000..e69de29bb diff --git a/setup.py b/setup.py index 66b941ccb..0915af7f2 100644 --- a/setup.py +++ b/setup.py @@ -112,6 +112,7 @@ def run(self): 'build_py': BuildPyCommand, }, 'zip_safe': False, + 'package_data': {"raiden_contracts": ["py.typed"]}, } setup(**config)