Skip to content

Commit 942da6b

Browse files
committed
clean up of types and names
1 parent 8ff89c3 commit 942da6b

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

src/pythainer/builders/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -222,15 +222,15 @@ def add_packages(self, packages: List[str]) -> None:
222222
"""
223223
self._build_commands.append(AddPkgDockerBuildCommand(packages=packages))
224224

225-
def copy(self, file_path: PathType, destination_path: PathType) -> None:
225+
def copy(self, source_path: Path, destination_path: Path) -> None:
226226
"""
227227
Copies a file to the docker container
228228
229229
Parameters:
230-
filename (PathType): The file to copy to the container.
231-
destination (PathType): The location to place the file within the Docker container.
230+
source_path (Path): The file or folder to copy to the container.
231+
destination_path (Path): The location to place the file or folder within the Docker container.
232232
"""
233-
self._build_commands.append(CopyDockerBuildCommand(file_path,destination_path))
233+
self._build_commands.append(CopyDockerBuildCommand(source_path,destination_path))
234234

235235

236236
class DockerBuilder(PartialDockerBuilder):

src/pythainer/builders/cmds.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ def __init__(self, source_path:Path ,destination_path:Path) -> None:
8888
self._source_path = source_path
8989
self._destination_path = destination_path
9090

91+
# pylint: disable=arguments-differ
9192
def get_str_for_dockerfile(
9293
self,
9394
docker_file_Path: Path,
@@ -101,8 +102,6 @@ def get_str_for_dockerfile(
101102
str: The command string.
102103
"""
103104

104-
# TODO: is mkdir needed and if so where?
105-
106105
if os.path.isfile(self._source_path):
107106
shutil.copyfile(self._source_path, docker_file_Path / self._source_path)
108107
elif os.path.isdir(self._source_path):

0 commit comments

Comments
 (0)