Skip to content

Fix docstring newlines - #30

Merged
davebelais merged 1 commit into
mainfrom
bugfix/docstring-newlines
May 11, 2026
Merged

Fix docstring newlines#30
davebelais merged 1 commit into
mainfrom
bugfix/docstring-newlines

Conversation

@davebelais

Copy link
Copy Markdown
Collaborator

1. pyproject.toml

Change Before After
Version bump 2.2.0 2.2.1
Dev dependency gittable~=0.0 gittable~=0.2

2. src/sob/utilities.py (line ~488)

The core fix — split_long_docstring_lines previously split on "\n" only. The fix normalizes all line-ending variants before splitting:

Before:

lines: list[str] = docstring.split("\n")
                                                                                                                                                                               
After:                                                                                                                                                                         
                                                                                                                                                                               
lines: list[str] = (                                                                                                                                                           
    docstring.replace("\r\n", "\n").replace("\r", "\n").split("\n")                                                                                                            
)   

@davebelais
davebelais marked this pull request as ready for review May 11, 2026 19:13
@davebelais
davebelais merged commit c51259b into main May 11, 2026
13 checks passed
@davebelais
davebelais deleted the bugfix/docstring-newlines branch May 11, 2026 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant