Skip to content

Update GitHub Actions and linting configurations#25

Merged
kjanat merged 2 commits into
masterfrom
claude/brave-knuth-s69r3j
Jun 8, 2026
Merged

Update GitHub Actions and linting configurations#25
kjanat merged 2 commits into
masterfrom
claude/brave-knuth-s69r3j

Conversation

@kjanat

@kjanat kjanat commented Jun 8, 2026

Copy link
Copy Markdown
Owner

Summary

This PR updates GitHub Actions workflow dependencies to their latest versions and refines linting configurations to better match the project's needs.

Key Changes

GitHub Actions Updates

  • publish.yml: Updated actions/upload-artifact (v6 → v7) and actions/download-artifact (v7 → v8), and actions/attest-build-provenance (v3 → v4)
  • labels.yml: Updated kjanat/github-labelmanager (v1 → v2)
  • mkdocs.yml: Updated actions/deploy-pages (v4 → v5)
  • pr-test-comment.yml: Updated actions/github-script (v8 → v9)

Code Quality Improvements

  • src/procclean/cli/docs.py: Fixed potential type error by adding null check for token.map before indexing, preventing crashes when the map is None
  • ty.toml: Removed overly strict type checking rules (byte-string-type-annotation and fstring-type-annotation) that were causing unnecessary errors
  • ruff.toml: Added PLW0717 (too-many-try-statements) to ignore list to accommodate legitimate broad exception handling in psutil guard blocks

Notable Details

The fix in docs.py ensures robustness by handling the case where token.map might be None, defaulting to line 0 when unavailable. The linting configuration changes reflect a pragmatic approach to type checking and code style enforcement, removing rules that conflicted with legitimate code patterns in the project.

Summary by CodeRabbit

  • Bug Fixes

    • Prevented a potential runtime error when extracting documentation sections, improving stability of CLI docs output.
  • Chores

    • Upgraded CI/CD workflow steps to newer action versions for more reliable deployments.
    • Adjusted linting and type-check configurations to refine static checks and reduce noisy rules.

Apply every pending Dependabot update directly instead of merging the
six open PRs:

- Python deps (uv.lock): psutil, textual, ruff, tombi, ty, types-psutil,
  pytest, pillow, aiohttp->requests and all transitives via `uv lock --upgrade`
- GitHub Actions: github-labelmanager v1->v2, deploy-pages v4->v5,
  github-script v8->v9, upload-artifact v6->v7, download-artifact v7->v8,
  attest-build-provenance v3->v4

Fix breakage surfaced by the newer toolchain so CI stays green:

- ruff 0.15: ignore PLW0717 (too-many-try-statements) - the psutil
  process_iter guard legitimately wraps many statements in one try
- ty 0.0.44: drop removed rules byte-string-type-annotation and
  fstring-type-annotation from ty.toml
- docs.py: guard token.map (now typed list[int] | None) instead of a
  stale mypy-style type: ignore that ty doesn't honor
@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown

📦 Test this PR (archived)

Status: ✅ Merged

This PR has been merged. You can still test the final state:

uvx --from git+https://github.com/kjanat/procclean@2e71d06185307b2fb1c0c6cb4366da87b52f1937 procclean
📋 PR Details
Field Value
Final commit 2e71d06185307b2fb1c0c6cb4366da87b52f1937
Commit message fix(docs): skip h2 tokens without a source map instead of defaulting to 0
Branch claude/brave-knuth-s69r3j

Merge commit: 4ac0c235c3115d7a460b131b7496034188ce32c9

Available commands:

# Launch TUI (default)
uvx --from git+https://github.com/kjanat/procclean@2e71d06185307b2fb1c0c6cb4366da87b52f1937 procclean

# List processes
uvx --from git+https://github.com/kjanat/procclean@2e71d06185307b2fb1c0c6cb4366da87b52f1937 procclean list

# Show memory summary
uvx --from git+https://github.com/kjanat/procclean@2e71d06185307b2fb1c0c6cb4366da87b52f1937 procclean mem

# Show help
uvx --from git+https://github.com/kjanat/procclean@2e71d06185307b2fb1c0c6cb4366da87b52f1937 procclean --help

🤖 Archived on merge

@kjanat kjanat self-assigned this Jun 8, 2026
@socket-security

This comment was marked as low quality.

@kjanat kjanat marked this pull request as ready for review June 8, 2026 21:19
@kjanat

This comment was marked as resolved.

@coderabbitai coderabbitai Bot added bug Something isn't working dependencies Pull requests that update a dependency file area: cli Related to CLI interface area: tests Related to testing area: ci/cd Related to CI/CD workflows labels Jun 8, 2026
@coderabbitai

coderabbitai Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

Pull request was closed or merged during review

Walkthrough

This PR updates GitHub Actions workflow action versions across four workflows, adjusts Ruff and ty.toml rules (adds a Ruff ignore and removes two type-check rules), and adds a guard in markdown H2 extraction to skip tokens missing source-map data.

Changes

GitHub Actions Workflow Dependency Updates

Layer / File(s) Summary
Workflow action version upgrades
.github/workflows/labels.yml, .github/workflows/mkdocs.yml, .github/workflows/pr-test-comment.yml, .github/workflows/publish.yml
Label manager upgraded v1→v2, GitHub Pages deploy v4→v5, actions/github-script v8→v9, and artifact/attest actions updated (upload v6→v7, download v7→v8, attest v3→v4) with wiring preserved.

Tool Configuration Updates

Layer / File(s) Summary
Ruff linting ignore rule
ruff.toml
Adds PLW0717 (too-many-try-statements) to lint.ignore.
Type-checking rule removals
ty.toml
Removes byte-string-type-annotation and fstring-type-annotation from error-level [rules].

Runtime Safety Improvement

Layer / File(s) Summary
Safe null-handling in markdown extraction
src/procclean/cli/docs.py
_extract_h2_sections now checks token.map is None and skips headings without a source-map before computing start lines.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • kjanat/procclean#10: Changes related to the .github/workflows/pr-test-comment.yml workflow and actions/github-script usage.

Suggested labels

chore, refactor

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Update GitHub Actions and linting configurations' accurately captures the main changes across the changeset: workflow dependency upgrades and linting/type-check configuration refinements.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/brave-knuth-s69r3j

Comment @coderabbitai help to get the list of available commands and usage tips.

coderabbitai[bot]

This comment was marked as resolved.

…to 0

A `heading_open` token always carries a source map in practice, but
`token.map` is typed `list[int] | None`. Defaulting a missing map to line
0 would make multiple H2 sections share the same start line and collapse
their ranges. Skip such tokens instead, which is both safer and keeps ty
happy via None-narrowing.
@coderabbitai coderabbitai Bot added refactor Code refactoring without behavior change chore Maintenance tasks and housekeeping and removed bug Something isn't working dependencies Pull requests that update a dependency file area: cli Related to CLI interface area: tests Related to testing area: ci/cd Related to CI/CD workflows labels Jun 8, 2026
@kjanat kjanat added the cr:skip Skip CodeRabbit review label Jun 8, 2026
@kjanat kjanat merged commit 4ac0c23 into master Jun 8, 2026
8 of 9 checks passed
@kjanat kjanat deleted the claude/brave-knuth-s69r3j branch June 8, 2026 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Maintenance tasks and housekeeping cr:skip Skip CodeRabbit review refactor Code refactoring without behavior change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant