Coverage for /usr/local/lib/python3.12/site-packages/prefect/cli/deploy/_storage.py: 62%

21 statements  

« prev     ^ index     » next       coverage.py v7.10.6, created at 2025-12-05 13:38 +0000

1from __future__ import annotations 1a

2 

3from pathlib import Path 1a

4from typing import Any 1a

5 

6 

7class _PullStepStorage: 1a

8 """ 

9 A shim storage class that allows passing pull steps to a `RunnerDeployment`. 

10 """ 

11 

12 def __init__(self, pull_steps: list[dict[str, Any]]): 1a

13 self._base_path = Path.cwd() 

14 self.pull_steps = pull_steps 

15 

16 def set_base_path(self, path: Path): 1a

17 self._base_path = path 

18 

19 @property 1a

20 def destination(self): 1a

21 return self._base_path 

22 

23 @property 1a

24 def pull_interval(self): 1a

25 return 60 

26 

27 async def pull_code(self): 1a

28 pass 

29 

30 def to_pull_step(self): 1a

31 return self.pull_steps 

32 

33 def __eq__(self, other: Any) -> bool: 1a

34 return self.pull_steps == getattr(other, "pull_steps", None)