From cd4bdefee421f47cd05f72953716586fcdd60c4a Mon Sep 17 00:00:00 2001 From: Vizonex Date: Tue, 18 Nov 2025 17:14:50 -0600 Subject: [PATCH] add wildcard support --- sort_all.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sort_all.py b/sort_all.py index 3c1a0d3..8933d9b 100644 --- a/sort_all.py +++ b/sort_all.py @@ -3,6 +3,8 @@ import sys import warnings from collections.abc import Sequence +from glob import glob +from itertools import chain from operator import attrgetter from typing import Optional @@ -209,7 +211,7 @@ def main(argv: Optional[Sequence[str]] = None) -> int: args = parser.parse_args(argv) retv = 0 - for filename in args.filenames: + for filename in chain.from_iterable(*map(glob, args.filenames)): if not filename.endswith((".py", ".pyx", ".pyi", ".pyd")): continue retv |= fix_file(