MCPcopy Create free account
hub / github.com/python-cmd2/cmd2 / _fully_qualified_name

Method _fully_qualified_name

cmd2/cmd2.py:250–255  ·  view source on GitHub ↗

Return the fully qualified name of a method or None if a method wasn't passed in.

(command_method: BoundCommandFunc)

Source from the content-addressed store, hash-verified

248
249 @staticmethod
250 def _fully_qualified_name(command_method: BoundCommandFunc) -> str:
251 """Return the fully qualified name of a method or None if a method wasn't passed in."""
252 try:
253 return f"{command_method.__module__}.{command_method.__qualname__}"
254 except AttributeError:
255 return ""
256
257 def __contains__(self, command_method: BoundCommandFunc) -> bool:
258 """Return whether a given method's parser is in self.

Callers 2

getMethod · 0.95
removeMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected