average-breakfast-91545
07/12/2023, 12:00 PMexp
which is for experimental code. Our ML engineers perform hideous acts in there that upset the linter and typechecker. There's a skip_mypy
field on python source, but I'm gonna guess that's not respected by pyright. Would it be worth having a general skip_check
and skip_lint
field?curved-television-6568
07/12/2023, 12:12 PMskip_pyright
field as well (not sure from which version) that doesn’t seem to be in the docs yet. And you can set them for an entire subtree using __defaults__({(python_source, python_sources): dict(skip_pyright=True)})
https://github.com/pantsbuild/pants/blob/5a3dddfb73c7ff8e4b8940dd5a6cae970c0c408b/[…]src/python/pants/backend/python/typecheck/pyright/skip_field.pyaverage-breakfast-91545
07/12/2023, 12:13 PMcurved-television-6568
07/12/2023, 12:14 PMaverage-breakfast-91545
07/12/2023, 12:14 PMcurved-television-6568
07/12/2023, 12:14 PMpants python_source --help-advanced
will give you up-to-date info for your versionbitter-ability-32190
07/12/2023, 12:36 PMexperimental
directorybetter-van-82973
07/12/2023, 2:44 PMpyrightconfig.json
and handle this at the tool level:
{
"exclude": [
"**/node_modules",
"**/__pycache__",
"experimental",
...
average-breakfast-91545
07/12/2023, 2:46 PM/exp/BUILD
that skips black, ruff, pyright, then I can override that again in /exp/users/bob
because I'm not a savageaverage-breakfast-91545
07/12/2023, 2:46 PMbetter-van-82973
07/12/2023, 2:48 PMaverage-breakfast-91545
07/12/2023, 3:31 PMbuild-test
fork and see how it goes, I'll just open a bunch of PRs and see if they all work