mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 20:54:28 +08:00
Use Ruff for from __future__ import annotations checks (#10910)
This commit is contained in:
@@ -83,9 +83,6 @@ def check_test_cases() -> None:
|
||||
bad_test_case_filename = 'Files in a `test_cases` directory must have names starting with "check_"; got "{}"'
|
||||
for file in testcase_dir.rglob("*.py"):
|
||||
assert file.stem.startswith("check_"), bad_test_case_filename.format(file)
|
||||
with open(file, encoding="UTF-8") as f:
|
||||
lines = {line.strip() for line in f}
|
||||
assert "from __future__ import annotations" in lines, "Test-case files should use modern typing syntax where possible"
|
||||
|
||||
|
||||
def check_no_symlinks() -> None:
|
||||
|
||||
Reference in New Issue
Block a user