Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

from __future__ import annotations

import inspect
from collections import abc
from collections.abc import Iterable
from datetime import datetime, timedelta
Expand Down Expand Up @@ -163,6 +164,14 @@ def get_timezone(cls, tz: Timezone | FixedTimezone) -> str | None:
return None
return str(tz)

@field_validator("doc_md", mode="before")
@classmethod
def get_doc_md(cls, doc_md: str | None) -> str | None:
"""Clean indentation in doc md."""
if doc_md is None:
return None
return inspect.cleandoc(doc_md)

@field_validator("params", mode="before")
@classmethod
def get_params(cls, params: abc.MutableMapping | None) -> dict | None:
Expand Down