Skip to content

Conversation

@desilinguist
Copy link
Collaborator

@desilinguist desilinguist commented May 12, 2023

  • Add mypy pre-commit check.
  • Add type hints to skll/config/__init.py and skll/config/utils.py.
  • Minor code changes to make improve static typing of the code.
  • Update docstrings to use the actual type hints.

This is the first PR in support of #561, with many more to come.

- Also update docstrings to use proper types.
- Clean up code to make it improve type inference.
@codecov
Copy link

codecov bot commented May 12, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.01 🎉

Comparison is base (0a6f97d) 95.35% compared to head (3ab4bf0) 95.37%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #729      +/-   ##
==========================================
+ Coverage   95.35%   95.37%   +0.01%     
==========================================
  Files          28       29       +1     
  Lines        3404     3415      +11     
==========================================
+ Hits         3246     3257      +11     
  Misses        158      158              
Impacted Files Coverage Δ
skll/config/__init__.py 94.77% <100.00%> (+0.01%) ⬆️
skll/config/utils.py 96.22% <100.00%> (+0.39%) ⬆️
skll/types.py 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

- Define custom types for readability.
- Update `skll.config` module to use these custom types.
@desilinguist desilinguist merged commit d7f0eb2 into main May 15, 2023
@delete-merged-branch delete-merged-branch bot deleted the 561-type-hints-1 branch May 15, 2023 14:56
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.

5 participants