Sourcery refactored master branch#1
Conversation
| return dict((name, runtime) for name, runtime in _runtimes.items() if runtime.is_available()) | ||
| return { | ||
| name: runtime | ||
| for name, runtime in _runtimes.items() | ||
| if runtime.is_available() | ||
| } |
There was a problem hiding this comment.
Function available_runtimes refactored with the following changes:
- Replace list(), dict() or set() with comprehension (
collection-builtin-to-comprehension)
| expr = opts.expr.decode() | ||
| else: | ||
| expr = opts.expr | ||
| expr = opts.expr.decode() if isinstance(opts.expr, bytes) else opts.expr |
There was a problem hiding this comment.
Function main refactored with the following changes:
- Replace if statement with if expression (
assign-if-exp)
| if "__main__" == __name__: | ||
| if __name__ == "__main__": |
There was a problem hiding this comment.
Lines 56-56 refactored with the following changes:
- Ensure constant in comparison is on the right (
flip-comparison)
Sourcery Code Quality Report✅ Merging this PR will increase code quality in the affected files by 0.27%.
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! Help us improve this quality report! |
Branch
masterrefactored 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
masterbranch, then run:Help us improve this pull request!