-
Notifications
You must be signed in to change notification settings - Fork 544
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
[pylint] pylint and flake8 updates #3597
Conversation
Congratulations! One of the builds has completed. 🍾 You can install the built RPMs by following these steps:
Please note that the RPMs should be used only in a testing environment. |
dd2bd29
to
35e46cc
Compare
pylint for the following rules applied * C0411: wrong-import-order * R0912: too-many-branches * R0914: too-many-locals * R1725: super-with-arguments * E1101: no-member Resolves: sosreport#3597 Signed-off-by: Arif Ali <arif.ali@canonical.com>
35e46cc
to
f591230
Compare
pylint for the following rules applied * C0411: wrong-import-order * R0912: too-many-branches * R0914: too-many-locals * R1725: super-with-arguments * E1101: no-member Resolves: sosreport#3597 Signed-off-by: Arif Ali <arif.ali@canonical.com>
f591230
to
8c68bfd
Compare
pylint for the following rules applied * C0411: wrong-import-order * R0912: too-many-branches * R0914: too-many-locals * R1725: super-with-arguments * E1101: no-member Resolves: sosreport#3597 Signed-off-by: Arif Ali <arif.ali@canonical.com>
8c68bfd
to
ec53ec5
Compare
return False | ||
self.log_info(f'Retrieving sos report from {self.address}') | ||
self.ui_msg('Retrieving sos report...') | ||
if self.need_sudo or self.opts.become_root: |
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.
The reason why this was refactored was, where retrieve_sosreport()
function is being used it already checks for self.sos_path
, so the code under the else seemed redundant
This way, we can then enable it, so that future PRs we'll get errors for f-strings 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.
LGTM
@@ -322,7 +323,7 @@ def _send_pexpect_password(self, index, result): | |||
:type result: ``pexpect.spawn`` | |||
""" | |||
if index == 2: | |||
if not self.opts.sudo_pw and not self.opt.nopasswd_sudo: | |||
if not self.opts.sudo_pw and not self.opts.nopasswd_sudo: |
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.
Nice catch.
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 didn't catch it, pylint
did
self.all_pkgs_by_name_regex("fedora-release-.*")[-1] | ||
self.package_manager.all_pkgs_by_name_regex( | ||
"fedora-release-.*")[-1] |
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.
How this could even work now..? good catch.
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 didn't catch it, pylint
did
pylint for the following rules applied
Please place an 'X' inside each '[]' to confirm you adhere to our Contributor Guidelines