-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
docstringRelated to docstring linting or formattingRelated to docstring linting or formatting
Description
def test(categ_ids, start_dt, end_dt):
"""Retrieve time blocks that fall within a specific time interval.
:param categ_ids: iterable containing list of category IDs
:param start_dt: start of search interval (``datetime``, expected
to be in display timezone)
:param end_dt: end of search interval (``datetime`` in expected
to be in display timezone)
"""ruff --isolated --select D208 --fix does this:
def test(categ_ids, start_dt, end_dt):
"""Retrieve time blocks that fall within a specific time interval.
:param categ_ids: iterable containing list of category IDs
:param start_dt: start of search interval (``datetime``, expected
to be in display timezone)
:param end_dt: end of search interval (``datetime`` in expected
to be in display timezone)
"""But this would be sufficient to fix the violation and preserve the intent of the indentation that's not part of the over-indentation:
def test(categ_ids, start_dt, end_dt):
"""Retrieve time blocks that fall within a specific time interval.
:param categ_ids: iterable containing list of category IDs
:param start_dt: start of search interval (``datetime``, expected
to be in display timezone)
:param end_dt: end of search interval (``datetime`` in expected
to be in display timezone)
"""IMHO the behavior of the fix should be less aggressive or the fix should be marked as unsafe by default.
D207 should probably be adapted likewise when indenting under-indented docstrings.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
docstringRelated to docstring linting or formattingRelated to docstring linting or formatting