Skip to content

Commit

Permalink
Allows lambda to take an optional unused argument
Browse files Browse the repository at this point in the history
  • Loading branch information
marksgraham committed Oct 26, 2023
1 parent e2427e5 commit 393cdc6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion monai/networks/layers/factories.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def add_factory_class(self, name: str, cls: type, desc: str = None) -> None:
"""
Adds a factory function which returns the given class.
"""
self.add(name.upper(), desc or cls.__doc__, lambda: cls)
self.add(name.upper(), desc or cls.__doc__, lambda x=None: cls)
self.__doc__ = (
"The supported member"
+ ("s are: " if len(self.names) > 1 else " is: ")
Expand Down

0 comments on commit 393cdc6

Please sign in to comment.