module documentation

General purpose utility functions.

Function error Undocumented
Function findClassFromDottedName Looks up a class by full name.
Function parse_path Parse a str path to a Path object using resolve_path().
Function parse_privacy_tuple Parse string like 'public:match*' to a tuple (PrivacyClass.PUBLIC, 'match*').
Function partialclass Bind a class to be created with some predefined __init__ arguments.
Function resolve_path Parse a given path string to a Path object.
Type Variable T Undocumented
def error(msg: str, *args: object) -> NoReturn: (source)

Undocumented

def findClassFromDottedName(dottedname: str, optionname: str, base_class: Union[str, Type[T]]) -> Type[T]: (source)

Looks up a class by full name.

Raises
ValueErrorIf can't find the class.
def parse_path(value: str, opt: str) -> Path: (source)

Parse a str path to a Path object using resolve_path().

Watch out, prints a message and SystemExits on error!

def parse_privacy_tuple(value: str, opt: str) -> Tuple[model.PrivacyClass, str]: (source)

Parse string like 'public:match*' to a tuple (PrivacyClass.PUBLIC, 'match*').

Watch out, prints a message and SystemExits on error!

def partialclass(cls: Type[Any], *args: Any, **kwds: Any) -> Type[Any]: (source)

Bind a class to be created with some predefined __init__ arguments.

def resolve_path(path: str) -> Path: (source)

Parse a given path string to a Path object.

The path is converted to an absolute path, as required by System.setSourceHref(). The path does not need to exist.

Watch out, prints a message and SystemExits on error!

Undocumented

Value
TypeVar('T')