Open MarcoGorelli opened 3 years ago
@MarcoGorelli is it supported?
Hi - I'd expect it to work out-of-the-box
If not, please do let me know
@MarcoGorelli
So I tested it and it works, but not in a way which I need it to work. I was unable so far to find any workaround.
The issue is that nbqa assumes that all files may be evaluated independently, which is not true for type checkers, especially not for pyright.
In this case I want pyright to evaluate notebooks in context of all other files in repository. When I specify .
path to nbqa, then it feeds pyright only with python files generated from notebooks. I expected that it will also include my other python files, but this is not the case.
What I'm missing in this tool is the ability to convert notebook to python files and keep them. I see that currently this feature can't be used independently and also those generated python files are instantly removed.
If I could generate those python files and keep them, then I could easily run pyright on them in the next step.
If I could generate those python files and keep them, then I could easily run pyright on them in the next step.
seems like a reasonable request - reopening then, thanks for the ping!
Hello, I would like to understand if this limitation also applies to mypy
, which also needs the context of the whole codebase to correctly analyze the notebooks?
What needs doing:
.pre-commit-hooks.yaml
docs/examples.rst
requirements-dev.txt
tests/tools
(seetests/tools/test_yapf.py
for an example)