Closed l0b0 closed 1 year ago
Hmm, looks like mypy -c 'import numpy'
doesn't see numpy either. Please hold…
Hmm, looks like mypy -c 'import numpy' doesn't see numpy either. Please hold…
exactly :) nbqa just runs the tool, if it wouldn't work on a python file it won't work on a jupyter notebook
closing then, but thanks for the report
In case anyone runs into the same issue with Nix, I was able to fix it in https://github.com/linz/emergency-management-tools/pull/97/files by making sure mypy is part of the first derivation which includes Python.
I'm trying to get the following configuration to work in a repo:
When running
pre-commit run --all-files
, both of these tools complain about not being able to see the dependencies installed in the current environment. For example, frommypy
:And from
pylint
:But both
python <<< 'import geopandas'
andpython <<< 'import numpy'
know about the modules.