avendesora / pythonbible-parser

A python library for parsing Bible texts in various formats and convert them into a format for easy and efficient use in python.
MIT License
8 stars 1 forks source link

more flake8 and precommit stuff #12

Closed avendesora closed 2 years ago

sourcery-ai[bot] commented 2 years ago

Sourcery Code Quality Report

✅  Merging this PR will increase code quality in the affected files by 1.19%.

Quality metrics Before After Change
Complexity 3.86 ⭐ 3.43 ⭐ -0.43 👍
Method Length 48.21 ⭐ 47.83 ⭐ -0.38 👍
Working memory 7.31 🙂 7.31 🙂 0.00
Quality 74.18% 🙂 75.37% 1.19% 👍
Other metrics Before After Change
Lines 2052 2096 44
Changed files Quality Before Quality After Quality Change
pythonbible_parser/init.py 100.00% ⭐ 100.00% ⭐ 0.00%
pythonbible_parser/bible.py 84.54% ⭐ 84.51% ⭐ -0.03% 👎
pythonbible_parser/bible_parser.py 86.18% ⭐ 86.18% ⭐ 0.00%
pythonbible_parser/errors.py 100.00% ⭐ 100.00% ⭐ 0.00%
pythonbible_parser/json_converter.py 89.19% ⭐ 88.11% ⭐ -1.08% 👎
pythonbible_parser/osis/constants.py 86.30% ⭐ 85.84% ⭐ -0.46% 👎
pythonbible_parser/osis/old_osis_parser.py 70.59% 🙂 71.23% 🙂 0.64% 👍
pythonbible_parser/osis/osis_book_parser.py 62.75% 🙂 68.76% 🙂 6.01% 👍
pythonbible_parser/osis/osis_parser.py 65.20% 🙂 65.98% 🙂 0.78% 👍
pythonbible_parser/osis/sandbox.py 51.89% 🙂 51.63% 🙂 -0.26% 👎
tests/bible_test.py 92.62% ⭐ 92.78% ⭐ 0.16% 👍
tests/conftest.py 94.59% ⭐ 94.59% ⭐ 0.00%
tests/old_osis_parser_test.py 86.44% ⭐ 86.45% ⭐ 0.01% 👍
tests/osis_parser_test.py 75.91% ⭐ 75.90% ⭐ -0.01% 👎

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

File Function Complexity Length Working Memory Quality Recommendation
pythonbible_parser/osis/osis_book_parser.py OSISBookParser._append_text 28 😞 164 😞 13 😞 33.44% 😞 Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
pythonbible_parser/osis/osis_parser.py OSISParser.parse 3 ⭐ 203 😞 15 😞 47.32% 😞 Try splitting into smaller methods. Extract out complex expressions
pythonbible_parser/osis/old_osis_parser.py _handle_child_element 9 🙂 123 😞 11 😞 55.33% 🙂 Try splitting into smaller methods. Extract out complex expressions
pythonbible_parser/osis/osis_book_parser.py OSISBookParser._handle_verse 10 🙂 168 😞 8 🙂 55.68% 🙂 Try splitting into smaller methods
pythonbible_parser/osis/old_osis_parser.py _handle_verse_tag 11 🙂 100 🙂 11 😞 56.49% 🙂 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!

Help us improve this quality report!