Skip to content

Type hints and test linting#19

Merged
jnhmcknight merged 5 commits intomainfrom
typing
Jun 23, 2025
Merged

Type hints and test linting#19
jnhmcknight merged 5 commits intomainfrom
typing

Conversation

@jnhmcknight
Copy link
Contributor

This adds all the appropriate type hints to the whole package, while maintaining compatibility with Python 3.6. Because of the type hints, Peer needed to be split into BasePeer and Peer to prevent circular imports.

This also includes reformatting of the tests by Black, and linting in the tests where needed.

Note: due to the type hints and circular dependencies, `Peer` needed to be
      broken into a `BasePeer` and `Peer`. Most commonly, `Peer` will still be
      the desired class to use. Only use `BasePeer` in highly custom scenarios
@jnhmcknight jnhmcknight merged commit 05ec85d into main Jun 23, 2025
26 checks passed
@jnhmcknight jnhmcknight deleted the typing branch June 23, 2025 18:05
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