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

refresh packaging #21

Merged
merged 4 commits into from
Jun 12, 2024
Merged

refresh packaging #21

merged 4 commits into from
Jun 12, 2024

Conversation

mbdevpl
Copy link
Owner

@mbdevpl mbdevpl commented Jun 12, 2024

No description provided.

@mbdevpl mbdevpl self-assigned this Jun 12, 2024
@jenkins-mbdev
Copy link

jenkins-mbdev bot commented Jun 12, 2024

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

  • Pylint: warnings ⚠️ (click for details)
    ************* Module version_query.version
    version_query/version.py:244:4: R1260: '_get_pre_release_from_args' is too complex. The McCabe rating is 11 (too-complex)
    version_query/version.py:22:4: C0103: Class constant name "Major" doesn't conform to UPPER_CASE naming style (invalid-name)
    version_query/version.py:23:4: C0103: Class constant name "Minor" doesn't conform to UPPER_CASE naming style (invalid-name)
    version_query/version.py:24:4: C0103: Class constant name "Patch" doesn't conform to UPPER_CASE naming style (invalid-name)
    version_query/version.py:25:4: C0103: Class constant name "Release" doesn't conform to UPPER_CASE naming style (invalid-name)
    version_query/version.py:26:4: C0103: Class constant name "PrePatch" doesn't conform to UPPER_CASE naming style (invalid-name)
    version_query/version.py:27:4: C0103: Class constant name "DevPatch" doesn't conform to UPPER_CASE naming style (invalid-name)
    version_query/version.py:28:4: C0103: Class constant name "Local" doesn't conform to UPPER_CASE naming style (invalid-name)
    version_query/version.py:32:11: R1729: Use a generator instead 'all(_ is not None if flag else _ is None for (_, flag) in zip(version_tuple, flags))' (use-a-generator)
    version_query/version.py:35:0: R0902: Too many instance attributes (8/7) (too-many-instance-attributes)
    version_query/version.py:77:28: C0209: Formatting a regular string which could be an f-string (consider-using-f-string)
    version_query/version.py:108:15: R1728: Consider using a generator instead 'tuple(_ for _ in match.groups() if _ is not None)' (consider-using-generator)
    version_query/version.py:111:22: C0209: Formatting a regular string which could be an f-string (consider-using-f-string)
    version_query/version.py:113:16: C0209: Formatting a regular string which could be an f-string (consider-using-f-string)
    version_query/version.py:150:14: W0212: Access to a protected member _version of a client class (protected-access)
    version_query/version.py:203:4: R0913: Too many arguments (6/5) (too-many-arguments)
    version_query/version.py:203:4: W1113: Keyword argument before variable positional arguments list in the definition of __init__ function (keyword-arg-before-vararg)
    version_query/version.py:504:19: C0209: Formatting a regular string which could be an f-string (consider-using-f-string)
    version_query/version.py:508:19: C0209: Formatting a regular string which could be an f-string (consider-using-f-string)
    version_query/version.py:510:19: C0209: Formatting a regular string which could be an f-string (consider-using-f-string)
    ************* 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 test.test_version
    test/test_version.py:134:12: R0204: Redefinition of version.release type from int to tuple (redefined-variable-type)
    
    -----------------------------------
    Your code has been rated at 9.82/10
    
  • Mypy: problems ⚠️ (click for details)
    version_query/version.py:135: error: Argument "pre_release" to "Version" has incompatible type "Sequence[tuple[str | None, str | None, int | None]] | None"; expected "Sequence[tuple[str | None, str | None, int | None]]"  [arg-type]
    version_query/version.py:135: error: Argument "local" to "Version" has incompatible type "tuple[Any, ...] | None"; expected "str | tuple[Any, ...]"  [arg-type]
    version_query/version.py:169: error: Incompatible types in assignment (expression has type "tuple[str, int]", variable has type "tuple[None, int] | None")  [assignment]
    version_query/version.py:171: error: Incompatible types in assignment (expression has type "tuple[str, int]", variable has type "tuple[None, int] | None")  [assignment]
    version_query/version.py:179: error: Argument 1 to "Version" has incompatible type "int | None"; expected "int"  [arg-type]
    version_query/version.py:179: error: Argument "pre_release" to "Version" has incompatible type "Sequence[tuple[str | None, str | None, int | None]] | None"; expected "Sequence[tuple[str | None, str | None, int | None]]"  [arg-type]
    version_query/version.py:179: error: Argument "local" to "Version" has incompatible type "tuple[str, ...] | None"; expected "str | tuple[Any, ...]"  [arg-type]
    version_query/version.py:197: error: Argument "pre_release" to "Version" has incompatible type "None"; expected "Sequence[tuple[str | None, str | None, int | None]]"  [arg-type]
    version_query/version.py:206: error: Incompatible default for argument "pre_release" (default has type "None", argument has type "Sequence[tuple[str | None, str | None, int | None]]")  [assignment]
    version_query/version.py:206: note: PEP 484 prohibits implicit Optional. Accordingly, mypy has changed its default to no_implicit_optional=True
    version_query/version.py:206: note: Use https://github.com/hauntsaninja/no_implicit_optional to automatically upgrade your codebase
    version_query/version.py:207: error: Incompatible default for argument "local" (default has type "None", argument has type "str | tuple[Any, ...]")  [assignment]
    version_query/version.py:207: note: PEP 484 prohibits implicit Optional. Accordingly, mypy has changed its default to no_implicit_optional=True
    version_query/version.py:207: note: Use https://github.com/hauntsaninja/no_implicit_optional to automatically upgrade your codebase
    version_query/version.py:273: error: Argument 1 to "append" of "list" has incompatible type "tuple[int | str, ...]"; expected "tuple[str | None, str | None, int | None]"  [arg-type]
    version_query/version.py:552: error: Incompatible return value type (got "Sequence[Any]", expected "tuple[Any, ...]")  [return-value]
    test/test_version.py:27: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs  [annotation-unchecked]
    test/test_version.py:35: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs  [annotation-unchecked]
    test/test_version.py:79: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs  [annotation-unchecked]
    Found 12 errors in 1 file (checked 15 source files)
    
  • 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     12      1    97%   24
    test/test_git.py               195      0     34      0   100%
    test/test_packaging.py           3      0      0      0   100%
    test/test_query.py             161      3     69      1    98%   67, 103-104
    test/test_version.py           153      0     84      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     50      1    99%   64
    version_query/main.py           21      0      6      0   100%
    version_query/py_query.py       31      5     17      1    83%   14-17, 41
    version_query/query.py          50      0      2      0   100%
    version_query/version.py       442      7    260      6    98%   139, 160, 165, 167, 194, 498, 511
    ------------------------------------------------------------------------
    TOTAL                         1251     17    538     10    98%
    

Copy link

codecov bot commented Jun 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.84%. Comparing base (0f4d8b7) to head (6fec459).

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #21   +/-   ##
=======================================
  Coverage   97.84%   97.84%           
=======================================
  Files          15       15           
  Lines        1251     1251           
  Branches      268      268           
=======================================
  Hits         1224     1224           
  Misses         17       17           
  Partials       10       10           

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

@jenkins-mbdev
Copy link

jenkins-mbdev bot commented Jun 12, 2024

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

  • Pylint: warnings ⚠️ (click for details)
    ************* Module version_query.version
    version_query/version.py:244:4: R1260: '_get_pre_release_from_args' is too complex. The McCabe rating is 11 (too-complex)
    version_query/version.py:22:4: C0103: Class constant name "Major" doesn't conform to UPPER_CASE naming style (invalid-name)
    version_query/version.py:23:4: C0103: Class constant name "Minor" doesn't conform to UPPER_CASE naming style (invalid-name)
    version_query/version.py:24:4: C0103: Class constant name "Patch" doesn't conform to UPPER_CASE naming style (invalid-name)
    version_query/version.py:25:4: C0103: Class constant name "Release" doesn't conform to UPPER_CASE naming style (invalid-name)
    version_query/version.py:26:4: C0103: Class constant name "PrePatch" doesn't conform to UPPER_CASE naming style (invalid-name)
    version_query/version.py:27:4: C0103: Class constant name "DevPatch" doesn't conform to UPPER_CASE naming style (invalid-name)
    version_query/version.py:28:4: C0103: Class constant name "Local" doesn't conform to UPPER_CASE naming style (invalid-name)
    version_query/version.py:32:11: R1729: Use a generator instead 'all(_ is not None if flag else _ is None for (_, flag) in zip(version_tuple, flags))' (use-a-generator)
    version_query/version.py:35:0: R0902: Too many instance attributes (8/7) (too-many-instance-attributes)
    version_query/version.py:77:28: C0209: Formatting a regular string which could be an f-string (consider-using-f-string)
    version_query/version.py:108:15: R1728: Consider using a generator instead 'tuple(_ for _ in match.groups() if _ is not None)' (consider-using-generator)
    version_query/version.py:111:22: C0209: Formatting a regular string which could be an f-string (consider-using-f-string)
    version_query/version.py:113:16: C0209: Formatting a regular string which could be an f-string (consider-using-f-string)
    version_query/version.py:150:14: W0212: Access to a protected member _version of a client class (protected-access)
    version_query/version.py:203:4: R0913: Too many arguments (6/5) (too-many-arguments)
    version_query/version.py:203:4: W1113: Keyword argument before variable positional arguments list in the definition of __init__ function (keyword-arg-before-vararg)
    version_query/version.py:504:19: C0209: Formatting a regular string which could be an f-string (consider-using-f-string)
    version_query/version.py:508:19: C0209: Formatting a regular string which could be an f-string (consider-using-f-string)
    version_query/version.py:510:19: C0209: Formatting a regular string which could be an f-string (consider-using-f-string)
    ************* 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 test.test_version
    test/test_version.py:134:12: R0204: Redefinition of version.release type from int to tuple (redefined-variable-type)
    
    -----------------------------------
    Your code has been rated at 9.82/10
    
  • Mypy: problems ⚠️ (click for details)
    version_query/version.py:135: error: Argument "pre_release" to "Version" has incompatible type "Sequence[tuple[str | None, str | None, int | None]] | None"; expected "Sequence[tuple[str | None, str | None, int | None]]"  [arg-type]
    version_query/version.py:135: error: Argument "local" to "Version" has incompatible type "tuple[Any, ...] | None"; expected "str | tuple[Any, ...]"  [arg-type]
    version_query/version.py:169: error: Incompatible types in assignment (expression has type "tuple[str, int]", variable has type "tuple[None, int] | None")  [assignment]
    version_query/version.py:171: error: Incompatible types in assignment (expression has type "tuple[str, int]", variable has type "tuple[None, int] | None")  [assignment]
    version_query/version.py:179: error: Argument 1 to "Version" has incompatible type "int | None"; expected "int"  [arg-type]
    version_query/version.py:179: error: Argument "pre_release" to "Version" has incompatible type "Sequence[tuple[str | None, str | None, int | None]] | None"; expected "Sequence[tuple[str | None, str | None, int | None]]"  [arg-type]
    version_query/version.py:179: error: Argument "local" to "Version" has incompatible type "tuple[str, ...] | None"; expected "str | tuple[Any, ...]"  [arg-type]
    version_query/version.py:197: error: Argument "pre_release" to "Version" has incompatible type "None"; expected "Sequence[tuple[str | None, str | None, int | None]]"  [arg-type]
    version_query/version.py:206: error: Incompatible default for argument "pre_release" (default has type "None", argument has type "Sequence[tuple[str | None, str | None, int | None]]")  [assignment]
    version_query/version.py:206: note: PEP 484 prohibits implicit Optional. Accordingly, mypy has changed its default to no_implicit_optional=True
    version_query/version.py:206: note: Use https://github.com/hauntsaninja/no_implicit_optional to automatically upgrade your codebase
    version_query/version.py:207: error: Incompatible default for argument "local" (default has type "None", argument has type "str | tuple[Any, ...]")  [assignment]
    version_query/version.py:207: note: PEP 484 prohibits implicit Optional. Accordingly, mypy has changed its default to no_implicit_optional=True
    version_query/version.py:207: note: Use https://github.com/hauntsaninja/no_implicit_optional to automatically upgrade your codebase
    version_query/version.py:273: error: Argument 1 to "append" of "list" has incompatible type "tuple[int | str, ...]"; expected "tuple[str | None, str | None, int | None]"  [arg-type]
    version_query/version.py:552: error: Incompatible return value type (got "Sequence[Any]", expected "tuple[Any, ...]")  [return-value]
    test/test_version.py:27: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs  [annotation-unchecked]
    test/test_version.py:35: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs  [annotation-unchecked]
    test/test_version.py:79: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs  [annotation-unchecked]
    Found 12 errors in 1 file (checked 15 source files)
    
  • 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     12      1    97%   24
    test/test_git.py               195      0     34      0   100%
    test/test_packaging.py           3      0      0      0   100%
    test/test_query.py             161      3     69      1    98%   67, 103-104
    test/test_version.py           153      0     84      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     50      1    99%   64
    version_query/main.py           21      0      6      0   100%
    version_query/py_query.py       31      5     17      1    83%   14-17, 41
    version_query/query.py          50      0      2      0   100%
    version_query/version.py       442      7    260      6    98%   139, 160, 165, 167, 194, 498, 511
    ------------------------------------------------------------------------
    TOTAL                         1251     17    538     10    98%
    

@mbdevpl mbdevpl merged commit 2251170 into main Jun 12, 2024
49 checks passed
@mbdevpl mbdevpl deleted the feature/refresh-packaging branch June 12, 2024 07:18
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