diff options
author | Eli Schwartz <eschwartz@archlinux.org> | 2021-10-31 17:28:30 -0400 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2021-11-01 00:46:51 +0200 |
commit | 384151c54198fcd4a9be6d4df984c9f09823a458 (patch) | |
tree | e1f024d7f1b2224d1051c0d1af280f1226b00a95 /mesonbuild/interpreterbase | |
parent | f36c01ede9afa1492f96562e4f9be6b261966225 (diff) | |
download | meson-384151c54198fcd4a9be6d4df984c9f09823a458.zip meson-384151c54198fcd4a9be6d4df984c9f09823a458.tar.gz meson-384151c54198fcd4a9be6d4df984c9f09823a458.tar.bz2 |
migrate python 3.5 compatible superclass variable annotations to 3.6
As we now require python 3.6, we can declare their types without
initializing them.
Diffstat (limited to 'mesonbuild/interpreterbase')
-rw-r--r-- | mesonbuild/interpreterbase/decorators.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/mesonbuild/interpreterbase/decorators.py b/mesonbuild/interpreterbase/decorators.py index 901c77a..fc0b8e7 100644 --- a/mesonbuild/interpreterbase/decorators.py +++ b/mesonbuild/interpreterbase/decorators.py @@ -551,9 +551,7 @@ def typed_kwargs(name: str, *types: KwargInfo) -> T.Callable[..., T.Any]: class FeatureCheckBase(metaclass=abc.ABCMeta): "Base class for feature version checks" - # In python 3.6 we can just forward declare this, but in 3.5 we can't - # This will be overwritten by the subclasses by necessity - feature_registry = {} # type: T.ClassVar[T.Dict[str, T.Dict[str, T.Set[str]]]] + feature_registry: T.ClassVar[T.Dict[str, T.Dict[str, T.Set[str]]]] def __init__(self, feature_name: str, version: str, extra_message: T.Optional[str] = None): self.feature_name = feature_name # type: str |