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
Run black over the codebase #1760
Conversation
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.
I didnt review all of the changes black made but I trust it enough by now. LGTM. Please feel free to ignore my comments, they can be addressed separately/later.
@@ -1021,7 +1000,7 @@ def get_children(self): | |||
tooltip="Go to next file", | |||
action="do_parent", | |||
enabled_when="(selected_node is not None) and " |
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.
enabled_when="(selected_node is not None) and " | |
enabled_when=( | |
"(selected_node is not None) " | |
"and (object.selected_node.parent is not None)" | |
), |
@@ -1021,7 +1000,7 @@ def get_children(self): | |||
tooltip="Go to next file", | |||
action="do_parent", | |||
enabled_when="(selected_node is not None) and " | |||
"(object.selected_node.parent is not None)", | |||
"(object.selected_node.parent is not None)", |
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.
"(object.selected_node.parent is not None)", |
@@ -36,7 +36,7 @@ def get_html_tag(tag): | |||
|
|||
|
|||
def get_action_enabled(action, model_view): | |||
""" Helper funciton to return if a tool is enabled. | |||
"""Helper funciton to return if a tool is enabled. |
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.
"""Helper funciton to return if a tool is enabled. | |
"""Helper function to return if a tool is enabled. |
with mock_iter_entry_points( | ||
{} | ||
), mock_demo_launch(), mocked_io, mock.patch( | ||
"sys.stdout", mocked_io | ||
), mock.patch( | ||
"sys.stderr", mocked_io | ||
), mock.patch( | ||
"sys.argv", argv | ||
): |
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.
sigh. these look awkward. but we can't use (...)
in with
statements in Python 3.6 IIUC. Not much we can do if we can to keep the codebase black-happy.
commands = ["edm environments create {environment} --platform=rh6-x86_64 --force --version={runtime}"] # noqa: E501 | ||
commands = [ | ||
"edm environments create {environment} --platform=rh6-x86_64 --force --version={runtime}" | ||
] # 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.
] # noqa: E501 | |
] |
]) | ||
commands = [ | ||
"edm environments create {environment} --force --version={runtime}" | ||
] # 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.
] # noqa: E501 | |
] |
Thanks, I deliberately avoided manual fix-ups in this PR, but the things you noticed are definitely useful for another PR which does things like sort out the |
Updates the setup.cfg for the things that now pass. Adds a pyproject.toml so that future runs of black have the same settings.
There is manual clean-up that is needed at this point: there are lines that were protected by
# noqa
forE501
(line length) which no-longer make sense. Those should be fixed in a separate PR which cleans up theE501
status.Checklist