Closed sourcery-ai[bot] closed 2 years ago
Hello @sourcery-ai[bot]! Thanks for opening this PR. We checked the lines you've touched for PEP 8 issues, and found:
drop_rate_estimates.py
:Line 184:80: E501 line too long (116 > 79 characters)
market_arbitrage_with_foil_cards.py
:Line 160:80: E501 line too long (81 > 79 characters) Line 161:80: E501 line too long (84 > 79 characters) Line 162:80: E501 line too long (85 > 79 characters) Line 581:80: E501 line too long (80 > 79 characters)
✅ Merging this PR will increase code quality in the affected files by 0.26%.
Quality metrics | Before | After | Change |
---|---|---|---|
Complexity | 2.70 ⭐ | 2.68 ⭐ | -0.02 👍 |
Method Length | 53.28 ⭐ | 51.80 ⭐ | -1.48 👍 |
Working memory | 6.49 🙂 | 6.33 🙂 | -0.16 👍 |
Quality | 83.13% ⭐ | 83.39% ⭐ | 0.26% 👍 |
Other metrics | Before | After | Change |
---|---|---|---|
Lines | 5091 | 4959 | -132 |
Changed files | Quality Before | Quality After | Quality Change |
---|---|---|---|
batch_create_packs.py | 82.73% ⭐ | 83.21% ⭐ | 0.48% 👍 |
creation_time_utils.py | 88.74% ⭐ | 89.27% ⭐ | 0.53% 👍 |
download_steam_card_exchange.py | 89.83% ⭐ | 90.39% ⭐ | 0.56% 👍 |
drop_rate_estimates.py | 84.48% ⭐ | 85.04% ⭐ | 0.56% 👍 |
free_games_with_trading_cards.py | 84.25% ⭐ | 84.47% ⭐ | 0.22% 👍 |
inventory_utils.py | 81.69% ⭐ | 81.91% ⭐ | 0.22% 👍 |
list_possible_lures.py | 80.80% ⭐ | 81.23% ⭐ | 0.43% 👍 |
market_arbitrage.py | 74.05% 🙂 | 74.47% 🙂 | 0.42% 👍 |
market_arbitrage_with_foil_cards.py | 79.06% ⭐ | 79.41% ⭐ | 0.35% 👍 |
market_buzz_detector.py | 72.19% 🙂 | 72.54% 🙂 | 0.35% 👍 |
market_gamble_detector.py | 79.18% ⭐ | 79.26% ⭐ | 0.08% 👍 |
market_listing.py | 75.85% ⭐ | 76.18% ⭐ | 0.33% 👍 |
market_order.py | 78.22% ⭐ | 77.31% ⭐ | -0.91% 👎 |
market_search.py | 84.12% ⭐ | 83.57% ⭐ | -0.55% 👎 |
market_utils.py | 79.07% ⭐ | 79.52% ⭐ | 0.45% 👍 |
parsing_utils.py | 77.52% ⭐ | 77.53% ⭐ | 0.01% 👍 |
personal_info.py | 88.94% ⭐ | 88.95% ⭐ | 0.01% 👍 |
sack_of_gems.py | 89.26% ⭐ | 89.30% ⭐ | 0.04% 👍 |
transaction_fee.py | 89.06% ⭐ | 89.06% ⭐ | 0.00% |
utils.py | 96.10% ⭐ | 96.78% ⭐ | 0.68% 👍 |
Here are some functions in these files that still need a tune-up:
File | Function | Complexity | Length | Working Memory | Quality | Recommendation |
---|---|---|---|---|---|---|
market_search.py | get_all_listings | 32 😞 | 286 ⛔ | 16 ⛔ | 19.90% ⛔ | Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions |
market_listing.py | parse_item_type_no_from_script | 26 😞 | 264 ⛔ | 17 ⛔ | 22.86% ⛔ | Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions |
drop_rate_estimates.py | get_drop_rate_estimates_based_on_item_rarity_pattern | 5 ⭐ | 414 ⛔ | 37 ⛔ | 29.81% 😞 | Try splitting into smaller methods. Extract out complex expressions |
inventory_utils.py | retrieve_asset_id | 22 😞 | 254 ⛔ | 12 😞 | 32.17% 😞 | Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions |
market_arbitrage_with_foil_cards.py | determine_whether_an_arbitrage_might_exist_for_foil_cards | 24 😞 | 198 😞 | 13 😞 | 32.79% 😞 | Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions |
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!
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: