-
Notifications
You must be signed in to change notification settings - Fork 49
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
Type-checking difference between re
and regex
modules
#423
Comments
Original comment by Matthew Barnett (Bitbucket: mrabarnett, GitHub: mrabarnett). Python’s typing module knows about |
FYI I've added type stubs for the You can install them via |
Original report by Anonymous.
The following code fails under both mypy and pyright:
As "str" is incompatible with "int". But the same does not happen for the
regex
module.Is the solution something like
or is there a better way to enable type checking here?
Thanks,
Rich
The text was updated successfully, but these errors were encountered: