From 384151c54198fcd4a9be6d4df984c9f09823a458 Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Sun, 31 Oct 2021 17:28:30 -0400 Subject: 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. --- mesonbuild/compilers/compilers.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'mesonbuild/compilers/compilers.py') diff --git a/mesonbuild/compilers/compilers.py b/mesonbuild/compilers/compilers.py index 4868ded..e0745c2 100644 --- a/mesonbuild/compilers/compilers.py +++ b/mesonbuild/compilers/compilers.py @@ -479,11 +479,9 @@ class Compiler(HoldableObject, metaclass=abc.ABCMeta): LINKER_PREFIX = None # type: T.Union[None, str, T.List[str]] INVOKES_LINKER = True - # TODO: these could be forward declarations once we drop 3.5 support - if T.TYPE_CHECKING: - language = 'unset' - id = '' - warn_args = {} # type: T.Dict[str, T.List[str]] + language: str + id: str + warn_args: T.Dict[str, T.List[str]] def __init__(self, exelist: T.List[str], version: str, for_machine: MachineChoice, info: 'MachineInfo', -- cgit v1.1