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]`
pull/10756/head
Dylan Baker 3 years ago committed by Eli Schwartz
parent c555724b49
commit b5a66ce2a3
  1. 2
      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

Loading…
Cancel
Save