コード例 #1
0
 def get_name(cls) -> str:
     """ Gets the name of this method class. """
     name = getattr(cls, "name", None)
     if name is None:
         name = camel_case(cls.__qualname__)
         name = remove_suffix(name, "_method")
     return name
コード例 #2
0
 def get_name(cls) -> str:
     """ Gets the name of this Setting. """
     # LightningDataModule has a `name` class attribute of `...`!
     if getattr(cls, "name", None) != Ellipsis:
         return cls.name
     name = camel_case(cls.__qualname__)
     return remove_suffix(name, "_setting")