Skip to content

Conversation

jsh9
Copy link
Owner

@jsh9 jsh9 commented Aug 14, 2025

Fixes #244

Summary

  • Enhanced numpy-style docstring detection with pattern-based recognition
  • Updated documentation to reflect new detection logic
  • Added comprehensive test coverage for the new functionality

Changes Made

  • Enhanced Detection Logic: Added pattern-based numpy style detection that looks for section headers with dashes (e.g., Returns\n-------) before falling back to size-based comparison
  • Updated Documentation: Enhanced docs/style_mismatch.md with detailed explanation of the new detection approach and reformatted to 79 chars per line
  • Test Coverage: Added comprehensive test cases in tests/utils/test_parse_docstring.py and updated existing test expectations
  • Project Conventions: Added branch naming convention to CLAUDE.md

Technical Details

The new logic in parseDocstring() first checks for numpy-style patterns using regex to detect section headers followed by 3+ dashes. This provides more accurate detection for numpy-style docstrings and eliminates edge cases where they might be misidentified.

Test Plan

  • All existing tests pass (478 tests)
  • New pattern detection tests pass
  • Updated expected violations for edge cases
  • Pre-commit hooks pass

🤖 Generated with Claude Code

- Added pattern-based numpy style detection for section headers with dashes
- Enhanced parseDocstring() to check for numpy patterns before fallback
- Updated style_mismatch.md documentation with new detection logic
- Reformatted style_mismatch.md to max 79 chars per line
- Added comprehensive test cases for numpy pattern detection
- Updated test expectations for enhanced detection behavior
- Added branch naming convention to CLAUDE.md

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@jsh9 jsh9 changed the title Enhanced numpy-style docstring detection and updated documentation Enhance numpy-style docstring detection and update documentation Aug 14, 2025
jsh9 and others added 6 commits August 14, 2025 02:41
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- isort: 5.13.2 → 6.0.1
- pre-commit-hooks: v5.0.0 → v6.0.0
- pre-commit: v4.0.1 → v4.3.0

This should resolve the cached environment issues causing CI failures.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Remove extra blank lines after headers in CHANGELOG.md and docs/how_to_config.md
- Ensures consistent formatting between local and CI environments
- Fixes CI pipeline failures caused by prettier version mismatch

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@jsh9 jsh9 merged commit 17ceca2 into main Aug 14, 2025
16 checks passed
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.

DOC003 (style mismatch) not reported when it should be
1 participant