-
Notifications
You must be signed in to change notification settings - Fork 464
Conversation
while done is False: | ||
while not done: |
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 _GDrive._download_file
refactored with the following changes:
- Simplify comparison to boolean (
simplify-boolean-comparison
)
out = (found.group(1), "folder") | ||
return found.group(1), "folder" | ||
elif found: | ||
out = (found.group(1), "file") | ||
return found.group(1), "file" | ||
else: | ||
out = (link, "unknown") | ||
return out | ||
return link, "unknown" |
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 Worker._get_file_id
refactored with the following changes:
- Lift return into if (
lift-return-into-if
)
file_path = dl_loc if dl_loc else self._message.input_str | ||
file_path = dl_loc or self._message.input_str |
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 Worker.upload
refactored with the following changes:
- Remove redundant conditional (
remove-redundant-if
) - Simplify if expression by using or (
or-if-exp-identity
)
elif self._output is not None and self._is_canceled: | ||
elif self._output 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.
Function Worker.download
refactored with the following changes:
- Remove redundant conditional (
remove-redundant-if
)
elif self._output is not None and self._is_canceled: | ||
elif self._output 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.
Function Worker.copy
refactored with the following changes:
- Remove redundant conditional (
remove-redundant-if
)
Sourcery Code Quality Report✅ Merging this PR will increase code quality in the affected files by 0.16%.
Here are some functions in these files that still need a tune-up:
Legend and ExplanationThe emojis denote the absolute quality of the code:
The 👍 and 👎 indicate whether the quality has improved or gotten worse with this pull request. 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. |
Pull Request #77 refactored by Sourcery.
If you're happy with these changes, merge this Pull Request using the Squash and merge strategy.
NOTE: As code is pushed to the original Pull Request, Sourcery will
re-run and update (force-push) this Pull Request with new refactorings as
necessary. If Sourcery finds no refactorings at any point, this Pull Request
will be closed automatically.
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
release
branch, then run: