aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/compilers.py
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2021-10-31 17:28:30 -0400
committerJussi Pakkanen <jpakkane@gmail.com>2021-11-01 00:46:51 +0200
commit384151c54198fcd4a9be6d4df984c9f09823a458 (patch)
treee1f024d7f1b2224d1051c0d1af280f1226b00a95 /mesonbuild/compilers/compilers.py
parentf36c01ede9afa1492f96562e4f9be6b261966225 (diff)
downloadmeson-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/compilers/compilers.py')
-rw-r--r--mesonbuild/compilers/compilers.py8
1 files changed, 3 insertions, 5 deletions
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',