You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original comment by Matthew Barnett (Bitbucket: mrabarnett, GitHub: mrabarnett).
Python’s typing module knows about Match because re is the stdlib and the typing is defined in the typing module. You could look at how the types are defined for re and then try replicating that using regex.
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: