Sourcery refactored master branch#1
Conversation
| 'Authorization': 'Basic ' + base64str(segment_write_key + ':'), | ||
| 'Authorization': 'Basic ' + base64str(f'{segment_write_key}:'), | ||
| 'Content-Type': 'application/json', | ||
| 'User-Agent': 'edx-devstack-send-metrics', | ||
| } | ||
|
|
There was a problem hiding this comment.
Function send_metrics_to_segment refactored with the following changes:
- Use f-string instead of string concatenation (
use-fstring-for-concatenation)
| with open(config_path, 'r') as f: | ||
| # For debugging... | ||
| print("Metrics config file in effect was: " + f.read()) | ||
| print(f"Metrics config file in effect was: {f.read()}") |
There was a problem hiding this comment.
Function environment_as refactored with the following changes:
- Use f-string instead of string concatenation (
use-fstring-for-concatenation)
| # really just serves as documentation of behavior. | ||
| p.close() | ||
| assert p.exitstatus == None | ||
| assert p.exitstatus is None |
There was a problem hiding this comment.
Function test_handle_ctrl_c refactored with the following changes:
- Use x is None rather than x == None (
none-compare)
Sourcery Code Quality Report❌ Merging this PR will decrease code quality in the affected files by 0.01%.
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!