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: project_config.config.exceptions.ProjectConfigInvalidConfigSchema

Invalid style error.

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

Bases: object

Wrapper for style loader, blender and checker.

Parameters

config (dict) – Configuration for the project.

_add_new_rules_plugins_to_style(style: Dict[str, List[Any]], new_rules: List[project_config.types.Rule], new_plugins: List[type], prepend: bool = False) None[source]
_extend_partial_style(parent_style_url: str, style: Dict[str, List[Any]]) Iterator[Union[Dict[str, List[Any]], str]][source]
_load_styles_from_config() Iterator[Union[Dict[str, List[Any]], str]][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) project_config.config.style.Style[source]

Loads styles to the configuration passed as argument.

project_config.config.style._prefetch_urls(config: Any) 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 – The config object.