aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/mesonlib
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2021-12-16 22:48:25 -0500
committerEli Schwartz <eschwartz@archlinux.org>2021-12-30 15:15:25 -0500
commit19c9f32cefdffb7d633eedada2b31059301fb106 (patch)
tree936c2ed8267e0d151841643113c18098793ac68d /mesonbuild/mesonlib
parentdb528e3bb9c986a28abf38ca5d28e32506d388e9 (diff)
downloadmeson-19c9f32cefdffb7d633eedada2b31059301fb106.zip
meson-19c9f32cefdffb7d633eedada2b31059301fb106.tar.gz
meson-19c9f32cefdffb7d633eedada2b31059301fb106.tar.bz2
correct type annotations for File.endswith
It should accept whatever str.endswith accepts, which means optionally a tuple of options.
Diffstat (limited to 'mesonbuild/mesonlib')
-rw-r--r--mesonbuild/mesonlib/universal.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mesonbuild/mesonlib/universal.py b/mesonbuild/mesonlib/universal.py
index bae80d4..493acef 100644
--- a/mesonbuild/mesonlib/universal.py
+++ b/mesonbuild/mesonlib/universal.py
@@ -425,7 +425,7 @@ class File(HoldableObject):
def suffix(self) -> str:
return os.path.splitext(self.fname)[1][1:].lower()
- def endswith(self, ending: str) -> bool:
+ def endswith(self, ending: T.Union[str, T.Tuple[str, ...]]) -> bool:
return self.fname.endswith(ending)
def split(self, s: str, maxsplit: int = -1) -> T.List[str]: