diff options
| author | Maciej Pasternacki <maciejp@ro.co> | 2022-02-08 20:48:39 +0100 |
|---|---|---|
| committer | Maciej Pasternacki <maciejp@ro.co> | 2022-02-08 20:48:39 +0100 |
| commit | aec4367d5146b318c9fb02e128d6e5bfe84fa2f9 (patch) | |
| tree | 986dda7b04a0808a8f7b14c46fbf8621b97db4ca /tools | |
| parent | 557787c8b3957f7a4f04094118b64afa3e175a78 (diff) | |
| download | python-setuptools-git-aec4367d5146b318c9fb02e128d6e5bfe84fa2f9.tar.gz | |
Clean also .pyi of more_itertools
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/vendored.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tools/vendored.py b/tools/vendored.py index fc73933d..9428e752 100644 --- a/tools/vendored.py +++ b/tools/vendored.py @@ -68,10 +68,11 @@ def rewrite_more_itertools(pkg_files: Path): """ Rewrite more_itertools to remove unused more_itertools.more """ - (pkg_files / "more.py").remove() - init_file = pkg_files / "__init__.py" - init_text = "".join(ln for ln in init_file.lines() if "from .more " not in ln) - init_file.write_text(init_text) + for more_file in pkg_files.glob("more.py*"): + more_file.remove() + for init_file in pkg_files.glob("__init__.py*"): + text = "".join(ln for ln in init_file.lines() if "from .more " not in ln) + init_file.write_text(text) def clean(vendor): |
