nitpick.style package
Styles parsing and merging.
- class nitpick.style.StyleManager(project: Project, offline: bool, cache_option: str)[source]
Bases:
object
Include styles recursively from one another.
- property cache_dir: Path
Clear the cache directory (on the project root or on the current directory).
- static file_field_pair(filename: str, base_file_class: type[NitpickPlugin]) dict[str, fields.Field] [source]
Return a schema field with info from a config file class.
- find_initial_styles(configured_styles: Sequence[str], base: str | None = None) Iterator[Fuss] [source]
Find the initial style(s) and include them.
base is the URL for the source of the initial styles, and is used to resolve relative references. If omitted, defaults to the project root.
- static get_default_style_url(github=False) furl [source]
Return the URL of the default style/preset.
- include_multiple_styles(chosen_styles: Iterable[furl]) Iterator[Fuss] [source]
Include a list of styles (or just one) into this style tree.
- load_fixed_name_plugins() Set[Type[NitpickPlugin]] [source]
Separate classes with fixed file names from classes with dynamic files names.
- nitpick.style.parse_cache_option(cache_option: str) tuple[CachingEnum, timedelta | int] [source]
Parse the cache option provided on pyproject.toml.
If no cache if provided or is invalid, the default is one hour.
Subpackages
Submodules
- nitpick.style.cache module
- nitpick.style.config module
- nitpick.style.core module
StyleManager
StyleManager.cache_dir
StyleManager.cache_option
StyleManager.file_field_pair()
StyleManager.find_initial_styles()
StyleManager.get_default_style_url()
StyleManager.include_multiple_styles()
StyleManager.load_fixed_name_plugins()
StyleManager.merge_toml_dict()
StyleManager.offline
StyleManager.project
StyleManager.rebuild_dynamic_schema()