File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 )
Original file line number Diff line number Diff 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 )
You can’t perform that action at this time.
0 commit comments