diff --git a/src/molecule/command/base.py b/src/molecule/command/base.py index 2ecbc9ac2..d6744966a 100644 --- a/src/molecule/command/base.py +++ b/src/molecule/command/base.py @@ -78,7 +78,7 @@ def __init_subclass__(cls) -> None: @abc.abstractmethod def execute( - self: Base, + self, action_args: list[str] | None = None, ) -> None: # pragma: no cover """Abstract method to execute the command. diff --git a/src/molecule/scenario.py b/src/molecule/scenario.py index bbe1cd832..0ec22baab 100644 --- a/src/molecule/scenario.py +++ b/src/molecule/scenario.py @@ -50,13 +50,13 @@ def __init__(self, config) -> None: # type: ignore[no-untyped-def] # noqa: ANN self.config = config self._setup() # type: ignore[no-untyped-call] - def _remove_scenario_state_directory(self: Scenario) -> None: + def _remove_scenario_state_directory(self) -> None: """Remove scenario cached disk stored state.""" directory = str(Path(self.ephemeral_directory).parent) LOG.info("Removing %s", directory) shutil.rmtree(directory) - def prune(self: Scenario) -> None: + def prune(self) -> None: """Prune the scenario ephemeral directory files and returns None. "safe files" will not be pruned, including the ansible configuration diff --git a/tests/unit/command/test_base.py b/tests/unit/command/test_base.py index 115e8506e..d25056e08 100644 --- a/tests/unit/command/test_base.py +++ b/tests/unit/command/test_base.py @@ -43,7 +43,7 @@ class ExtendedBase(base.Base): """ExtendedBase Class.""" - def execute(self: ExtendedBase, action_args: list[str] | None = None) -> None: + def execute(self, action_args: list[str] | None = None) -> None: """No-op the execute method. Args: