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

fix(types): full strictness checking on mypy #596

Merged
merged 6 commits into from
Apr 21, 2022

Conversation

henryiii
Copy link
Collaborator

This is a followup to (and includes) #595. Enabling full strictness checking for mypy and bumping the version of mypy (which removes a few ignores).

There are still two sets of ignores that can likely go away in the future. There are some around py.path that will go away with #592. There are also likely some related to function decorators - by properly typing decorators with generics, we can tighten that up and make those work better too (but that's a followup for some other time).

Closes #595 if this gets merged before that, since it contains that commit.

  • Add some missing generic arguments
  • fix(types): add full strict checking
  • fix(types): enable extra error checks

Comment on lines -40 to +43
src.__globals__, # type: ignore[attr-defined]
src.__globals__,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

These were fixed upstream in typeshed and included in mypy 0.94x.

| str
| None
| list[str]
| Callable[[], bool | str | None | list[str]] = None,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This should probably be generic eventually - Option[str] would hold a str, etc. But didn't look into it.

.pre-commit-config.yaml Outdated Show resolved Hide resolved
@FollowTheProcess FollowTheProcess merged commit af96f51 into wntrblm:main Apr 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants