-
-
Notifications
You must be signed in to change notification settings - Fork 644
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix
./pants lint2
for Black and isort (#8877)
#8823 broke `./pants lint2` for formatters like Black and Isort because `python_lint_target.py` was not passing the argument `prior_formatter_result_digest` to the constructors for `IsortTarget` and `BlackTarget`. However, `prior_formatter_result_digest` is only relevant to `fmt2` and the lint logic should never have to deal with the argument. So, here, we set the field to `Optional` with a default of `None`. `python_fmt_target.py` will ensure that the value is always set when formatting, whereas `python_lint_target.py` will ignore the value as before. This also updates tests to ensure that both code paths are tested.
- Loading branch information
1 parent
38115ba
commit ca9ed54
Showing
5 changed files
with
37 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters