Skip to content

Commit 84776d7

Browse files
Revert "[BE]: Update mypy to 1.10.0 (#127717)"
This reverts commit 30213ab. Reverted #127717 on behalf of https://github.com/huydhn due to I am not sure why but the failures look legit and they are showing up in trunk https://hud.pytorch.org/pytorch/pytorch/commit/30213ab0a7b27277e76ea9dd707ce629a63d91ee ([comment](#127717 (comment)))
1 parent e57f51b commit 84776d7

File tree

6 files changed

+7
-11
lines changed

6 files changed

+7
-11
lines changed

.ci/docker/requirements-ci.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,10 @@ librosa>=0.6.2 ; python_version < "3.11"
8585
#Pinned versions:
8686
#test that import:
8787

88-
mypy==1.10.0
88+
mypy==1.9.0
8989
# Pin MyPy version because new errors are likely to appear with each release
9090
#Description: linter
91-
#Pinned versions: 1.10.0
91+
#Pinned versions: 1.9.0
9292
#test that import: test_typing.py, test_type_hints.py
9393

9494
networkx==2.8.8

.lintrunner.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ init_command = [
136136
'numpy==1.24.3 ; python_version == "3.8"',
137137
'numpy==1.26.0 ; python_version >= "3.9"',
138138
'expecttest==0.1.6',
139-
'mypy==1.10.0',
139+
'mypy==1.9.0',
140140
'sympy==1.11.1',
141141
'types-requests==2.27.25',
142142
'types-PyYAML==6.0.7',

torch/ao/quantization/fx/fuse_handler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class DefaultFuseHandler(FuseHandler):
4444
def __init__(
4545
self,
4646
node: Node):
47-
super().__init__(node) # type:ignore[safe-super]
47+
super().__init__(node)
4848

4949
def fuse(self,
5050
load_arg: Callable,

torch/distributed/_composable/fsdp/fully_shard.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -342,8 +342,4 @@ def wrapped_method(self, *args, **kwargs):
342342
return fsdp_state._post_forward(self, args, out)
343343

344344
# Use `__get__` to make `wrapped_method` an instance method
345-
setattr(
346-
module,
347-
method_name,
348-
wrapped_method.__get__(module, type(module)), # type:ignore[attr-defined]
349-
)
345+
setattr(module, method_name, wrapped_method.__get__(module, type(module)))

torch/distributions/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ class lazy_property:
117117

118118
def __init__(self, wrapped):
119119
self.wrapped = wrapped
120-
update_wrapper(self, wrapped) # type:ignore[arg-type]
120+
update_wrapper(self, wrapped)
121121

122122
def __get__(self, instance, obj_type=None):
123123
if instance is None:

torch/fx/experimental/rewriter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def change_func_globals(f, globals):
6060
closure=f.__closure__,
6161
)
6262
g = functools.update_wrapper(g, f)
63-
g.__kwdefaults__ = copy.copy(f.__kwdefaults__) # type:ignore[attr-defined]
63+
g.__kwdefaults__ = copy.copy(f.__kwdefaults__)
6464
return g
6565
# Return the correct FunctionType object
6666
return change_func_globals(fn_compiled, globals=fn.__globals__)

0 commit comments

Comments
 (0)