makes icon indicating copy to clipboard operation
makes copied to clipboard

lintPython mypy fails when importing certain dependencies

Open dsalaza4 opened this issue 4 years ago • 2 comments

When I do from dateutil.relativedelta import relativedelta in a python module and then run lintPython on it, I get:

newutils/datetime.py:8: error:(B Library stubs not installed for (B"dateutil.relativedelta"(B (or incompatible with Python 3.9)(B
newutils/datetime.py:8: note:(B Hint: (B"python3 -m pip install types-python-dateutil"(B(B
newutils/datetime.py:8: note:(B (or run (B"mypy --install-types"(B to install all missing stub packages)(B
newutils/datetime.py:8: note:(B See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports(B(B

If I add types-python-dateutil: 2.8.7 to pypi-deps.yaml and rebuild the sources, I still get the same error.

It looks like this is being caused by having a python env for the application environment and another python env for the linter itself. More information can be found here

dsalaza4 avatar Jan 18 '22 15:01 dsalaza4

@dsalaza4 Is this problem still present after the nixpkgs update?

jpverde avatar Mar 18 '22 17:03 jpverde

I don't really recall if I managed to fix this. I think dmurcia could have more insights regarding this error.

dsalaza4 avatar Mar 30 '22 17:03 dsalaza4

It's been solved since 22.09

kamadorueda avatar Sep 21 '22 21:09 kamadorueda