Skip to content

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

Merged
FollowTheProcess merged 6 commits intowntrblm:mainfrom
henryiii:add-generic-arguments
Apr 21, 2022
Merged

fix(types): full strictness checking on mypy#596
FollowTheProcess merged 6 commits intowntrblm:mainfrom
henryiii:add-generic-arguments

Conversation

@henryiii
Copy link
Copy Markdown
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 thread nox/_decorators.py
Comment on lines -40 to +43
src.__globals__, # type: ignore[attr-defined]
src.__globals__,
Copy link
Copy Markdown
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.

Comment thread nox/_option_set.py
| str
| None
| list[str]
| Callable[[], bool | str | None | list[str]] = None,
Copy link
Copy Markdown
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.

Comment thread .pre-commit-config.yaml Outdated
@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