Expand type checking to mypy strict files (#165697)

Expands Pyrefly type checking to check the files outlined in the mypy-strict.ini configuration file:

Pull Request resolved: https://github.com/pytorch/pytorch/pull/165697
Approved by: https://github.com/ezyang
This commit is contained in:
Maggie Moss
2025-10-18 04:34:41 +00:00
committed by PyTorch MergeBot
parent 9095a9dfae
commit f02e3947f6
42 changed files with 89 additions and 11 deletions

View File

@ -36,11 +36,13 @@ def concated_logs() -> str:
for log_file in glob.glob(
f"{REPO_ROOT}/test/test-reports/**/*.log", recursive=True
):
# pyrefly: ignore # bad-argument-type
logs.append(f"=== {log_file} ===")
with open(log_file) as f:
# For every line, prefix with fake timestamp for log classifier
for line in f:
line = line.rstrip("\n") # Remove any trailing newline
# pyrefly: ignore # bad-argument-type
logs.append(f"2020-01-01T00:00:00.0000000Z {line}")
return "\n".join(logs)