diff options
| author | Eli Schwartz <eschwartz93@gmail.com> | 2025-09-21 06:38:33 -0400 |
|---|---|---|
| committer | Eli Schwartz <eschwartz93@gmail.com> | 2025-09-25 12:58:43 -0400 |
| commit | 26ad2449b7957a62a2fa212f9b9bcbcb410d2784 (patch) | |
| tree | 80be8901bb9957c1074158550f3ddf581fb5d8b7 /mesonbuild/scripts | |
| parent | ee0a1c6b5bb7c42096cf6ea088865dd841dec438 (diff) | |
| download | meson-26ad2449b7957a62a2fa212f9b9bcbcb410d2784.tar.gz | |
mypy: fix typing looseness regression in 3.13
glob can be a generator or an iterator depending on python version. We
would rather not care about this (and officially these are the same,
except not). We just pass it to "accepts_iterable". But nonetheless, we
are forced to care because we hold the value. Sad.
Diffstat (limited to 'mesonbuild/scripts')
| -rw-r--r-- | mesonbuild/scripts/run_tool.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mesonbuild/scripts/run_tool.py b/mesonbuild/scripts/run_tool.py index 6181c6d3c..e7300c14e 100644 --- a/mesonbuild/scripts/run_tool.py +++ b/mesonbuild/scripts/run_tool.py @@ -98,7 +98,7 @@ def parse_pattern_file(fname: Path) -> T.List[str]: def all_clike_files(name: str, srcdir: Path, builddir: Path) -> T.Iterable[Path]: patterns = parse_pattern_file(srcdir / f'.{name}-include') - globs: T.Union[T.List[T.List[Path]], T.List[T.Generator[Path, None, None]]] + globs: T.Sequence[T.Union[T.List[Path], T.Iterator[Path], T.Generator[Path, None, None]]] if patterns: globs = [srcdir.glob(p) for p in patterns] else: |
