Skip to content

Commit

Permalink
Use cleandoc in DocstringDescriptionPlugin
Browse files Browse the repository at this point in the history
  • Loading branch information
Fatal1ty committed Nov 23, 2024
1 parent 98c1a27 commit c226c0f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mashumaro/jsonschema/plugins.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from dataclasses import is_dataclass
from inspect import cleandoc
from typing import Optional

from mashumaro.jsonschema.models import Context, JSONSchema
Expand All @@ -23,5 +24,5 @@ def get_schema(
schema: Optional[JSONSchema] = None,
) -> Optional[JSONSchema]:
if schema and is_dataclass(instance.type) and instance.type.__doc__:
schema.description = instance.type.__doc__
schema.description = cleandoc(instance.type.__doc__)
return None

0 comments on commit c226c0f

Please sign in to comment.