-
-
Notifications
You must be signed in to change notification settings - Fork 682
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
Make Flake8 line limit consistent with Black and shorten lines to comply #2993
base: main
Are you sure you want to change the base?
Conversation
This makes it consistent with the limit set in Black.
341380c
to
6c58568
Compare
341380c
to
ab46261
Compare
core/src/toga/app.py
Outdated
@@ -106,7 +106,7 @@ def __iter__(self) -> Iterator[Widget]: | |||
return self.values() | |||
|
|||
def __repr__(self) -> str: | |||
return f"{{{', '.join(f'{k!r}: {v!r}' for k, v in sorted(self._registry.items()))}}}" | |||
return f"{{{', '.join(f'{k!r}: {v!r}' for k, v in sorted(self._registry.items()))}}}" # noqa: E501 |
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.
This line can be split as shown in 7654820.
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.
Changed
gtk/src/toga_gtk/container.py
Outdated
# print(self._content, f"Container layout " | ||
# "{allocation.width}x{allocation.height} @ {allocation.x}x{allocation.y}") | ||
# # noqa: E501 |
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.
Even though it's commented out, this line can still be split like any other string.
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.
ah, the noqa pragma was existing, and of course should have been removed.
Flake8 line limit is inconsistent with Black, this PR updates the config to be consistent, and shortens lines to comply with the new limit, as required.
Some lines with very long method names were skipped, ironically by making them even longer and adding a noqa comment
Fixes #2975
PR Checklist: