-
Notifications
You must be signed in to change notification settings - Fork 1
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
Sourcery refactored master branch #2
base: master
Are you sure you want to change the base?
Conversation
Linked documents: 0 |
lbl = gui.Label("Hello world!", width=100, height=30) | ||
|
||
# return of the root widget | ||
return lbl | ||
return gui.Label("Hello world!", width=100, height=30) |
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.
Function MyApp.main
refactored with the following changes:
- Inline variable that is immediately returned (
inline-immediately-returned-variable
)
for ri in range(0, table.row_count()): | ||
for ci in range(0, table.column_count()): | ||
for ri in range(table.row_count()): | ||
for ci in range(table.column_count()): |
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.
Function MyApp.fill_table
refactored with the following changes:
- Replace range(0, x) with range(x) (
remove-zero-from-range
)
if not 'editing_mode' in kwargs.keys(): | ||
if 'editing_mode' not in kwargs.keys(): |
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.
Function untitled.__init__
refactored with the following changes:
- Simplify logical expression using De Morgan identities (
de-morgan
)
@@ -43,7 +43,6 @@ def construct_ui(self): | |||
|
|||
def onclick_button(self, emitter): | |||
self.mainContainer.children['label'].set_text('hello world') | |||
pass |
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.
Function untitled.onclick_button
refactored with the following changes:
- Remove redundant pass statement (
remove-redundant-pass
)
if not 'editing_mode' in kwargs.keys(): | ||
if 'editing_mode' not in kwargs.keys(): |
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.
Function untitled.__init__
refactored with the following changes:
- Simplify logical expression using De Morgan identities (
de-morgan
)
model_cfg = { | ||
return { | ||
'output_stride': output_stride, | ||
'checkpoint_name': checkpoint_name, | ||
} | ||
return model_cfg |
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.
Function load_config
refactored with the following changes:
- Inline variable that is immediately returned (
inline-immediately-returned-variable
)
out_img = cv2.drawKeypoints(img, cv_keypoints, outImage=np.array([])) | ||
return out_img | ||
return cv2.drawKeypoints(img, cv_keypoints, outImage=np.array([])) |
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.
Function draw_keypoints
refactored with the following changes:
- Inline variable that is immediately returned (
inline-immediately-returned-variable
)
cfg = yaml.load(cfg_f) | ||
return cfg | ||
return yaml.load(cfg_f) |
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.
Function load_config
refactored with the following changes:
- Inline variable that is immediately returned (
inline-immediately-returned-variable
)
|
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.
Function main
refactored with the following changes:
- Replace assignment with augmented assignment (
aug-assign
) - Replace range(0, x) with range(x) (
remove-zero-from-range
)
self.lbl.set_text(cvs.getLbs()) | ||
pass | ||
self.lbl.set_text(cvs.getLbs()) |
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.
Function MyApp.idle
refactored with the following changes:
- Remove redundant pass statement (
remove-redundant-pass
)
Hello @sourcery-ai[bot]! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:
Comment last updated at 2020-08-09 14:45:33 UTC |
Best reviewed: commit by commit
Optimal code review plan
|
24ee78a
to
9b5af2f
Compare
generate by www.commit-lint.comCommit-Lint commandsYou can trigger Commit-Lint actions by commenting on this PR:
|
Sourcery Code Quality Report (beta)✅ Merging this PR will increase code quality in the affected files by 0.01 out of 10.
Here are some functions in these files that still need a tune-up:
Please see our documentation here for details on how these metrics are calculated. We are actively working on this report - lots more documentation and extra metrics to come! Let us know what you think of it by mentioning @sourcery-ai in a comment. |
Branch
master
refactored by Sourcery.If you're happy with these changes, merge this Pull Request using the Squash and merge strategy.
See our documentation here.
Run Sourcery locally
Reduce the feedback loop during development by using the Sourcery editor plugin:
Review changes via command line
To manually merge these changes, make sure you're on the
master
branch, then run: