Skip to content

Commit b5797d7

Browse files
committed
Fix typing
1 parent 8f756fb commit b5797d7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lightning/pytorch/cli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,12 @@
4848
set_config_read_mode,
4949
)
5050

51-
def _parse_known_args_patch(self, args=None, namespace=None):
51+
def _parse_known_args_patch(self, args: Any=None, namespace: Any=None) -> tuple[Any]:
5252
namespace, args = super(ArgumentParser, self)._parse_known_args(args, namespace, intermixed=False)
5353
return namespace, args
5454

5555
if sys.version_info >= (3, 12, 8):
56-
ArgumentParser._parse_known_args = _parse_known_args_patch
56+
setattr(ArgumentParser, "_parse_known_args", _parse_known_args_patch)
5757

5858
register_unresolvable_import_paths(torch) # Required until fix https://github.com/pytorch/pytorch/issues/74483
5959
set_config_read_mode(fsspec_enabled=True)

0 commit comments

Comments
 (0)