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

#125 Use no_type_check instead of hack #126

Merged
merged 2 commits into from
Jan 26, 2024
Merged

#125 Use no_type_check instead of hack #126

merged 2 commits into from
Jan 26, 2024

Conversation

JamesHutchison
Copy link
Owner

Addresses #125

This fixes an issue where type hints were not working on JetBrains based IDEs. This also removes the hack that I've hated (I wrote it, I'm allowed to hate it). It turns out there's a decorator, no_type_check I was unaware of that lets you disable type checking for mypy without disrupting the IDE's interpretation of the type hints. This is a much more elegant solution and testing between pycharm and vs code I couldn't find a downside to this approach.

It's worth calling out that Pylance catches the wrong argument types being passed in while mypy just ignores everything. This, however, seems to be the current behavior.

pylance-catching

@JamesHutchison JamesHutchison merged commit a2e4c61 into main Jan 26, 2024
3 checks passed
@JamesHutchison JamesHutchison deleted the pycharm-fixes branch January 26, 2024 22:24
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