Add typing annotations to pattern_matcher.py (#127458)

Turn on `mypy: disallow-untyped-defs` in pattern_matcher.py and fix the fallout.

There are still a bunch of `type: ignore` annotations which should eventually be ironed out.

In the processs found a bug: #127457

Pull Request resolved: https://github.com/pytorch/pytorch/pull/127458
Approved by: https://github.com/Skylion007
ghstack dependencies: #127457
This commit is contained in:
Aaron Orenstein
2024-06-03 11:53:10 -07:00
committed by PyTorch MergeBot
parent 9adfa143d7
commit 7a60a75256
4 changed files with 349 additions and 206 deletions

File diff suppressed because it is too large Load Diff