mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 21:14:48 +08:00
Clean up tests/check_pep_604.py (#5980)
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
import ast
|
||||
import sys
|
||||
from itertools import chain
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
@@ -54,10 +55,10 @@ def check_pep_604(tree: ast.AST, path: Path) -> list[str]:
|
||||
|
||||
def main() -> None:
|
||||
errors = []
|
||||
for path in Path(".").glob("**/*.pyi"):
|
||||
for path in chain(Path("stdlib").rglob("*.pyi"), Path("stubs").rglob("*.pyi")):
|
||||
if "@python2" in path.parts:
|
||||
continue
|
||||
if "stubs/protobuf/google/protobuf" in str(path): # TODO: fix protobuf stubs
|
||||
if Path("stubs/protobuf/google/protobuf") in path.parents: # TODO: fix protobuf stubs
|
||||
continue
|
||||
|
||||
with open(path) as f:
|
||||
|
||||
Reference in New Issue
Block a user