Exemplo n.º 1
0
def find_repos(config: Config) -> Set[str]:
    return (repos_matching(
        config,
        ('flake8', '--', '.pre-commit-config.yaml'),
    ) - repos_matching(
        config,
        ('pycqa/flake8', '--', '.pre-commit-config.yaml'),
    ))
Exemplo n.º 2
0
def test_repos_matching(file_config_files):
    config = load_config(file_config_files.cfg)
    ret = repos_matching(config, ['^OH'])
    assert ret == {
        file_config_files.output_dir.join('repo1'),
        file_config_files.output_dir.join('repo2'),
    }
    ret = repos_matching(config, ['^OHAI'])
    assert ret == {file_config_files.output_dir.join('repo1')}
    ret = repos_matching(config, ['nope'])
    assert ret == set()
Exemplo n.º 3
0
def find_repos(config: Config) -> Set[str]:
    return repos_matching(config, ('=', '--', 'setup.py'))
Exemplo n.º 4
0
def find_repos(config):
    return repos_matching(config, ("black", "--", "requirements.txt"))
Exemplo n.º 5
0
def find_repos(config: Config) -> Set[str]:
    return (repos_matching(config, ('$HOME/.pre-commit', '--', TRAVIS))
            | repos_matching(config,
                             (r'%USERPROFILE%\\.pre-commit', '--', APPVEYOR)))
Exemplo n.º 6
0
def find_repos(config: Config) -> set[str]:
    query = ('ref: refs/tags/', '--', 'azure-pipelines.yml')
    return repos_matching(config, query)
Exemplo n.º 7
0
def find_repos(config: Config) -> Set[str]:
    return repos_matching(
        config,
        ("", "--", "LICENSE", "LICENSE.txt"),
    )
Exemplo n.º 8
0
def find_repos(config: Config) -> set[str]:
    return repos_matching(config, ('', '--', '.pre-commit-config.yaml'))
Exemplo n.º 9
0
def find_repos(config: Config) -> Set[str]:
    return repos_matching(
        config,
        (r"yyyy", "--", "LICENSE"),
    )
def find_repos(config: Config) -> set[str]:
    return repos_matching(
        config,
        ('autopep8-wrapper', '--', '.pre-commit-config.yaml'),
    )
Exemplo n.º 11
0
def find_repos(config):
    return repos_matching(config, ('', '--', '.pre-commit-config.yaml'))