https://pantsbuild.org/ logo
#general
Title
# general
a

adorable-engine-71736

01/31/2023, 6:33 PM
im trying to exclude some files/directories/anything from
docformatter
- does anyone have any ideas how this could be acheived?
i have tried adding the
-e
arg to my
pants.toml
but after reading the source code (for docformatter) the implementation only works with
-r
- the docs are pretty terrible/misleading
im guessing pants is not invoking docformatter that way as no amount of
-e
excludes the files/dirs i want to
nm - i think i have figured it out - i added a
BUILD
with
python_sources
and skipped there
r

refined-addition-53644

01/31/2023, 6:50 PM
I think this should also work if you want to ignore all files in current directory and below
Copy code
__defaults__(all=dict(skip_docformatter=True))
https://www.pantsbuild.org/docs/targets#field-default-values
a

adorable-engine-71736

01/31/2023, 6:52 PM
thanks - seems to be working just adding it to python_sources - i had them added previously as sources of a parent dir - but shifting the build seems to have worked
6 Views