Skip to content

chore(ameba): Do not exclude /api routes from Lint/UselessAssign - #5900

Open
Fijxu wants to merge 1 commit into
iv-org:masterfrom
Fijxu:ameba-1
Open

chore(ameba): Do not exclude /api routes from Lint/UselessAssign#5900
Fijxu wants to merge 1 commit into
iv-org:masterfrom
Fijxu:ameba-1

Conversation

@Fijxu

@Fijxu Fijxu commented Aug 5, 2026

Copy link
Copy Markdown
Member

Checklist

  • I have read the AI Policy and understand the disclosure requirements

AI Disclosure

  • AI was not used to create this pull request
  • AI was used to fully create this pull request
  • AI was used to partially create this pull request

Model(s) used (and thinking/reasoning level if relevant):

Tool(s) used:

How was AI used?


Pull request description

Routes bellow files under src/invidious/routes/ are used to render ECR, and they can take variables from the functions, they appear as unused variables for Ameba, but they are used in the ECR files as the comments says, but it also excluded the src/invidious/routes/api files, which are used for the API and do not render any ECR, so useless assigns in src/invidious/routes/api files can be safely removed.

Summary by CodeRabbit

  • Chores
    • Updated linting configuration to apply the unused-assignment exception only to route files directly under the designated routes directory.

@TheFrenchGhosty

Copy link
Copy Markdown
Member

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown
✅ Action performed

Full review finished.

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 9e59fe03-d112-49cc-ada9-60df2771d7e7

📥 Commits

Reviewing files that changed from the base of the PR and between 0460189 and 4091bc1.

📒 Files selected for processing (1)
  • .ameba.yml

📝 Walkthrough

Walkthrough

The Ameba configuration changes the Lint/UselessAssign exclusion from recursive route matching to direct route files under src/invidious/routes.

Changes

Lint configuration

Layer / File(s) Summary
Direct route file matching
.ameba.yml
The Lint/UselessAssign exclusion now matches .cr files directly under src/invidious/routes.

Estimated code review effort: 1 (Trivial) | ~2 minutes

🚥 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 clearly describes the main change: removing the exclusion of /api routes from Lint/UselessAssign.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 Checkov (3.3.9)
.ameba.yml

2026-08-06 22:55:18,150 [MainThread ] [ERROR] Failed to invoke function /usr/local/lib/python3.11/site-packages/checkov/common/runners/runner_registry._parallel_run with (<checkov.secrets.runner.Runner object at 0x7f2a0f9a0a50>, None, None, ['.ameba.yml'], <checkov.runner_filter.RunnerFilter object at 0x7f2a0f973d50>, True, None)
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/checkov/common/parallelizer/parallel_runner.py", line 86, in func_wrapper
result = original_func(*item)
^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/checkov/common/runners/runner_registry.py", line 839, in _parallel_run
report = runner.run(
^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/checkov/secrets/runner.py", line 322, in run
plugins_used, cleanupFn = self._get_plugins_used()
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/checkov/secrets/runne

... [truncated 365 characters] ...

mkdir(file, 0o700)
OSError: [Errno 28] No space left on device: '/tmp/tmp8ce093c0'
2026-08-06 22:55:18,196 [MainThread ] [ERROR] Exception traceback:
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/checkov/main.py", line 655, in run
self.scan_reports = runner_registry.run(
^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/checkov/common/runners/runner_registry.py", line 177, in run
for result in parallel_runner_results:
File "/usr/local/lib/python3.11/site-packages/checkov/common/parallelizer/parallel_runner.py", line 118, in _run_function_multiprocess_fork
raise v.internal_exception.with_traceback(v.internal_exception.traceback)
OSError: [Errno 28] No space left on device: '/tmp/tmp8ce093c0'


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

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.

2 participants