镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Add docstring linting (D-class rules) to ruff configuration #212

Open

Description

@lucifer4330k

Description

The project currently ignores all docstring linting rules (D-class) in the ruff configuration with a TODO comment.

Location

pyproject.toml:60

[tool.ruff.lint]
# The D (doc) and DTZ (datetime zone) lint classes current heavily violated - fix later
select = ["ALL"]
ignore = [
    "D",  # todo: docstring linting
    # ...
]

Impact

  • Inconsistent or missing docstrings across the codebase
  • Reduced code maintainability and readability
  • Harder for new contributors to understand code functionality

Suggested Implementation

  1. Start by enabling specific D-rules that are least violated (e.g., D100, D101 for missing docstrings)
  2. Gradually fix existing violations or use per-file ignores for legacy code
  3. Eventually enable all D-rules for new code

Related

Similar TODO exists for DTZ (datetime zone) rules which should also be addressed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions