project_config.project module
High level logic for checking a project.
- exception project_config.project.ConditionalsFalseResult[source]
Bases:
project_config.project.InterruptCheck
A conditional must skip a rule.
- exception project_config.project.InterruptCheck[source]
Bases:
Exception
An action has reported an invalid context for a rule.
This exceptions prevents to continue executing subsecuents rules.
- class project_config.project.Project(config_path: str, rootdir: str, reporter_: Dict[str, Any], color: bool, _actions_context: Optional[project_config.types.ActionsContext] = None, fix: bool = False, only_hints: bool = False)[source]
Bases:
object
Wrapper for a single project.
This class encapsulates all the high level logic to execute all CLI commands against a project.
Its public method expose the commands that can be executed through the CLI.
- Parameters
- _actions_context: Optional[project_config.types.ActionsContext] = None
- _process_conditionals_for_rule(conditionals: List[str], tree: project_config.tree.Tree, rule: project_config.types.Rule, rule_index: int) None [source]
- check(args: argparse.Namespace) None [source]
Checks that the styles configured for a project match.
Raises an error if report errors.
- clean(args: argparse.Namespace) None [source]
Cleaning command.
- init(args: argparse.Namespace) None [source]
Initialize the configuration for a project.
- show(args: argparse.Namespace) None [source]
Show configuration or fetched style for a project.
It will depend in the
args.data
property.