Replies: 2 comments
-
One solution is to gate with Another solution that works with recent mypy is you can do something like |
Beta Was this translation helpful? Give feedback.
0 replies
-
Ah I didn't know mypy will inference if statements like that. I added that if statement and it works, thank you so much! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey, I have a project that conditionally installs and loads uvloop when it is running on Linux and has uvloop installed. The trouble is, you can't install uvloop on Windows, so type checking fails. To fix this, you can add a
# type: ignore
to the line but then it fails on Linux witherror: Unused "type: ignore" comment [unused-ignore]
.Here's the snippet in question:
How should I handle this? Thanks for the help!
Beta Was this translation helpful? Give feedback.
All reactions