How to use the retype.walk_not_git_ignored function in retype

To help you get started, we’ve selected a few retype examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ambv / retype / tests / test_discovery.py View on Github external
def test_walk(case: Case, build, monkeypatch):
    path = build(case.files)
    dest = path / case.cwd
    monkeypatch.chdir(dest)
    result = [
        str(f.relative_to(dest))
        for f in walk_not_git_ignored(
            dest, lambda p: p.suffix == ".py", extra_ignore=[]
        )
    ]
    expected = [str(f) for f in case.found]
    assert result == expected