mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-10-15 18:42:41 +08:00
Use Ruff for from __future__ import annotations checks (#10910)
This commit is contained in:
1 parent
3cb1a8faed
commit
21fcd8960f
5 files changed
+18
-9
No files matched your search
@@ -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