Skip to content

Commit c77808d

Browse files
author
Alistair Turnbull
committed
Fix: swap docstrings of base_file and file_path.
1 parent 4373a1b commit c77808d

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

nancy/__init__.py

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,8 @@ def get_output_path(self, base_file: Path, file_path: Path) -> Path:
151151
"""Compute the output path of an input file.
152152
153153
Args:
154-
base_file (Path): the filesystem input `Path`
155-
file_path (Path): the `inputs`-relative `Path`
154+
base_file (Path): the `inputs`-relative `Path`
155+
file_path (Path): the filesystem input `Path`
156156
157157
Returns:
158158
Path
@@ -172,8 +172,8 @@ def process_file(self, base_file: Path, file_path: Path) -> None:
172172
"""Expand, copy or ignore a single file.
173173
174174
Args:
175-
base_file (Path): the filesystem `Path`
176-
file_path (Path): the `inputs`-relative `Path`
175+
base_file (Path): the `inputs`-relative `Path`
176+
file_path (Path): the filesystem input `Path`
177177
"""
178178
output_file = self.get_output_path(base_file, file_path)
179179
debug(f"Processing file '{file_path}'")
@@ -195,7 +195,11 @@ def process_file(self, base_file: Path, file_path: Path) -> None:
195195
shutil.copyfile(file_path, output_file)
196196

197197
def process_path(self, obj: Path) -> None:
198-
"""Recursively scan `obj` and pass every file to `process_file`."""
198+
"""Recursively scan `obj` and pass every file to `process_file`.
199+
200+
Args:
201+
obj (Path): the `inputs`-relative `Path` to scan.
202+
"""
199203
dirent = self.find_object(obj)
200204
if dirent is None:
201205
raise ValueError(f"'{obj}' matches no path in the inputs")
@@ -228,8 +232,8 @@ class Expand:
228232
"""State while expanding a file.
229233
230234
Args:
231-
base_file (Path): the filesystem input `Path`
232-
file_path (Path): the `inputs`-relative `Path`
235+
base_file (Path): the `inputs`-relative `Path`
236+
file_path (Path): the filesystem input `Path`
233237
output_file (Optional[Path]): the filesystem output `Path`
234238
"""
235239
def __init__(

0 commit comments

Comments
 (0)