From 63b0b3c5af9ea658b92f7b962d6782363dc5ece9 Mon Sep 17 00:00:00 2001 From: Sultan Iman Date: Mon, 25 Mar 2024 15:04:51 +0100 Subject: [PATCH] Fix mypy warning --- dlt/common/cli/runner/pipeline_script.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dlt/common/cli/runner/pipeline_script.py b/dlt/common/cli/runner/pipeline_script.py index 9ef1943d4a..3f70a72c0b 100644 --- a/dlt/common/cli/runner/pipeline_script.py +++ b/dlt/common/cli/runner/pipeline_script.py @@ -67,20 +67,20 @@ def load_module(self, script_path: str) -> ModuleType: return module @contextmanager - def expect_no_pipeline_runs(self): + def expect_no_pipeline_runs(self): # type: ignore[no-untyped-def] """Monkey patch pipeline.run during module loading Restore it once importing is done """ old_run = dlt.Pipeline.run - def noop(*args, **kwargs) -> LoadInfo: + def noop(*args, **kwargs) -> LoadInfo: # type: ignore self.has_pipeline_auto_runs = True - dlt.Pipeline.run = noop + dlt.Pipeline.run = noop # type: ignore yield - dlt.Pipeline.run = old_run + dlt.Pipeline.run = old_run # type: ignore @property def pipeline_module(self) -> ModuleType: