Skip to content

Clean up code quality issues#29

Merged
chetmancini merged 1 commit intomasterfrom
chetmancini/cleanup-fixes
Feb 7, 2026
Merged

Clean up code quality issues#29
chetmancini merged 1 commit intomasterfrom
chetmancini/cleanup-fixes

Conversation

@chetmancini
Copy link
Copy Markdown
Owner

Summary

Fixed incorrect test comments, simplified code patterns, removed redundant checks, and improved test coverage.

  • Fix incorrect date comments in test_dateutils.py (timestamps were 2024-03-28, not 2024-03-27)
  • Replace int(x / y) with x // y in pretty_date for Pythonic floor division
  • Remove unreachable branch in parse_iso8601 (regex guarantees ms_part and tz_part are None when time_part is None)
  • Remove redundant None guards and checks in add_business_days functions
  • Add test coverage for add_business_days with backward direction from weekend starts

Test plan

  • All 127 existing tests pass
  • New tests verify backward business day calculations from weekend starts

🤖 Generated with Claude Code

…coverage

- Fix incorrect date comments in test_dateutils.py (timestamps were 2024-03-28, not 2024-03-27)
- Replace int(x / y) with x // y in pretty_date for Pythonic floor division (10 occurrences)
- Remove unreachable branch in parse_iso8601 (regex guarantees ms_part and tz_part are None when time_part is None)
- Remove redundant None guard in add_business_days (holidays=None already returns early)
- Remove redundant num_days == 0 check in _add_business_days_no_holidays (caller already handles it)
- Add test coverage for add_business_days with backward direction from weekend starts (no-holidays fast path)

Co-Authored-By: Claude Haiku 4.5 <[email protected]>
@claude
Copy link
Copy Markdown

claude bot commented Feb 7, 2026

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

@chetmancini chetmancini merged commit ce39db1 into master Feb 7, 2026
6 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.

1 participant