Type trace_rules.py (#158679)
Summary:
As part of better engineering week, we would like to improve out type support to improve dev experience in dynamo
This PR adds strict typing support to a core file, `trace_rules.py`
Running
```
mypy torch/_dynamo/trace_rules.py --linecount-report /tmp/coverage_log
```
| -------- | Lines Unannotated | Lines Total | % lines covered | Funcs Unannotated | Funcs Total | % funcs covered |
| -------- | ------- | -------- | ------- | ------- | ------- | ------- |
| Main | 2564 | 3997 | 64.15% | 34 | 53 | 64.15% |
| This PR | 4022 | 4022 | 100.00% | 53 | 53 | 100.00% |
| Delta | +1458 | +25 | +35.85% | +19 | 0 | +35.85% |
X-link: https://github.com/pytorch/pytorch/pull/158679
Approved by: https://github.com/williamwen42
Reviewed By: ZainRizvi
Differential Revision: D78709517
fbshipit-source-id: fbc2db3a15433a9ee1b7a5b51d307a8456e4ca8c