From c11eb869958462dff67a020e2835c193edba56a4 Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Tue, 10 Aug 2021 14:27:47 -0700 Subject: [PATCH] build: add forward delcarations to CommandBase class It would probably be better if CommandBase had an initializer so it could set the depend_files and dependencies attributes itself, but this will make mypy happier. --- mesonbuild/build.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mesonbuild/build.py b/mesonbuild/build.py index 8ecb25932..137198517 100644 --- a/mesonbuild/build.py +++ b/mesonbuild/build.py @@ -2226,6 +2226,11 @@ class BothLibraries(SecondLevelHolder): raise MesonBugException(f'self._preferred_library == "{self._preferred_library}" is neither "shared" nor "static".') class CommandBase: + + depend_files: T.List[File] + dependencies: T.List[T.Union[BuildTarget, 'CustomTarget']] + subproject: str + def flatten_command(self, cmd): cmd = listify(cmd) final_cmd = []