Skip to content

R23-T057: Fix pydocstyle findings in dilation_operation.py and add strict Ruff review - #67

Open
code-paul-creator wants to merge 1 commit into
S-AI-Projects:masterfrom
code-paul-creator:R23-T057
Open

code-paul-creator wants to merge 1 commit into
S-AI-Projects:masterfrom
code-paul-creator:R23-T057

Conversation

@code-paul-creator

Copy link
Copy Markdown

Description

Runs all of Ruff's rules (--select ALL) on digital_image_processing/morphological_operations/dilation_operation.py, which already passes the repo config, fixes the findings that match CONTRIBUTING.md, and documents the decision for every other code in work/R23-T057/REVIEW.md.

Related Issue

Fixes: #57

Type of Change

  • Bug Fix
  • New Feature
  • UI/UX Improvement
  • Performance Improvement
  • Tests
  • Documentation
  • Refactoring / Maintenance
  • CI/CD

Changes Made

  • Added a module docstring with a summary and a Wikipedia reference (D100).
  • Summary lines of rgb_to_gray, gray_to_binary and dilation now end with a period and are followed by a blank line (D205, D400, D415).
  • No logic changed; the CRLF line endings of the file were kept.
  • Added work/R23-T057/REVIEW.md (every --select ALL code with a decision) and the raw Ruff outputs before and after.

Screenshots / Recordings

Not applicable (no UI changes).

Testing

  • ruff check digital_image_processing/morphological_operations/dilation_operation.py -> all checks passed (before and after)
  • ruff check --select ALL ... -> 15 findings before, 6 after (D212 x4, COM812, CPY001 intentionally not fixed)
  • ruff format --check -> already formatted
  • python -m pytest --doctest-modules digital_image_processing/morphological_operations/dilation_operation.py -> 10 doctests passed

Checklist

  • I have tested my changes locally.
  • I have added or updated tests, if needed.
  • I have updated documentation, if needed.
  • I have followed the project's coding guidelines.
  • I have run the relevant tests and checks.
  • I have addressed previous review feedback, if applicable.

Additional Notes

Not fixed on purpose: D212 (CONTRIBUTING's own example starts docstrings on the second line), COM812 (pyproject.toml marks COM as "DO NOT FIX"), CPY001 (the repo uses no per-file copyright headers). Observation, not changed: dilation() only handles 3x3 kernels; for a 1x3 kernel the padding copy is empty and two existing doctests record all-False results that are wrong (see REVIEW.md).

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Paulami Bhosle — R23-T057: Review digital_image_processing/morphological_operations/dilation_operation.py against every Ruff rule

1 participant