Remove mypy ignore from torch/_dynamo/polyfill.py (#131786)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/131786
Approved by: https://github.com/aorenste, https://github.com/zou3519
diff --git a/torch/_dynamo/polyfill.py b/torch/_dynamo/polyfill.py
index f3c5d61..6648d7b 100644
--- a/torch/_dynamo/polyfill.py
+++ b/torch/_dynamo/polyfill.py
@@ -1,4 +1,4 @@
-# mypy: ignore-errors
+# mypy: allow-untyped-defs
"""
Python polyfills for common builtins.
@@ -24,7 +24,7 @@
def index(iterator, item, start=0, end=None):
- for i, elem in enumerate(list(iterator)[start:end], start):
+ for i, elem in list(enumerate(list(iterator)))[start:end]:
if item == elem:
return i
# This will not run in dynamo