Skip to content

Commit cc596ae

Browse files
msullivanJelleZijlstra
authored andcommitted
Add a type: ignore as a hacky workaround for some mypy bazel issues (#2887)
1 parent 598d0d6 commit cc596ae

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

stdlib/3/ast.pyi

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@ import sys
77
import typing as _typing
88
from typing import Any, Iterator, Optional, Union, TypeVar
99

10-
from _ast import *
10+
# The same unorthodox Bazel integration causes issues with sys, which
11+
# is imported in both modules. unfortunately we can't just rename sys,
12+
# since mypy only supports version checks with a sys that is named
13+
# sys.
14+
from _ast import * # type: ignore
1115

1216
class NodeVisitor():
1317
def visit(self, node: AST) -> Any: ...

0 commit comments

Comments
 (0)