From a236489d3bd93c3f36abb2e11ce6e296c8f73313 Mon Sep 17 00:00:00 2001 From: 6ug Date: Fri, 19 Oct 2018 15:06:46 +0530 Subject: [PATCH] Adding eth-typing dependency and enabling type hiting * Fixes first part of https://github.com/ethereum/py-trie/issues/69 TODO: Add all missing type hints --- setup.py | 2 ++ tox.ini | 4 +++- trie/py.typed | 0 3 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 trie/py.typed diff --git a/setup.py b/setup.py index 3b0082f1..94c8e25d 100644 --- a/setup.py +++ b/setup.py @@ -18,12 +18,14 @@ install_requires=[ "eth-hash>=0.1.0,<1.0.0", "eth-utils>=1.3.0,<2.0.0", + "eth-typing>=2.0.0,<3", "rlp>=0.4.7,<2.0.0", ], license="MIT", zip_safe=False, keywords='ethereum blockchain evm trie merkle', packages=find_packages(exclude=["tests", "tests.*"]), + package_data={'trie': ['py.typed']}, classifiers=[ 'Development Status :: 2 - Pre-Alpha', 'Intended Audience :: Developers', diff --git a/tox.ini b/tox.ini index cbb2deff..464a7736 100644 --- a/tox.ini +++ b/tox.ini @@ -23,4 +23,6 @@ basepython = [testenv:lint] basepython=python deps=flake8 -commands=flake8 {toxinidir}/trie {toxinidir}/tests +commands= + flake8 {toxinidir}/trie {toxinidir}/tests + mypy --follow-imports=silent --warn-unused-ignores --ignore-missing-imports --no-strict-optional --check-untyped-defs --disallow-incomplete-defs --disallow-untyped-defs --disallow-any-generics -p py-trie diff --git a/trie/py.typed b/trie/py.typed new file mode 100644 index 00000000..e69de29b