PEP585: Add noqa to necessary tests (#146391)

Pull Request resolved: https://github.com/pytorch/pytorch/pull/146391
Approved by: https://github.com/justinchuby, https://github.com/Skylion007
This commit is contained in:
Aaron Orenstein
2025-02-06 07:23:33 -08:00
committed by PyTorch MergeBot
parent b61032fcf7
commit 1f8ff94d4f
7 changed files with 63 additions and 31 deletions

View File

@ -231,7 +231,7 @@ class TestPybindTypeCasters(common.TestCase):
Our Pybind functions have a signature of the form `() -> return_type`.
"""
# Imports needed for the `eval` below.
from typing import List, Tuple # noqa: F401
from typing import List, Tuple # noqa: F401, UP035
return eval(re.search("-> (.*)\n", func.__doc__).group(1))