Closed purva-thakre closed 11 months ago
Can you post the output of these commands:
mypy --version
pip list
python --version
@natestemen Looks like my version of mypy
is not what's in devrequirements.txt
.
Will upgrade to a newer version and check if I get the same errors.
I did not know check-types
, check-style
and check-format
are run for Python 3.11 only.
https://github.com/unitaryfund/mitiq/blob/master/.github/workflows/build.yml#L26
My local environment was using Python 3.8.10 which still led to one error after installing the requirements as specified in devrequirements.txt
.
mypy mitiq --show-error-codes
mitiq/observable/observable.py:185: error: "defaultdict" is not subscriptable, use "typing.DefaultDict" instead [misc]
I propose we close this issue but add details about the checks being restricted to Python 3.11 in #2029 or we could instead change the Contributing
guidelines to have a Python 3.11 environment.
We will be dropping support for python 3.8 soon, and I believe these errors do not occur with python 3.9.
Closing this issue as the errors are due to an older Python environment.
Issue Description
If type checks are done locally, the following errors are raised.
How to Reproduce