-
Notifications
You must be signed in to change notification settings - Fork 330
Format with black #186
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
Format with black #186
Conversation
Two questions @tomato42:
|
# E302: expected 2 blank lines, found 1 | ||
# E305: expected 2 blank lines after class or function definition, found 1 | ||
# E203: whitespace before ':' (this needs to be ignored for black compatibility) | ||
# E501: line too long |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't we be able to remove this one too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Theres a bunch of lines like
_b = 0x051953EB9618E1C9A1F929A21A0B68540EEA2DA725B99B315F3B8B489918EF109E156193951EC7E937B1652C0BD3BB1BF073573DF883D2C34F1EF451FD46B503F00
which is something black will not fix. These need to be manually sliced or we have to add # noqa: E501
comments on these lines (personally would prefer the latter). This could also be a separate MR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
those can be translated to int("0x0519...", 16)
this is the approach we are already using for a lot of constants like this
I guess we can do it as a separate PR...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
moved to #187
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why the length limit is excluded in pylint?
Do you perhaps mean flake8? Seems to me that this project is not using pylint. That check is ignored due to lines like the one mentioned here #186 (comment) Autoformatter wont be able to fix these. |
ok, let's move E501 to a separate issue |
black --line-length 79 .
to auto-format every python fileThis automatically fixes flake8 errors of types E111,E114,E226,E231,E266,E302,E305,E502,W391.
Possible closes #171