Skip to content

Ruff style#640

Merged
tobixen merged 4 commits intomasterfrom
issue634
Mar 15, 2026
Merged

Ruff style#640
tobixen merged 4 commits intomasterfrom
issue634

Conversation

@tobixen
Copy link
Member

@tobixen tobixen commented Mar 15, 2026

Deal with some of the findings from ruff

tobixen and others added 4 commits March 15, 2026 19:46
Fixes and removes from pyproject.toml ignore list:
- UP008: super() style (9 violations, auto-fixed)
- UP045/UP007: Optional[X] type hints (16 violations, auto-fixed + dead code removed)
- UP036: outdated sys.version_info check in tests (1 violation)
- B011: assert False → raise AssertionError (4 violations)
- B018: useless property accesses replaced with explicit method calls (6 violations)
- B026: star-arg after keyword in Principal() call (1 violation)
- B028: missing stacklevel= in warnings.warn() (1 violation)
- B904: raise-from in except clauses (2 violations)
- E721: == for type comparisons → is (5 violations)
- E731: lambda assignments → def (4 violations)
- B007, UP007: were already clean

Also removed dead code: TimeStamp type alias was silently undefined in
calendarobjectresource.py, collection.py and davobject.py (try/except
block was failing because `date` was never imported).

Remaining ignore list annotated with violation counts and links to
#634

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@tobixen tobixen merged commit c701d38 into master Mar 15, 2026
9 checks passed
@tobixen tobixen deleted the issue634 branch March 15, 2026 20:13
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