src/nitpick/plugins/pre_commit.py
def initial_contents(self) -> str:
        """Suggest the initial content for this missing file."""
        original = dict(self.expected_config).copy()
        original_repos = original.pop(KEY_REPOS, [])
        suggested: Dict[str, Any] = {KEY_REPOS: []} if original_repos else {}
        for repo in original_repos:
            if KEY_YAML not in repo:
                continue
            repo_list = YAMLFormat(string=repo[KEY_YAML]).as_list
            suggested[KEY_REPOS].extend(repo_list)
        suggested.update(original)
        return YAMLFormat(data=suggested).reformatted
Suggest the initial content for this missing file.
Suggest the initial content for this missing file.
Suggest the initial content for this missing file .
def initial_contents(self) -> str:
        original = dict(self.expected_config).copy()
        original_repos = original.pop(KEY_REPOS, [])
        suggested: Dict[str, Any] = {KEY_REPOS: []} if original_repos else {}
        for repo in original_repos:
            if KEY_YAML not in repo:
                continue
            repo_list = YAMLFormat(string=repo[KEY_YAML]).as_list
            suggested[KEY_REPOS].extend(repo_list)
        suggested.update(original)
        return YAMLFormat(data=suggested).reformatted
def initial_contents ( self ) -> str : original = dict ( self . expected_config ) . copy ( ) original_repos = original . pop ( KEY_REPOS , [ ] ) suggested : Dict [ str , Any ] = { KEY_REPOS : [ ] } if original_repos else { } for repo in original_repos : if KEY_YAML not in repo : continue repo_list = YAMLFormat ( string = repo [ KEY_YAML ] ) . as_list suggested [ KEY_REPOS ] . extend ( repo_list ) suggested . update ( original ) return YAMLFormat ( data = suggested ) . reformatted
Suggest the initial content for this missing file.
Suggest the initial content for this missing file .
"""Suggest the initial content for this missing file."""
self