Skip to content

Commit c26e274

Browse files
committed
Improved compatibility with Python 3.8 and 3.9
### Changed - Removed the `newline` parameter from `path.write_text` calls in the `process_file` function to ensure consistent handling of line endings.
1 parent 8f56792 commit c26e274

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

agent_docstrings/core.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,6 @@ def process_file(path: Path, verbose: bool = False, beta: bool = False) -> None:
379379
path.write_text(
380380
(file_prefix + "\n" + cleaned_body).lstrip(),
381381
encoding="utf-8",
382-
newline="\n",
383382
)
384383
return
385384

@@ -468,7 +467,7 @@ def process_file(path: Path, verbose: bool = False, beta: bool = False) -> None:
468467

469468
# Only write changes if content changed
470469
if new_content != original_content:
471-
path.write_text(new_content, encoding="utf-8", newline="\n")
470+
path.write_text(new_content, encoding="utf-8")
472471
if verbose:
473472
print(f"Processed {language.capitalize()}: {path}")
474473
elif verbose:

0 commit comments

Comments
 (0)