hey team, I would like to skip running a linter/ty...
# general
f
hey team, I would like to skip running a linter/type checker/formatter on all projects by default without modifying existing
python_library
declarations to be, e.g.
python_library(skip_mypy=True)
or replacing them with a macro (not feasible with the combinations of linter/formatter/type checker true/false). I wasn’t able to find a way to do this, I am afraid.
The idea is that authors of each project within the monorepo could change the declaration to be
python_library(some_flag_to_run_mypy=True)
to actually enable it. Or is my only option to achieve this is to replace all
python_library
declarations with
python_library(skip_foo=True, skip_bar=True, skip_baz=True)
and then remove those
skip_X
pieces as the project is ready to start linting/formatting/type checking? I cannot specify in the
pants.toml
:
Copy code
[mypy]
skip = true
because this will disable it across the whole repo.
h
Yeah, currently the only options are introduce a new symbol like
custom_python_library
(e.g. via a macro), or disable the tool entirely Relates to https://pantsbuild.slack.com/archives/C046T6T9U/p1636564914098300
f
oh sorry, wrong keyword search in Slack with “incremental” 😄 that’s perfect
h
Oh nothing to apologize for! more evidence that improving this is something people care about
🙌 1
👍 1