pymhf.core.importing module#

class pymhf.core.importing.ModInfo(name: str, disabled: bool)#

Bases: NamedTuple

Details of a mod class which can be determined without importing the file it’s defined in.

disabled: bool#

Alias for field number 1

name: str#

Alias for field number 0

pymhf.core.importing.get_mod_infos(data: str) → list[ModInfo]#

Parse the provided data and return the details of every mod class defined in it.

This allows the name of each mod, and whether it has been decorated with @disable, to be determined without importing the file they are defined in.

pymhf.core.importing.import_file(fpath: str) → ModuleType | None#
pymhf.core.importing.library_path_from_name(name: str) → str | None#
pymhf.core.importing.parse_file_for_mod(data: str) → bool#

Parse the provided data and determine if there is at least one mod class in it.