Skip to content

ci: add mypy type checking and fix/exclude minor issues#255

Merged
federicobond merged 2 commits intoopen-feature:mainfrom
gruebel:add-mypy
Jan 7, 2024
Merged

ci: add mypy type checking and fix/exclude minor issues#255
federicobond merged 2 commits intoopen-feature:mainfrom
gruebel:add-mypy

Conversation

@gruebel
Copy link
Copy Markdown
Member

@gruebel gruebel commented Jan 6, 2024

This PR

  • most of the code has type annotation, so this adds a type checking task inside pre-commit, which will be triggered during CI
  • had to adjust the StrEnum import to use the Python system info, so the type checker can properly handle it
  • the ignores in MappingProxyType are needed, because the original type hints are different

Follow-up Tasks

  • plan is to enable more and more mypy checks with follow-up PRs till strict mode can be enabled

@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (a853b85) 93.82% compared to head (4497d2c) 93.83%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #255      +/-   ##
==========================================
+ Coverage   93.82%   93.83%   +0.01%     
==========================================
  Files          16       16              
  Lines         437      438       +1     
==========================================
+ Hits          410      411       +1     
  Misses         27       27              
Flag Coverage Δ
unittests 93.83% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

Copy link
Copy Markdown
Member

@federicobond federicobond left a comment

Choose a reason for hiding this comment

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

There is no openfeature/__init__.py file to turn openfeature into an implicit namespace package. See #199

Other than that, LGTM.

@gruebel
Copy link
Copy Markdown
Member Author

gruebel commented Jan 6, 2024

ok, no problem. Need to adjust the mypy config a bit to make it work.

@federicobond federicobond merged commit b3c67b6 into open-feature:main Jan 7, 2024
@gruebel gruebel deleted the add-mypy branch January 7, 2024 15:57
kikihakiem pushed a commit to ResalApps/openfeature-python-sdk that referenced this pull request Aug 28, 2025
…ure#255)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
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.

2 participants