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

refactor: configure mypy to strict mode #339

Merged
merged 8 commits into from
Jan 4, 2025

Conversation

CBeck-96
Copy link
Collaborator

closes #11

Some errors are excluded, since they will be fixed by transitioning to the cdx python lib

@CBeck-96 CBeck-96 linked an issue Dec 15, 2024 that may be closed by this pull request
@CBeck-96 CBeck-96 force-pushed the 11-configure-mypy-to-strict-mode branch from d7b46f5 to 677e422 Compare December 15, 2024 14:22
Copy link
Contributor

github-actions bot commented Dec 15, 2024

Coverage

Coverage Report •
FileStmtsMissCoverMissing
__main__.py3842394%240–241, 258, 270, 313, 324–328, 330, 820, 863, 908, 913, 917, 942, 956, 960, 964, 966, 975, 985
initialize_sbom.py340100% 
list_command.py184995%22, 28, 30, 59, 153, 178, 214, 240, 306
merge.py181497%276–277, 280–281
set.py1952388%57, 62–65, 81–89, 91–92, 94–97, 108, 335–336
amend
   operations.py194298%392, 456
auxiliary
   identity.py84692%20, 56–58, 60, 88
   sbomFunctions.py162696%72, 80, 157, 375, 424, 436
validator
   helper.py49491%36, 38, 62, 77
   validate.py110694%112–113, 115, 149, 165, 200
TOTAL201910394% 

Tests Skipped Failures Errors Time
367 2 💤 0 ❌ 0 🔥 12.169s ⏱️

@CBeck-96 CBeck-96 changed the title Feat: configures mypy to strict mode feat: configure mypy to strict mode Dec 16, 2024
Copy link
Collaborator

@italvi italvi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please change the type of the PR to "refactor" as you changed the code but only the style, also adjust the mypy config in the .pre-commit-config.yaml, i.e.

  - repo: https://github.com/pre-commit/mirrors-mypy
    rev: "v1.13.0"
    hooks:
      - id: mypy
        # List type stub dependencies explicitly, as --install-types should be avoided as per
        # https://github.com/pre-commit/mirrors-mypy/blob/main/README.md
        additional_dependencies:
          - types-python-dateutil==2.9.0.20241003
          - typing-extensions==4.12.2
          - types-jsonschema==4.23.0.20240813
          - cyclonedx-python-lib==8.5.0
          - univers==30.12.1
          - charset-normalizer==3.4.0
          - natsort==8.4.0
          - docstring-parser==0.16
        files: "^cdxev/.*\\.py$"
        args: ["--config-file", "pyproject.toml"]

@CBeck-96 CBeck-96 changed the title feat: configure mypy to strict mode refactor: configure mypy to strict mode Dec 20, 2024
Copy link
Collaborator

@italvi italvi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tried it locally and the commit hook for mypy works, too.

@italvi italvi merged commit 4b33dd4 into main Jan 4, 2025
8 checks passed
@italvi italvi deleted the 11-configure-mypy-to-strict-mode branch January 4, 2025 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Configure mypy to strict mode
2 participants