project_config.config.style package

Style loader, blender and checker.

exception project_config.config.style.ProjectConfigInvalidStyle(config_path: str, error_messages: list[str])[source]

Bases: ProjectConfigInvalidConfigSchema

Invalid style error.

class project_config.config.style.Style(config: Any)[source]

Bases: object

Wrapper for style loader, blender and checker.

_add_new_rules_plugins_to_style(style: StyleType, new_rules: list[Rule], new_plugins: list[str], prepend: bool = False) None[source]
_extend_partial_style(parent_style_url: str, style: StyleType) StyleLoaderIterator[source]
_load_styles_from_config() StyleLoaderIterator[source]

Load styles yielding error messages if found.

Error messages are of type string and style is of type dict. If the first yielded value is a dict, we have a style without errors.

_validate_style_preparing_new_plugins(style_url: str, style: Any) Iterator[str][source]
classmethod from_config(config: Any) Style[source]

Loads styles to the configuration passed as argument.

project_config.config.style._prefetch_urls(config_dict: ConfigType) None[source]

Prefetch urls concurrently and store them in cache.

This function is used to store urls in cache before they are used, so the network calls are speedup a lot.

Parameters:

config_dict – The config_dict object.