chapinb / chickadee

Yet another IP address enrichment tool
https://chapinb.com/chickadee/
MIT License
8 stars 1 forks source link

Issue 67 #68

Closed chapinb closed 4 years ago

chapinb commented 4 years ago

Addressing formatting, code inspection, and method complexity concerns.

sourcery-ai[bot] commented 4 years ago

Sourcery Code Quality Report

This PR has an average code quality of 81.45%

Quality metrics Before After Change
Complexity 1.92 ⭐
Method Length 57.50 ⭐
Working memory 7.37 🙂
Quality % 81.45% %
Other metrics Before After Change
Lines 2701
Changed files Quality Before Quality After Quality Change
libchickadee/chickadee.py % 69.18% 🙂 %
libchickadee/parsers/init.py % 79.70% ⭐ %
libchickadee/parsers/evtx.py % 93.64% ⭐ %
libchickadee/parsers/plain_text.py % 85.36% ⭐ %
libchickadee/parsers/xlsx.py % 88.47% ⭐ %
libchickadee/resolvers/init.py % 84.79% ⭐ %
libchickadee/resolvers/ipapi.py % 70.42% 🙂 %
libchickadee/resolvers/virustotal.py % 76.90% ⭐ %
libchickadee/test/init.py % 100.00% ⭐ %
libchickadee/test/test_chickadee.py % 80.38% ⭐ %
libchickadee/test/test_parser_base.py % 85.68% ⭐ %
libchickadee/test/test_resolver_ipapi.py % 86.91% ⭐ %
libchickadee/test/test_resolver_virustotal.py % 85.65% ⭐ %
libchickadee/test/test_updates.py % 99.14% ⭐ %

Here are some functions in these files that still need a tune-up:

File Function Complexity Length Working Memory Quality Recommendation
libchickadee/chickadee.py join_config_args 10 🙂 138 😞 34 ⛔ 38.59% 😞 Try splitting into smaller methods. Extract out complex expressions
libchickadee/test/test_chickadee.py ChickadeeFileTestCase.setUp 0 237 ⛔ 29 ⛔ 40.60% 😞 Try splitting into smaller methods. Extract out complex expressions
libchickadee/resolvers/ipapi.py Resolver.batch 11 🙂 174 😞 13 😞 44.75% 😞 Try splitting into smaller methods. Extract out complex expressions
libchickadee/test/test_chickadee.py ChickadeeFileTestCase.test_ipapi_resolve_query_folder 0 152 😞 30 ⛔ 47.19% 😞 Try splitting into smaller methods. Extract out complex expressions
libchickadee/test/test_chickadee.py ChickadeeConfigTestCase.test_argparse 0 150 😞 26 ⛔ 48.16% 😞 Try splitting into smaller methods. Extract out complex expressions

Legend and Explanation

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.