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.
This commit is contained in:
Dylan Baker 2021-08-10 14:27:47 -07:00 committed by Daniel Mensinger
parent d80cfa27c9
commit c11eb86995
1 changed files with 5 additions and 0 deletions

View File

@ -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 = []