aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2022-09-12 13:24:00 -0700
committerEli Schwartz <eschwartz93@gmail.com>2022-09-12 18:51:27 -0400
commitb5a66ce2a38d6f760a17833f3efe83c10b000116 (patch)
treeb2c4f33a5714dbf386bafec665a993bf9b12a3ad
parentc555724b4953631581acadf40f13e6001c259e97 (diff)
downloadmeson-b5a66ce2a38d6f760a17833f3efe83c10b000116.zip
meson-b5a66ce2a38d6f760a17833f3efe83c10b000116.tar.gz
meson-b5a66ce2a38d6f760a17833f3efe83c10b000116.tar.bz2
arglist: use typing.MutableSequence instead of collections
In the long run collections is the right thing to use, but until we can require 3.9.x as the minimum we cannot annotate the collections.abc version, only the typing version. This allows correct type annotations in users of `CompilerArgs`, as mypy (and friends) can determine that `CompilerArgs` is ~= `T.Sequence[str]`
-rw-r--r--mesonbuild/arglist.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mesonbuild/arglist.py b/mesonbuild/arglist.py
index 3ed9621..48fa6ab 100644
--- a/mesonbuild/arglist.py
+++ b/mesonbuild/arglist.py
@@ -53,7 +53,7 @@ class Dedup(enum.Enum):
OVERRIDDEN = 2
-class CompilerArgs(collections.abc.MutableSequence):
+class CompilerArgs(T.MutableSequence[str]):
'''
List-like class that manages a list of compiler arguments. Should be used
while constructing compiler arguments from various sources. Can be