| |
- builtins.tuple(builtins.object)
-
- LoadResult
- enum.Enum(builtins.object)
-
- FileExtension
class FileExtension(enum.Enum) |
|
FileExtension(*values)
A mapping of expected encoding type to file extensions. |
|
- Method resolution order:
- FileExtension
- enum.Enum
- builtins.object
Data and other attributes defined here:
- INI = <FileExtension.INI: ['ini', 'cfg']>
- JINJA = <FileExtension.JINJA: ['j2', 'jinja', 'j2_template', 'j2_macro']>
- JSON = <FileExtension.JSON: ['json']>
- TAR = <FileExtension.TAR: ['tar.gz', 'tgz', 'tar', 'tar.bz2', 'tar.lzma', 'tar.xz']>
- TOML = <FileExtension.TOML: ['toml']>
- UNKNOWN = <FileExtension.UNKNOWN: ['unknown']>
- YAML = <FileExtension.YAML: ['yaml', 'yml', 'eyaml']>
- ZIP = <FileExtension.ZIP: ['zip']>
Data descriptors inherited from enum.Enum:
- name
- The name of the Enum member.
- value
- The value of the Enum member.
Methods inherited from enum.EnumType:
- __contains__(value) from enum.EnumType
- Return True if `value` is in `cls`.
`value` is in `cls` if:
1) `value` is a member of `cls`, or
2) `value` is the value of one of the `cls`'s members.
- __getitem__(name) from enum.EnumType
- Return the member matching `name`.
- __iter__() from enum.EnumType
- Return members in definition order.
- __len__() from enum.EnumType
- Return the number of members (no aliases)
Readonly properties inherited from enum.EnumType:
- __members__
- Returns a mapping of member name->value.
This mapping lists all enum members, including aliases. Note that this
is a read-only view of the internal mapping.
|
class LoadResult(builtins.tuple) |
|
LoadResult(data: Dict[str, Union[str, int, float, bool, NoneType, Dict[str, Union[str, int, float, bool, NoneType]], List[Union[str, int, float, bool, NoneType]]]], success: bool, time_ns: int = -1)
An encapsulation of the result of loading raw data, the data collected and
whether or not it succeeded. |
|
- Method resolution order:
- LoadResult
- builtins.tuple
- builtins.object
Methods defined here:
- __bool__(self) -> bool
- A simple wrapper.
- __eq__(self, other: object) -> bool
- Don't compare timing when checking equivalence.
- __getnewargs__(self)
- Return self as a plain tuple. Used by copy and pickle.
- __repr__(self)
- Return a nicely formatted representation string
- _asdict(self)
- Return a new dict which maps field names to their values.
- _replace(self, /, **kwds)
- Return a new LoadResult object replacing specified fields with new values
- merge(self, other: 'LoadResult', is_left: bool = False, **kwargs) -> 'LoadResult'
- Merge two load results.
- require_success(self, path: Union[pathlib.Path, str]) -> None
- Raise a canonical exception if this result is a failure.
Class methods defined here:
- _make(iterable) from builtins.type
- Make a new LoadResult object from a sequence or iterable
Static methods defined here:
- __new__(_cls, data: Dict[str, Union[str, int, float, bool, NoneType, Dict[str, Union[str, int, float, bool, NoneType]], List[Union[str, int, float, bool, NoneType]]]], success: bool, time_ns: int = -1)
- Create new instance of LoadResult(data, success, time_ns)
Data descriptors defined here:
- data
- Alias for field number 0
- success
- Alias for field number 1
- time_ns
- Alias for field number 2
Data and other attributes defined here:
- __annotations__ = {'data': typing.Dict[str, typing.Union[str, int, float, b...[typing.Union[str, int, float, bool, NoneType]]]], 'success': <class 'bool'>, 'time_ns': <class 'int'>}
- __match_args__ = ('data', 'success', 'time_ns')
- __orig_bases__ = (<function NamedTuple>,)
- _field_defaults = {'time_ns': -1}
- _fields = ('data', 'success', 'time_ns')
Methods inherited from builtins.tuple:
- __add__(self, value, /)
- Return self+value.
- __contains__(self, key, /)
- Return bool(key in self).
- __ge__(self, value, /)
- Return self>=value.
- __getattribute__(self, name, /)
- Return getattr(self, name).
- __getitem__(self, key, /)
- Return self[key].
- __gt__(self, value, /)
- Return self>value.
- __hash__(self, /)
- Return hash(self).
- __iter__(self, /)
- Implement iter(self).
- __le__(self, value, /)
- Return self<=value.
- __len__(self, /)
- Return len(self).
- __lt__(self, value, /)
- Return self<value.
- __mul__(self, value, /)
- Return self*value.
- __ne__(self, value, /)
- Return self!=value.
- __rmul__(self, value, /)
- Return value*self.
- count(self, value, /)
- Return number of occurrences of value.
- index(self, value, start=0, stop=9223372036854775807, /)
- Return first index of value.
Raises ValueError if the value is not present.
Class methods inherited from builtins.tuple:
- __class_getitem__(...) from builtins.type
- See PEP 585
| |