Skip to content

Commit eef60b9

Browse files
MK8S-25: Fix Python typing error in _get_saltenv_directories
Add proper type annotation for _get_saltenv_directories return value: - Import Tuple from typing module - Specify return type as Tuple[Optional[Path], Optional[Path]] - Fixes mypy error: "Implicit generic Any. Use typing.Tuple and specify generic parameters"
1 parent e0ff37f commit eef60b9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

buildchain/buildchain/targets/repository.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
import abc
3434
import operator
3535
from pathlib import Path
36-
from typing import Any, List, Optional, Sequence
36+
from typing import Any, List, Optional, Sequence, Tuple
3737

3838
from buildchain import config
3939
from buildchain import coreutils
@@ -208,7 +208,7 @@ def clean() -> None:
208208
task["file_dep"].extend([self.get_rpm_path(pkg) for pkg in self.packages])
209209
return task
210210

211-
def _get_saltenv_directories(self) -> tuple:
211+
def _get_saltenv_directories(self) -> Tuple[Optional[Path], Optional[Path]]:
212212
"""Get saltenv directory paths for scality repository.
213213
214214
Returns:

0 commit comments

Comments
 (0)