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

@ -40,11 +40,17 @@ from tools.flight_recorder.components.types import types
def main(args: Optional[Sequence[str]] = None) -> None:
config = JobConfig()
# pyrefly: ignore # bad-assignment
args = config.parse_args(args)
# pyrefly: ignore # missing-attribute
assert args.trace_dir, "Trace directory trace_dir is required"
# pyrefly: ignore # bad-argument-type
details, version = read_dir(args)
# pyrefly: ignore # bad-argument-type
db = build_db(details, args, version)
# pyrefly: ignore # missing-attribute
if args.output:
# pyrefly: ignore # no-matching-overload
with open(args.output, "wb") as f:
pickle.dump((types, db), f)