diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2022-09-12 13:24:00 -0700 |
---|---|---|
committer | Eli Schwartz <eschwartz93@gmail.com> | 2022-09-12 18:51:27 -0400 |
commit | b5a66ce2a38d6f760a17833f3efe83c10b000116 (patch) | |
tree | b2c4f33a5714dbf386bafec665a993bf9b12a3ad | |
parent | c555724b4953631581acadf40f13e6001c259e97 (diff) | |
download | meson-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.py | 2 |
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 |