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

Add mypy to pre-commit and improve typehints #98

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

ns-rse
Copy link
Collaborator

@ns-rse ns-rse commented Jan 7, 2025

Closes #96

Adds mypy checks to pre-commit hooks.

Used RightTyper to help identify errors and the correct types, it was useful but not comprehensive as mypy still threw a lot of problems which have, mostly, been corrected. This was mainly as a precurrsor to addressing and correcting type hints in TopoStats.

There were a few areas where ignores have been added as I couldn't see how to correct these. They may want correcting in the modules, less important for the tests.

- increase `max-positional-arguments=6``
- `logging-format-style=new`
- `logging-modules=loguru`
@codecov-commenter
Copy link

codecov-commenter commented Jan 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 72.00%. Comparing base (f282c31) to head (5baa961).
Report is 216 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #98      +/-   ##
==========================================
+ Coverage   65.87%   72.00%   +6.13%     
==========================================
  Files           3        8       +5     
  Lines         337      593     +256     
==========================================
+ Hits          222      427     +205     
- Misses        115      166      +51     

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

@ns-rse ns-rse force-pushed the ns-rse/96-mypy-ci branch from 3d10c16 to 5baa961 Compare January 7, 2025 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request v0.0.5
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Apply mypy in pre-commit/CI
6 participants