Skip to content

Commit a8562c7

Browse files
authored
Fix a mypyc compilation error in 3.5 (#5618)
The call to bool() used to disguise the branch wasn't being semantically analyzed when the version check matched, so work around that. The actual solution here is to actually handle this case, but this works for now.
1 parent 38b4987 commit a8562c7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mypy/fastparse.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def _overload(x: Any) -> Any:
8080

8181

8282
# mypyc doesn't like unreachable code, so trick mypy into thinking the branch is reachable
83-
if sys.version_info < (3, 6) or bool():
83+
if bool() or sys.version_info < (3, 6):
8484
overload = _overload # noqa
8585

8686

0 commit comments

Comments
 (0)