-
-
Notifications
You must be signed in to change notification settings - Fork 636
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conflict between docformatter --check and --in-place options when using Pants #21306
Comments
Hey there! It looks like Some work may be needed to allow running docformatter in both check and format modes through Pants. If you'd like to contribute it, that'd be most welcome! You can find a similar PR for Ruff here. |
Presumably we add Yeah, running as a checker would require a little work, but probably not much, if you'd like to take it on! |
hi @benjyw , @krishnan-chandra! Is there any happy path (except docs) to run pants locally on the MacOS (M-chip)? |
It should just work and indeed works fine on my M1 by cloning the repo and running It will be difficult to provide further help without a lot more detail on what you're doing and the exact errors you're seeing... |
I understand. So I just follow the pants local development guide (installed python3.9, nix-shell, rustup, updated openssl, etc., so it's not just to clone repo and run pants), then under nix-shell running pants, and after some time of compiling it throws different errors: 1. the first error
2. I tried to change lib.rs to fix it, then this error appeared:
I tried to run pants both from my terminal and from nix-shell
so for me, this doesn't seem to be straightforward...sorry if I missed something. thanks! |
Ah, it wasn't clear to me that you are trying to build Pants itself, rather than using a released version. |
You shouldn't need |
But I guess you've run this in terminal and it still fails. That rust compilation error is very suspicious. The Pants rust code should definitely compile without error... |
|
This comment seems relevant: pants/src/rust/engine/Cargo.toml Line 8 in 20abefb
|
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:
Pants version
2.2.1
OS
MacOS
Additional info
pants.toml
: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.
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?
The text was updated successfully, but these errors were encountered: