[BE] mypy: disallow untyped decorators (#131428)

Untyped decorators strip the types from their decorated function so even if the underlying function is fully typed then callers to it don't get any benefit from type annotations.

Step 1 - Enable the error and override in all the offending files.

#131429

Pull Request resolved: https://github.com/pytorch/pytorch/pull/131428
Approved by: https://github.com/justinchuby, https://github.com/oulgen
This commit is contained in:
Aaron Orenstein
2024-07-23 14:48:25 -07:00
committed by PyTorch MergeBot
parent e3ca4e79e1
commit 5a0068cc69
135 changed files with 135 additions and 0 deletions

View File

@ -1,3 +1,4 @@
# mypy: allow-untyped-decorators
# mypy: allow-untyped-defs
import math
import os