Closed sourcery-ai[bot] closed 2 years ago
✅ Merging this PR will increase code quality in the affected files by 0.29%.
Quality metrics | Before | After | Change |
---|---|---|---|
Complexity | 3.41 ⭐ | 3.18 ⭐ | -0.23 👍 |
Method Length | 46.66 ⭐ | 46.50 ⭐ | -0.16 👍 |
Working memory | 7.21 🙂 | 7.17 🙂 | -0.04 👍 |
Quality | 76.62% ⭐ | 76.91% ⭐ | 0.29% 👍 |
Other metrics | Before | After | Change |
---|---|---|---|
Lines | 604 | 593 | -11 |
Changed files | Quality Before | Quality After | Quality Change |
---|---|---|---|
agents/agent.py | 86.72% ⭐ | 87.07% ⭐ | 0.35% 👍 |
agents/exploration_bonus.py | 80.72% ⭐ | 80.91% ⭐ | 0.19% 👍 |
agents/training.py | 71.66% 🙂 | 71.58% 🙂 | -0.08% 👎 |
atari/atari.py | 78.28% ⭐ | 78.28% ⭐ | 0.00% |
networks/inputs.py | 70.24% 🙂 | 71.02% 🙂 | 0.78% 👍 |
util/util.py | 80.39% ⭐ | 80.39% ⭐ | 0.00% |
Here are some functions in these files that still need a tune-up:
File | Function | Complexity | Length | Working Memory | Quality | Recommendation |
---|---|---|---|---|---|---|
networks/inputs.py | Inputs.__init__ | 0 ⭐ | 189 😞 | 15 😞 | 51.40% 🙂 | Try splitting into smaller methods. Extract out complex expressions |
agents/training.py | Trainer.train_agent | 11 🙂 | 126 😞 | 11 😞 | 53.13% 🙂 | Try splitting into smaller methods. Extract out complex expressions |
util/util.py | run_directory | 10 🙂 | 125 😞 | 8 🙂 | 60.32% 🙂 | Try splitting into smaller methods |
atari/atari.py | Atari.reset | 6 ⭐ | 116 🙂 | 10 😞 | 60.95% 🙂 | Extract out complex expressions |
networks/inputs.py | auto_placeholder | 4 ⭐ | 135 😞 | 9 🙂 | 62.66% 🙂 | Try splitting into smaller methods |
The 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
main
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
main
branch, then run:Help us improve this pull request!