Skip to content

Conversation

cdleonard
Copy link

@cdleonard cdleonard commented Jul 8, 2025

Multiple Changes:

  • Add mypy to the git workflow "lint" step
  • Add mypy and types-* packages to pyproject.toml
  • Remove compat imports for "unittest2" and "mock" which are long obsolete
  • Fix a great number of typing errors

Currently at <30 typing errors.

Let me know if you want this to actually reach zero mypy errors. Alternatively I can split this PR into smaller changes instead.

@cdleonard cdleonard force-pushed the typing branch 3 times, most recently from 0168403 to 18bf960 Compare July 9, 2025 12:16
@cdleonard
Copy link
Author

Failure seems transient, unrelated to my change

Fields and variables must have a single type declaration, fix this by
moving field declarations to class level instead of on multiple branches
on init
This is not technically correct because __init__ assigns None but most
code relies on it being a dict. Make this change now to reduce the
number of typing errors.
All supported versions have mock inside the standard library
This slightly reduces code duplication. It also fixes Queue.itervalues()
constructing objects in an incorrect way as flagged by type checkers.
This is what set_config_element actually passes so this fixes a type
error
@cdleonard
Copy link
Author

rebased and solved minor conflict with ruff reformat

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.

1 participant