Skip to content

Activate RET lint rules#9297

Merged
ogenstad merged 9 commits into
opsmill:stablefrom
Dhanus3133:fix/2192-activate-ret-ruff-rules
May 22, 2026
Merged

Activate RET lint rules#9297
ogenstad merged 9 commits into
opsmill:stablefrom
Dhanus3133:fix/2192-activate-ret-ruff-rules

Conversation

@Dhanus3133

@Dhanus3133 Dhanus3133 commented May 19, 2026

Copy link
Copy Markdown
Contributor

Why

Enable all the disabled RET rules and fixed all the issues.

Closes #2192

What changed

  • Removed all the disabled RET related rules from the pyproject.toml. So, all the RET related checks are done with ruff check.

Checklist

  • Tests added/updated
  • Changelog entry added (uv run towncrier create ...)
  • External docs updated (if user-facing or ops-facing change)
  • Internal .md docs updated (internal knowledge and AI code tools knowledge)
  • I have reviewed AI generated content

Summary by cubic

Activates RET return rules in ruff and resolves RET504 violations by returning values directly across the codebase. No behavior changes expected; adds a clear error when get_path_value receives an unsupported schema path. Aligns with #2192.

  • Refactors
    • Removed disabled RET rules in pyproject.toml; ruff check now enforces them.
    • Replaced temporary variables with direct returns across auth, migrations, nodes/relationships, Git, GraphQL, tasks, events, telemetry, message bus, webhooks, server, and tests.
    • Added a ValueError for unsupported schema paths in node get_path_value.
    • No API, schema, or runtime behavior changes; tests updated only for style.

Written for commit 16f2659. Summary will update on new commits. Review in cubic

@Dhanus3133 Dhanus3133 requested a review from a team as a code owner May 19, 2026 21:37
@Dhanus3133 Dhanus3133 changed the title Fix/2192 activate ret ruff rules Activate RET lint rules May 19, 2026
@codspeed-hq

codspeed-hq Bot commented May 21, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 12 untouched benchmarks


Comparing Dhanus3133:fix/2192-activate-ret-ruff-rules (16f2659) with stable (74f25ba)

Open in CodSpeed

@ogenstad ogenstad left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@ogenstad ogenstad merged commit 5543d02 into opsmill:stable May 22, 2026
62 of 64 checks passed
@Dhanus3133 Dhanus3133 deleted the fix/2192-activate-ret-ruff-rules branch May 22, 2026 07:56
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.

task: Activate "RET" rule for ruff

2 participants