How to use the retype.retype_file 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_retype.py View on Github external
def test_does_not_error_on_empty_file(tmp_path):
    init_py = tmp_path / "__init__.py"
    init_py.write_text("")
    assert len(init_py.read_text()) == 0
    retype_file(init_py, tmp_path, tmp_path)
    assert len(init_py.read_text()) == 0