Skip to content

chore: fix pre-existing ruff lint and format errors - #10

Merged
ljadach merged 2 commits into
mainfrom
lint-fixes
Apr 12, 2026
Merged

ljadach merged 2 commits into
mainfrom
lint-fixes

Conversation

@ljadach

@ljadach ljadach commented Apr 12, 2026

Copy link
Copy Markdown
Owner

Summary

Main CI has been red since 2026-01-25 (commit ac16da8) due to three ruff lint errors plus three files failing ruff format --check. Nothing here is new — this PR just clears the accumulated backlog so CI goes green for the first time in ~11 weeks.

Split into two commits for clarity:

  1. 595813b — manual lint fixes (2 files, 4+ 8-):

    • SIM105: try/except Exception: pass → contextlib.suppress(Exception) in _analyze_tasks
    • SIM108: if user_tz: now = datetime.now(user_tz) else: ... → ternary
    • F401: drop unused timedelta import in test_analyze_tasks_with_timezone
  2. e9e47b7 — ruff format output (3 files, 64+ 50-): pure mechanical reformatting of dict literals passed to list.append(...). response_builder.py, tools/notes.py, tools/utilities.py. Zero logic change.

Test plan

  • uv run ruff check src tests — passes
  • uv run ruff format --check src tests — passes
  • uv run pyright src — 0 errors
  • uv run pytest — 36/36 passing

🤖 Generated with Claude Code

ljadach and others added 2 commits April 13, 2026 00:13
Silences three pre-existing ruff findings that have been red on main
since ac16da8:

- SIM105: use contextlib.suppress(Exception) for the ZoneInfo call
- SIM108: collapse the now = datetime.now(...) if/else into a ternary
- F401: drop unused timedelta import in test_analyze_tasks_with_timezone

No functional change.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Pure mechanical output of 'uv run ruff format'. Three files had
dict literals passed to list.append(...) that ruff now wants split
across lines. No functional change.

This greens the 'ruff format --check' CI step, which has been
failing on main alongside the check errors fixed in 595813b.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@ljadach
ljadach merged commit 563a8cb into main Apr 12, 2026
5 checks passed
ljadach added a commit that referenced this pull request Apr 12, 2026
pyproject.toml declares readme = "README.md", so hatchling requires
the file to exist at build time for metadata validation. The build
stage was copying pyproject.toml and src/ but not README.md,
causing 'uv build --wheel' to fail with:

    OSError: Readme file does not exist: README.md

This was masked for ~11 weeks because the docker CI job has
needs: [lint, test] and lint was failing since ac16da8 — the docker
step only started running once lint went green in #10.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@ljadach
ljadach deleted the lint-fixes branch April 12, 2026 22:24
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