Skip to content

Commit 5e92c63

Browse files
committed
Move function docs before Args docs
Signed-off-by: Leandro Lucarella <luca-frequenz@llucax.com>
1 parent d63b9f4 commit 5e92c63

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

.github/cookiecutter-migrate.template.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,16 +139,16 @@ def replace_file_contents_atomically( # noqa; DOC501
139139
) -> None:
140140
"""Replace a file atomically with new content.
141141
142+
The replacement is done atomically by writing to a temporary file and
143+
then moving it to the target location.
144+
142145
Args:
143146
filepath: The path to the file to replace.
144147
old: The string to replace.
145148
new: The string to replace it with.
146149
count: The maximum number of occurrences to replace. If negative, all occurrences are
147150
replaced.
148151
content: The content to replace. If not provided, the file is read from disk.
149-
150-
The replacement is done atomically by writing to a temporary file and
151-
then moving it to the target location.
152152
"""
153153
if isinstance(filepath, str):
154154
filepath = Path(filepath)

cookiecutter/migrate.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -420,16 +420,16 @@ def replace_file_contents_atomically( # noqa; DOC501
420420
) -> None:
421421
"""Replace a file atomically with new content.
422422
423+
The replacement is done atomically by writing to a temporary file and
424+
then moving it to the target location.
425+
423426
Args:
424427
filepath: The path to the file to replace.
425428
old: The string to replace.
426429
new: The string to replace it with.
427430
count: The maximum number of occurrences to replace. If negative, all occurrences are
428431
replaced.
429432
content: The content to replace. If not provided, the file is read from disk.
430-
431-
The replacement is done atomically by writing to a temporary file and
432-
then moving it to the target location.
433433
"""
434434
if isinstance(filepath, str):
435435
filepath = Path(filepath)

0 commit comments

Comments
 (0)