src/nitpick/plugins/pre_commit.py
def enforce_hooks(self) -> Iterator[Fuss]:
        """Enforce the repositories configured in pre-commit."""
        self.actual_hooks = PreCommitHook.get_all_hooks_from(self.actual_yaml.as_data.get(KEY_REPOS))
        self.actual_hooks_by_key = {name: index for index, name in enumerate(self.actual_hooks)}
        self.actual_hooks_by_index = list(self.actual_hooks)

        all_expected_blocks: List[OrderedDict] = self.expected_config.get(KEY_REPOS, [])
        for index, data in enumerate(all_expected_blocks):
            if KEY_YAML in data:
                yield from self.enforce_repo_block(data)
                continue

            yield from self.enforce_repo_old_format(index, data)
Enforce the repositories configured in pre-commit.
Enforce the repositories configured in pre-commit.
Enforce the repositories configured in pre - commit .
def enforce_hooks(self) -> Iterator[Fuss]:
        self.actual_hooks = PreCommitHook.get_all_hooks_from(self.actual_yaml.as_data.get(KEY_REPOS))
        self.actual_hooks_by_key = {name: index for index, name in enumerate(self.actual_hooks)}
        self.actual_hooks_by_index = list(self.actual_hooks)
        all_expected_blocks: List[OrderedDict] = self.expected_config.get(KEY_REPOS, [])
        for index, data in enumerate(all_expected_blocks):
            if KEY_YAML in data:
                yield from self.enforce_repo_block(data)
                continue
            yield from self.enforce_repo_old_format(index, data)
def enforce_hooks ( self ) -> Iterator [ Fuss ] : self . actual_hooks = PreCommitHook . get_all_hooks_from ( self . actual_yaml . as_data . get ( KEY_REPOS ) ) self . actual_hooks_by_key = { name : index for index , name in enumerate ( self . actual_hooks ) } self . actual_hooks_by_index = list ( self . actual_hooks ) all_expected_blocks : List [ OrderedDict ] = self . expected_config . get ( KEY_REPOS , [ ] ) for index , data in enumerate ( all_expected_blocks ) : if KEY_YAML in data : yield from self . enforce_repo_block ( data ) continue yield from self . enforce_repo_old_format ( index , data )
Enforce the repositories configured in pre-commit.
Enforce the repositories configured in pre - commit .
"""Enforce the repositories configured in pre-commit."""
self