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
cephfs-shell: Fix flake8 errors (E302, E502, E128, F821, W605, 5128, E122) #34254
Conversation
This patch fixes the following flake8 error: E302 expected 2 blank lines, found 1 Fixes: https://tracker.ceph.com/issues/44645 Signed-off-by: Dandamudi Rohit <rohitdandamudi.1100@gmail.com>
This patch fixes the following flake8 error: E502 the backslash is redundant between brackets Fixes: https://tracker.ceph.com/issues/44645 Signed-off-by: Dandamudi Rohit <rohitdandamudi.1100@gmail.com>
This patch fixes the following flake8 error: E302 expected 2 blank lines, found 1 Fixes: https://tracker.ceph.com/issues/44645 Signed-off-by: Dandamudi Rohit <rohitdandamudi.1100@gmail.com>
This patch fixes the following flake8 error: E128 continuation line under-indented for visual indent Fixes: https://tracker.ceph.com/issues/44645 Signed-off-by: Dandamudi Rohit <rohitdandamudi.1100@gmail.com>
This patch fixes the following flake8 error: F821 undefined name 'e' Fixes: https://tracker.ceph.com/issues/44645 Signed-off-by: Dandamudi Rohit <rohitdandamudi.1100@gmail.com>
This patch fixes the following flake8 error: W605 invalid escape sequence '\A' Fixes: https://tracker.ceph.com/issues/44645 Signed-off-by: Dandamudi Rohit <rohitdandamudi.1100@gmail.com>
This patch fixes the following flake8 error: E128 continuation line under-indented for visual indent Fixes: https://tracker.ceph.com/issues/44645 Signed-off-by: Dandamudi Rohit <rohitdandamudi.1100@gmail.com>
This patch fixes the following flake8 error: E122 continuation line missing indentation or outdented Fixes: https://tracker.ceph.com/issues/44645 Signed-off-by: Dandamudi Rohit <rohitdandamudi.1100@gmail.com>
Hello @varshar16 Can you please have a look at it. Also the W605 didn't appear when I ran flake8 command, but corrected it anyway. Thanks |
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 following changes are required:
- In commit cf2cb51, add a blank line before
Fixes
. - Use imperative mood in commits.
- Merge commits fixing same error type.
Check the log for examples.
Refer this doc: https://github.com/ceph/ceph/blob/master/SubmittingPatches.rst#commit-title
@@ -136,6 +136,7 @@ def ls(path, opts=''): | |||
perror(e) | |||
shell.exit_code = e.get_error_code() | |||
|
|||
|
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.
Move this change to a different commit.
@@ -1357,7 +1357,6 @@ class CephFSShell(Cmd): | |||
else: | |||
self.perror("snapshot can only be created or deleted; check - " | |||
"help snap") | |||
self.exit_code = e.get_error_code() |
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 change is wrong. Exit code is required and it should return 1
here .
Please fix these errors too:
|
cephfs-shell: Fix flake8 errors (E302, E502, E128, F821, W605, 5128, E122)
Fixes: https://tracker.ceph.com/issues/44645
Signed-off-by: Dandamudi Rohit rohitdandamudi.1100@gmail.com
Checklist
Show available Jenkins commands
jenkins retest this please
jenkins test crimson perf
jenkins test signed
jenkins test make check
jenkins test make check arm64
jenkins test submodules
jenkins test dashboard
jenkins test dashboard backend
jenkins test docs
jenkins render docs
jenkins test ceph-volume all
jenkins test ceph-volume tox