From 548c9adad44ce88788356180fc2ec8e3665b3952 Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Mon, 7 Nov 2022 15:00:12 -0500 Subject: Remove useless EmptyExternalProgram It is only used by Environment.get_exe_wrapper() and every callers were handling None already. Type annotation was wrong, it already could return None for the case an exe wrapper is needed but none is provided. --- mesonbuild/programs.py | 19 ------------------- 1 file changed, 19 deletions(-) (limited to 'mesonbuild/programs.py') diff --git a/mesonbuild/programs.py b/mesonbuild/programs.py index 458fabac9..1d616aaf9 100644 --- a/mesonbuild/programs.py +++ b/mesonbuild/programs.py @@ -345,25 +345,6 @@ class NonExistingExternalProgram(ExternalProgram): # lgtm [py/missing-call-to-i return False -class EmptyExternalProgram(ExternalProgram): # lgtm [py/missing-call-to-init] - ''' - A program object that returns an empty list of commands. Used for cases - such as a cross file exe_wrapper to represent that it's not required. - ''' - - def __init__(self) -> None: - self.name = None - self.command = [] - self.path = None - - def __repr__(self) -> str: - r = '<{} {!r} -> {!r}>' - return r.format(self.__class__.__name__, self.name, self.command) - - def found(self) -> bool: - return True - - class OverrideProgram(ExternalProgram): """A script overriding a program.""" -- cgit v1.2.3