Open
Description
Describe the bug
When using Pants with docformatter, there's a conflict between the --check
and --in-place
options. Even though only --check
is specified in the configuration, the error message suggests that --in-place
is being added somewhere in the process. This prevents docformatter from running correctly through Pants.
Specifically, when running:
pants --docformatter-args="--check --diff" lint test.py
The following error is encountered:
ProcessExecutionFailure: Process 'Run Docformatter on 1 file.' failed with exit code 2.
stderr:
docformatter: error: argument -c/--check: not allowed with argument -i/--in-place
Pants version
2.2.1
OS
MacOS
Additional info
- Configuration in
pants.toml
:
[GLOBAL]
pants_version = "2.21.1"
backend_packages.add = [
"pants.backend.python.lint.docformatter",
# ... other backends ...
]
[docformatter]
args = ["--check", "--diff"]
- Running docformatter directly on the file works as expected.
- Attempts to resolve:
Explicitly added--no-in-place
to the args in pants.toml.
Updated Pants to the latest version (2.21.1).
Checked for conflicting configurations in other files. - Questions:
Why is the--in-place
option being added when not specified?
How can this conflict be resolved by running docformatter with--check
through Pants?
Is there a known issue with docformatter integration in Pants 2.21.1?
Activity