Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Run everything through 'black'#1442

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Byron merged 10 commits intomainfromblack-fmt
May 18, 2022
Merged

Run everything through 'black'#1442

Byron merged 10 commits intomainfromblack-fmt
May 18, 2022

Conversation

Byron
Copy link
Member

That way people who use it won't be deterred, while it unifies style
everywhere.

That way people who use it won't be deterred, while it unifies styleeverywhere.
`flake8` seems to dislike the formatting of black.
@ByronByronforce-pushed theblack-fmt branch 2 times, most recently from2574989 tof501fcbCompareMay 18, 2022 00:12
@ByronByron merged commit38e9a18 intomainMay 18, 2022
EliahKagan added a commit to EliahKagan/GitPython that referenced this pull requestMar 10, 2024
The superclass _traverse method call in Tree.traverse appears tohave once had a working suppression for the incompatbile types oftwo arguments, `predicate` and `prune`, as well as for an argumentthat required (and requires) no suppression, `depth`. These threearguments were written on the same line, which bad a `type: ignore`comment on it. But when black formatting was applied in21ec529(gitpython-developers#1442), that comment moved so that it was on a line with just the`depth` call that didn't need it, rather than the others that did.Since then, mypy has reported errors, which further seem intendedto suppress based on the surrounding context and the use of `cast`to deal with the static type incompatibilities going the other way.This misplaced suppression was one of the ones I very recentlyremoved in84fc806. But really there should be a suppression forthose arguments (at least for now, while the code remains writtenthat way, given that a suppression is intended).This suppresses the error effectively by inserting two suppressioncomments, one for each of the two arguments. This is more specificthan a single suppression applying to the whole call, and keepingthe arguments on separate lines both makes black happy and makesclear that it is not by coincidence that the error is suppressedfor both of them. The new suppressions are also written for thespecific mypy error at issue, rather than fully general as before.This change decreases the number of mypy errors by two.
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

1 participant
@Byron

[8]ページ先頭

©2009-2025 Movatter.jp