From 30cc2eaf31e5fea7a19bda0a166d8951b02c314f Mon Sep 17 00:00:00 2001 From: David Belais Date: Mon, 11 May 2026 12:13:02 -0700 Subject: [PATCH] Fix docstring newlines --- pyproject.toml | 4 ++-- src/sob/utilities.py | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index b58940b..f5e4bd6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ build-backend = "hatchling.build" [project] name = "sob" -version = "2.2.0" +version = "2.2.1" description = "A type-enforced framework for serializing and deserializing JSON" readme = "README.md" license = "MIT" @@ -48,7 +48,7 @@ dependencies = [ "pytest", "mypy", "dependence~=1.1", - "gittable~=0.0", + "gittable~=0.2", ] pre-install-commands = [ "pip install --upgrade pip setuptools", diff --git a/src/sob/utilities.py b/src/sob/utilities.py index ef14b48..629a668 100644 --- a/src/sob/utilities.py +++ b/src/sob/utilities.py @@ -485,7 +485,9 @@ def split_long_docstring_lines( indent_: str = " " if "\t" in docstring: docstring = docstring.replace("\t", indent_) - lines: list[str] = docstring.split("\n") + lines: list[str] = ( + docstring.replace("\r\n", "\n").replace("\r", "\n").split("\n") + ) indentation_length: int = sys.maxsize for line in filter(None, lines): matched = re.match(r"^[ ]+", line)