Skip to content

Commit 8b8bb2e

Browse files
committed
type: ignore[misc]
1 parent a35f1fe commit 8b8bb2e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/lightning/fabric/utilities/data.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -366,8 +366,8 @@ def _replace_dunder_methods(base_cls: type, store_explicit_arg: Optional[str] =
366366
for cls in classes:
367367
# Check that __init__ belongs to the class
368368
# https://stackoverflow.com/a/5253424
369-
if "__init__" in cls.__dict__:
370-
cls.__old__init__ = cls.__init__
369+
if "__init__" in cls.__dict__: # type: ignore[misc]
370+
cls.__old__init__ = cls.__init__ # type: ignore[misc]
371371
cls.__init__ = _wrap_init_method(cls.__init__, store_explicit_arg)
372372

373373
# we want at least one setattr/delattr in the chain to be patched and it can happen, that none of the subclasses

src/lightning/pytorch/utilities/parsing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def parse_class_init_keys(cls: type) -> tuple[str, Optional[str], Optional[str]]
6161
('self', 'my_args', 'my_kwargs')
6262
6363
"""
64-
init_parameters = inspect.signature(cls.__init__).parameters
64+
init_parameters = inspect.signature(cls.__init__).parameters # type: ignore[misc]
6565
# docs claims the params are always ordered
6666
# https://docs.python.org/3/library/inspect.html#inspect.Signature.parameters
6767
init_params = list(init_parameters.values())

0 commit comments

Comments
 (0)