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

Add type hints #275

Merged
merged 5 commits into from
Mar 19, 2024
Merged

Add type hints #275

merged 5 commits into from
Mar 19, 2024

Conversation

jan-janssen
Copy link
Member

No description provided.

@jan-janssen jan-janssen requested a review from liamhuber March 18, 2024 01:17
@jan-janssen jan-janssen added the format_black reformat the code using the black standard label Mar 18, 2024
Copy link
Member

@liamhuber liamhuber left a comment

Choose a reason for hiding this comment

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

With the disclaimer that I haven't verified that the value of the hints is correct in any way, looks good. I'd give a friendly reminder that it's helpful to sub-hint iterables (dict->dict[str, int] etc.), but since that's already done in some places I'm assuming in the rest there is no super clear hint -- anyhow, even without the sub-hint it's already a mergable improvement.

Only necessary change is that all hints of the variety var: type_hint = None need to be replaced with var: typing.Optional[type_hint] = None (or type_hint | None if you're only supporting newer python versions, but I forget the cutoff). I'm approving despite the requested change because there is zero need for re-review after such a simple change.

@jan-janssen jan-janssen merged commit 793dd56 into main Mar 19, 2024
15 of 16 checks passed
@jan-janssen jan-janssen deleted the type_hints branch March 19, 2024 00:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
format_black reformat the code using the black standard
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants