Bases: OptionDescriptor
Base class for descriptors, that check the value of options
Bases: OptionDescriptor
Base class for descriptors, that compute the value of options.
Bases: Mapping
Config object that allows dict-style and attribute-style access to an underlying dictionary and optionally verifies the options that are accessed.
Bases: SetupError
Base class for all config related errors.
Bases: ConfigError
Base class for errors related to processing a specific option
Bases: ConfigOptionError
Indicates that a required option is missing
Bases: object
Bases: ConfigOptionError
Indicates that an option check failed
Bases: type
Metaclass for options.
Classes with this metaclass, which are named not declared abstract by
setting the abstract keyword argument are added to the options
dictionary.
Bases: OptionDescriptor
Base class for descriptors, that check the value of options
Bases: OptionDescriptor
Base class for descriptors, that compute the value of options.
Bases: SetupError
Base class for all config related errors.
Bases: ConfigError
Base class for errors related to processing a specific option
Bases: ConfigOptionError
Indicates that a required option is missing
Bases: object
Bases: ConfigOptionError
Indicates that an option check failed
Bases: object
Convert regular functions into an OptionDescriptor
.
The function will be called with the option as its first argument.
Functions are automatically decorated with classmethod
, if they
are not already an instance of classmethod
or
staticmethod
.
f -- The function
Bases: type
Metaclass for options.
Classes with this metaclass, which are named not declared abstract by
setting the abstract keyword argument are added to the options
dictionary.
Check if a given object is a valid option name.
Valid option names are restricted to ASCII, start with an uppercase letter followed by uppercase letters (A-Z), digits (0-9) or the underscore (_).
name -- Name
True, if name is string and a valid option name, False otherwise
Checks for configuration option values
Bases: Check
Bases: Compute
Evaluate a format string using values from others config options.
Names of options are given as positional arguments and the corresponding values can be referred to using numbers in the format string. Keywords arguments can be used as well to bind other option values to specific names that are available in the format string.
Bases: object
Format string for producing RFC3339-compatible datetime strings
Bases: BaseLoader
A Jinja2 loader that loads templates with the yield_all_sources()
algorithm, if the template name is a relative.
The loader accepts pathlib.PurePath
objects in addition to strings
to identify templates.
Get the template source, filename and reload helper for a template.
It's passed the environment and template name and has to return a
tuple in the form (source, filename, uptodate)
or raise a
TemplateNotFound error if it can't locate the template.
The source part of the returned tuple must be the source of the template as unicode string or a ASCII bytestring. The filename should be the name of the file on the filesystem if it was loaded from there, otherwise None. The filename is used by python for the tracebacks if no loader extension is used.
The last item in the tuple is the uptodate function. If auto reloading is enabled it's always called to check if the template changed. No arguments are passed so the function must store the old state somewhere (for example in a closure). If it returns False the template will be reloaded.
Find all files in the directories on search_path
.
The algorithm is similar to systemd's unit search or the shell's PATH
search algorithm.
The directories on the search path are recursively walked in parallel.
Directories at the beginning of search_path
take precedence over later
directories, thus for files with the same name, the version in the
leftmost directory that contains the file is selected. The content of
directories is merged.
Symbolic links are never followed and the path of symbolic link is returned instead of the path of its target.
Symbolic links to /dev/null
are handled specially and denote a
deletion marker, that indicates that a file or directory should not be
included. For directories this means that no directories and their contents
to the right of the respective directory in the search path should be
included. Version of the directory and their contents that are on the search
path to the left of the deletion marker are still included.
The kind of paths that are returned depend on the kind of paths, that are
passed as search_path
. Relative search path components will yield
relative paths and absolute components absolute paths.
search_path -- A list of paths to directories
An iterator that yields pairs, where the first element is the
component of search_path
, where the file was found and the second
element is the path of the file.
Find all versions of name on search_path.
The principle behind the search algorithm are the same as
yield_all_sources()
. This function however will search for a single
file or directory named name
and return all versions of name
that
can be found on the search_path
. The version with the highest precedence
(i.e. from the leftmost component of search_path
that contains a version
of name
) will be returned first.
name -- The name of the file or directory
search_path -- A list of of paths to directories
An iterator that yields pairs, where the first element is the
component of search_path
, where the file was found and the second
element is the path of the file.
Bases: dict
A dictionary whose contents can also be accessed by attribute lookup.
Bases: AttributeAccessibleDict
Intercept attribute and dict item access. If the return value would be an
instance of Compute
, call the compute object with self as the only
argument.
Internally a stack of item names, that are looked up, is maintained to detect infinite recursion.
Bases: Mapping
Config object that allows dict-style and attribute-style access to an underlying dictionary and optionally verifies the options that are accessed.
Bases: ConfigError
Exception class for errors during config file loading.
Sphinx extension for Hades's options
Bases: Domain
directive name -> directive class
domain label: longer, more descriptive (used in messages)
domain name: should be short, but unique
Bases: ObjectDescription
[str
]
Add cross-reference IDs and entries to self.indexnode, if applicable.
name is whatever handle_signature()
returned.
Parse the signature string.
In this case the “signature” just consists of the option name.
sig -- The text coming directly after the directive: .. option :: <sig>
signode -- The docutils node which has been prepared for us
Bases: ClassDocumenter
Add a field list item
name -- Name of the field
body -- Body of the field, multiple lines will be indented
sourcename -- Source name
Called to see if a member can be documented by this Documenter.
Generate reST for the object given by self.name, and possibly for its members.
If more_content is given, include that content. If real_modname is given, use that module name to find attribute docs. If check_module is True, only generate if the object is defined in the module name it is imported from. If all_members is True, document all members.
name by which the directive is called (auto...) and the default generated directive name
priority if multiple documenters return True from can_document_member