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

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

Merged
merged 2 commits into from
Jan 7, 2024

Conversation

gruebel
Copy link
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

Signed-off-by: gruebel <anton.gruebel@gmail.com>
Copy link

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
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
Member Author

gruebel commented Jan 6, 2024

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

Signed-off-by: gruebel <anton.gruebel@gmail.com>
@federicobond federicobond merged commit b3c67b6 into open-feature:main Jan 7, 2024
12 checks passed
@gruebel gruebel deleted the add-mypy branch January 7, 2024 15:57
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