Skip to content

Commit 7858262

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

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
@@ -367,8 +367,8 @@ def _replace_dunder_methods(base_cls: type, store_explicit_arg: Optional[str] =
367367
# Check that __init__ belongs to the class
368368
# https://stackoverflow.com/a/5253424
369369
if "__init__" in cls.__dict__:
370-
cls.__old__init__ = cls.__init__
371-
cls.__init__ = _wrap_init_method(cls.__init__, store_explicit_arg)
370+
cls.__old__init__ = cls.__init__ # type: ignore[misc]
371+
cls.__init__ = _wrap_init_method(cls.__init__, store_explicit_arg) # type: ignore[misc]
372372

373373
# we want at least one setattr/delattr in the chain to be patched and it can happen, that none of the subclasses
374374
# implement `__setattr__`/`__delattr__`. Therefore, we are always patching the `base_cls`

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)