Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix linting issues #27

Merged
merged 10 commits into from
Feb 19, 2025
Merged

fix linting issues #27

merged 10 commits into from
Feb 19, 2025

Conversation

mbdevpl
Copy link
Owner

@mbdevpl mbdevpl commented Feb 19, 2025

No description provided.

@mbdevpl mbdevpl self-assigned this Feb 19, 2025
@jenkins-mbdev
Copy link

jenkins-mbdev bot commented Feb 19, 2025

Tools report for GitHub-mbdevpl/version-query/PR-27 [build #1]:

  • Pylint: refactor messages ℹ️ (click for details)
    ************* Module version_query.git_query
    version_query/git_query.py:76:0: R1260: '_latest_git_version_tag' is too complex. The McCabe rating is 12 (too-complex)
    ************* Module version_query.version
    version_query/version.py:247:4: R1260: '_get_pre_release_from_args' is too complex. The McCabe rating is 11 (too-complex)
    version_query/version.py:78:28: C0209: Formatting a regular string which could be an f-string (consider-using-f-string)
    version_query/version.py:109:15: R1728: Consider using a generator instead 'tuple(_ for _ in match.groups() if _ is not None)' (consider-using-generator)
    version_query/version.py:112:22: C0209: Formatting a regular string which could be an f-string (consider-using-f-string)
    version_query/version.py:114:16: C0209: Formatting a regular string which could be an f-string (consider-using-f-string)
    ************* Module test.test_version
    test/test_version.py:136:12: R0204: Redefinition of version.release type from int to tuple (redefined-variable-type)
    
    -----------------------------------
    Your code has been rated at 9.94/10
    
  • Mypy: problems ⚠️ (click for details)
    version_query/version.py:276: error: Argument 1 to "append" of "list" has incompatible type "tuple[int | str | None, ...]"; expected "tuple[str | None, str | None, int | None]"  [arg-type]
    Found 1 error in 1 file (checked 15 source files)
    
  • Flake518: problems ⚠️ (click for details)
    version_query/version.py:36:101: E501 line too long (115 > 100 characters)
    
  • Pydocstyle: problems ⚠️ (click for details)
    version_query/version.py:20 in public class `VersionComponent`:
            D204: 1 blank line required after class docstring (found 0)
    
  • Coverage: 98% 🆗 (click for details)
    Name                         Stmts   Miss Branch BrPart  Cover   Missing
    ------------------------------------------------------------------------
    setup.py                        11      0      2      0   100%
    test/__init__.py                 5      0      0      0   100%
    test/examples.py                49      1      4      1    96%   24
    test/test_git.py               195      0     18      0   100%
    test/test_packaging.py           3      0      0      0   100%
    test/test_query.py             161      3     10      1    98%   67, 103-104
    test/test_version.py           153      0     32      0   100%
    version_query/__init__.py        5      0      0      0   100%
    version_query/__main__.py        9      0      2      0   100%
    version_query/_version.py        2      0      0      0   100%
    version_query/git_query.py     114      1     46      1    99%   64
    version_query/main.py           21      0      6      0   100%
    version_query/py_query.py       45      7     18      3    84%   14-17, 38, 40, 57
    version_query/query.py          50      0      2      0   100%
    version_query/version.py       443      9    208      8    97%   140, 150, 161, 166, 168, 197, 333, 501, 514
    ------------------------------------------------------------------------
    TOTAL                         1266     21    348     14    98%
    

Copy link

codecov bot commented Feb 19, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.04%. Comparing base (a99ac98) to head (c048770).
Report is 11 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #27      +/-   ##
==========================================
- Coverage   98.18%   98.04%   -0.14%     
==========================================
  Files          15       17       +2     
  Lines        1265     1280      +15     
  Branches      174      174              
==========================================
+ Hits         1242     1255      +13     
- Misses         12       13       +1     
- Partials       11       12       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jenkins-mbdev
Copy link

jenkins-mbdev bot commented Feb 19, 2025

Tools report for GitHub-mbdevpl/version-query/PR-27 [build #2]:

  • Pylint: refactor messages ℹ️ (click for details)
    ************* Module version_query.git_query
    version_query/git_query.py:76:0: R1260: '_latest_git_version_tag' is too complex. The McCabe rating is 12 (too-complex)
    ************* Module version_query.parser
    version_query/parser.py:54:11: R1728: Consider using a generator instead 'tuple(_ for _ in match.groups() if _ is not None)' (consider-using-generator)
    ************* Module version_query.version
    version_query/version.py:173:4: R1260: '_get_pre_release_from_args' is too complex. The McCabe rating is 11 (too-complex)
    ************* Module test.test_version
    test/test_version.py:136:12: R0204: Redefinition of version.release type from int to tuple (redefined-variable-type)
    
    -----------------------------------
    Your code has been rated at 9.97/10
    
  • Mypy: problems ⚠️ (click for details)
    version_query/version.py:202: error: Argument 1 to "append" of "list" has incompatible type "tuple[int | str | None, ...]"; expected "tuple[str | None, str | None, int | None]"  [arg-type]
    Found 1 error in 1 file (checked 17 source files)
    
  • Flake518: problems ⚠️ (click for details)
    version_query/parser.py:36:17: E127 continuation line over-indented for visual indent
    version_query/version.py:39:101: E501 line too long (115 > 100 characters)
    
  • Pydocstyle: ran 🆗

  • Coverage: 98% 🆗 (click for details)
    Name                         Stmts   Miss Branch BrPart  Cover   Missing
    ------------------------------------------------------------------------
    setup.py                        11      0      2      0   100%
    test/__init__.py                 5      0      0      0   100%
    test/examples.py                49      1      4      1    96%   24
    test/test_git.py               195      0     18      0   100%
    test/test_packaging.py           3      0      0      0   100%
    test/test_query.py             161      3     10      1    98%   67, 103-104
    test/test_version.py           153      0     32      0   100%
    version_query/__init__.py        5      0      0      0   100%
    version_query/__main__.py        9      0      2      0   100%
    version_query/_version.py        2      0      0      0   100%
    version_query/git_query.py     114      1     46      1    99%   64
    version_query/main.py           21      0      6      0   100%
    version_query/parser.py         36      0      8      0   100%
    version_query/patterns.py       25      0      0      0   100%
    version_query/py_query.py       45      7     18      3    84%   14-17, 38, 40, 57
    version_query/query.py          50      0      2      0   100%
    version_query/version.py       384      9    200      8    97%   66, 76, 87, 92, 94, 123, 259, 427, 440
    ------------------------------------------------------------------------
    TOTAL                         1268     21    348     14    98%
    

@jenkins-mbdev
Copy link

jenkins-mbdev bot commented Feb 19, 2025

Tools report for GitHub-mbdevpl/version-query/PR-27 [build #3]:

  • Pylint: refactor messages ℹ️ (click for details)
    ************* Module version_query.git_query
    version_query/git_query.py:76:0: R1260: '_latest_git_version_tag' is too complex. The McCabe rating is 12 (too-complex)
    
    -----------------------------------
    Your code has been rated at 9.99/10
    
  • Mypy: ran 🆗

  • Flake518: problems ⚠️ (click for details)
    version_query/version.py:39:101: E501 line too long (115 > 100 characters)
    
  • Pydocstyle: ran 🆗

  • Coverage: 98% 🆗 (click for details)
    Name                         Stmts   Miss Branch BrPart  Cover   Missing
    ------------------------------------------------------------------------
    setup.py                        11      0      2      0   100%
    test/__init__.py                 5      0      0      0   100%
    test/examples.py                49      1      4      1    96%   24
    test/test_git.py               195      0     18      0   100%
    test/test_packaging.py           3      0      0      0   100%
    test/test_query.py             161      3     10      1    98%   67, 103-104
    test/test_version.py           153      0     32      0   100%
    version_query/__init__.py        5      0      0      0   100%
    version_query/__main__.py        9      0      2      0   100%
    version_query/_version.py        2      0      0      0   100%
    version_query/git_query.py     114      1     46      1    99%   64
    version_query/main.py           21      0      6      0   100%
    version_query/parser.py         36      0      8      0   100%
    version_query/patterns.py       25      0      0      0   100%
    version_query/py_query.py       45      7     18      3    84%   14-17, 38, 40, 57
    version_query/query.py          50      0      2      0   100%
    version_query/version.py       393      9    200      8    97%   66, 76, 87, 92, 94, 123, 275, 443, 456
    ------------------------------------------------------------------------
    TOTAL                         1277     21    348     14    98%
    

@jenkins-mbdev
Copy link

jenkins-mbdev bot commented Feb 19, 2025

Tools report for GitHub-mbdevpl/version-query/PR-27 [build #4]:

  • Pylint: ran 🆗

  • Mypy: ran 🆗

  • Flake518: ran 🆗

  • Pydocstyle: ran 🆗

  • Coverage: 98% 🆗 (click for details)
    Name                         Stmts   Miss Branch BrPart  Cover   Missing
    ------------------------------------------------------------------------
    setup.py                        11      0      2      0   100%
    test/__init__.py                 5      0      0      0   100%
    test/examples.py                49      1      4      1    96%   24
    test/test_git.py               195      0     18      0   100%
    test/test_packaging.py           3      0      0      0   100%
    test/test_query.py             161      3     10      1    98%   67, 103-104
    test/test_version.py           153      0     32      0   100%
    version_query/__init__.py        5      0      0      0   100%
    version_query/__main__.py        9      0      2      0   100%
    version_query/_version.py        2      0      0      0   100%
    version_query/git_query.py     117      1     46      1    99%   75
    version_query/main.py           21      0      6      0   100%
    version_query/parser.py         36      0      8      0   100%
    version_query/patterns.py       25      0      0      0   100%
    version_query/py_query.py       45      7     18      3    84%   14-17, 38, 40, 57
    version_query/query.py          50      0      2      0   100%
    version_query/version.py       393      9    200      8    97%   68, 78, 89, 94, 96, 125, 277, 445, 458
    ------------------------------------------------------------------------
    TOTAL                         1280     21    348     14    98%
    

@mbdevpl mbdevpl merged commit fe538fd into main Feb 19, 2025
26 checks passed
@mbdevpl mbdevpl deleted the feature/fix-linting-issues branch February 19, 2025 04:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant