Closed sourcery-ai[bot] closed 2 years ago
β Merging this PR will increase code quality in the affected files by 1.38%.
Quality metrics | Before | After | Change |
---|---|---|---|
Complexity | 7.23 β | 6.48 β | -0.75 π |
Method Length | 76.21 π | 74.84 π | -1.37 π |
Working memory | 11.00 π | 10.83 π | -0.17 π |
Quality | 58.58% π | 59.96% π | 1.38% π |
Other metrics | Before | After | Change |
---|---|---|---|
Lines | 373 | 364 | -9 |
Changed files | Quality Before | Quality After | Quality Change |
---|---|---|---|
scrappers/spiders/yahoo_finance.py | 62.27% π | 65.05% π | 2.78% π |
scrappers/spiders/yahoo_tickers_news.py | 56.70% π | 57.56% π | 0.86% π |
Here are some functions in these files that still need a tune-up:
File | Function | Complexity | Length | Working Memory | Quality | Recommendation |
---|---|---|---|---|---|---|
scrappers/spiders/yahoo_tickers_news.py | YahooStockSpider.parse | 25 π | 200 π | 16 β | 28.24% π | Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions |
scrappers/spiders/yahoo_finance.py | ScraperForYahoo.handle_article | 4 β | 214 β | 14 π | 46.81% π | Try splitting into smaller methods. Extract out complex expressions |
scrappers/spiders/yahoo_tickers_news.py | YahooStockSpider.handle_article | 4 β | 206 β | 14 π | 47.37% π | Try splitting into smaller methods. Extract out complex expressions |
scrappers/spiders/yahoo_tickers_news.py | YahooStockSpider.parse_news_item | 2 β | 142.99 π | 12 π | 58.05% π | Try splitting into smaller methods. Extract out complex expressions |
scrappers/spiders/yahoo_tickers_news.py | YahooStockSpider.spider_closed | 1 β | 107.97 π | 10 π | 66.93% π | 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!
Help us improve this quality report!
Merging #38 (7a36e5d) into feature/fauna-data-collection (a571183) will decrease coverage by
1.53%
. The diff coverage is0.00%
.
@@ Coverage Diff @@
## feature/fauna-data-collection #38 +/- ##
=================================================================
- Coverage 67.82% 66.28% -1.54%
=================================================================
Files 12 12
Lines 345 353 +8
=================================================================
Hits 234 234
- Misses 111 119 +8
Flag | Coverage Ξ | |
---|---|---|
ga_ci | 66.28% <0.00%> (-1.54%) |
:arrow_down: |
Flags with carried forward coverage won't be shown. Click here to find out more.
Impacted Files | Coverage Ξ | |
---|---|---|
nlp_articles/app/data_collection.py | 0.00% <0.00%> (ΓΈ) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Ξ = absolute <relative> (impact)
,ΓΈ = not affected
,? = missing data
Powered by Codecov. Last update 5b52b69...7a36e5d. Read the comment docs.
Pull Request #36 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
feature/fauna-data-collection
branch, then run:Help us improve this pull request!