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
{{ message }}
Repository navigation
False positive involving re.sub and + operator introduced in mypy 0.960 #12961
Strangely, removing either of the addition operators and the corresponding string literal causes mypy 0.960 to accept the snippet. That is, applying this change
I'm not sure how to get mypy to reveal the type of an expression in a lambda body, but I'd guess that in the error cases it deduces match: Match[bytes] rather than match: Match[str]?
Bisection shows that this was introduced by 7fbf4de ("Sync typeshed"). I'm not sure if this indicates s typeshed bug or just something that a typeshed change happened to expose?
Activity
DMRobertson commentedon Jun 9, 2022
Bisection shows that this was introduced by 7fbf4de ("Sync typeshed"). I'm not sure if this indicates s typeshed bug or just something that a typeshed change happened to expose?
DMRobertson commentedon Jun 9, 2022
Ahh, digging into the typeshed change (python/typeshed#7679) this looks like this is probably related to (duplicate of?) #12665
AlexWaygood commentedon Jun 9, 2022
Or #12773 (cc. @JukkaL, @JelleZijlstra)
hauntsaninja commentedon Jun 9, 2022
Yup, duplicate of #12666 / 12665
hauntsaninja commentedon Jun 9, 2022
The issue is probably something like we're not correctly silencing errors in the earlier passes for the multipass lambda logic