Skip to content

Commit 778833f

Browse files
committed
Fixed review findings.
1 parent 44328fa commit 778833f

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

exasol/toolbox/nox/_artifacts.py

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import shutil
55
import sqlite3
66
import sys
7+
from collections.abc import Iterable
78
from pathlib import Path
89

910
import nox
@@ -127,20 +128,17 @@ def copy_artifacts(session: Session) -> None:
127128
Copy artifacts to the current directory
128129
"""
129130

130-
def get_suffix() -> str:
131-
versions = getattr(PROJECT_CONFIG, "python_versions", None)
132-
pivot = versions[0] if versions else "3.9"
133-
return f"-python{pivot}"
134-
135131
dir = Path(session.posargs[0])
136132
suffix = _python_version_suffix()
137133
_combine_coverage(session, dir, f"coverage{suffix}*/.coverage")
138134
_copy_artifacts(
139135
dir,
140136
dir.parent,
141-
f"lint{suffix}/.lint.txt",
142-
f"lint{suffix}/.lint.json",
143-
f"security{suffix}/.security.json",
137+
[
138+
f"lint{suffix}/.lint.txt",
139+
f"lint{suffix}/.lint.json",
140+
f"security{suffix}/.security.json",
141+
],
144142
)
145143

146144

@@ -160,7 +158,7 @@ def _combine_coverage(session: Session, dir: Path, pattern: str):
160158
print(f"Could not find any file {dir}/{pattern}", file=sys.stderr)
161159

162160

163-
def _copy_artifacts(source: Path, dest: Path, *files: str):
161+
def _copy_artifacts(source: Path, dest: Path, files: Iterable[str]):
164162
for file in files:
165163
path = source / file
166164
if path.exists():

0 commit comments

Comments
 (0)