Skip to content

Lint: fix the 17 ruff errors in tests/ (unused variables, nested with, dict()) #167

Done

Description

@vsn411

Problem: 17 ruff errors live only in tests, and some point at assertions that never run:

Rule Count Files
RUF059 unused unpacked variable 7 tests/test_web/test_sast_finding_route.py, test_activity_routes.py, test_routes.py
SIM117 nested with 4 tests/test_targets/test_github.py
F841 unused variable 2 tests/test_runner.py, tests/test_storage/test_assessments.py
C408 dict() call 2 tests/test_storage/test_structured_findings_storage.py
RUF012 mutable class default 1 tests/test_memory.py

Build: fix each one by hand. If an unused variable was clearly meant to be checked, add the missing assertion rather than renaming it to _. Merge nested with blocks into one statement.

Done when: ruff check tests is clean, pytest tests passes, and nothing under src/ changes. If you add an assertion, say which one in the PR description.

Part of #114.

Activity

  1. added
    enhancement
    good first issue
    help wanted
    hackathon
    difficulty: low
    on Nov 20, 2026
  2. KhHuyy commented on Nov 21, 2026

    @KhHuyy

    Hi! I'd like to work on this. I reproduced it on main (ruff check tests reports 17 errors).

    I'll fix them by hand as described: merge the nested with blocks (SIM117), add the missing assertion where an unused variable was clearly meant to be checked (RUF059/F841), replace the dict() calls (C408) and fix the mutable class default (RUF012). Nothing under src/ will change, and I'll make sure ruff check tests is clean and pytest tests passes. Could you assign it to me?

  3. hnimXgibhut commented on Nov 21, 2026

    @hnimXgibhut

    Hey, can i assign this bro ?
    Plan: fix the 17 ruff errors in tests/ by hand (merge the nested with blocks, add the missing assertions, replace the dict() calls, fix the mutable class default), without touching src/. Then I'll make sure ruff check tests is clean and pytest tests passes.

  4. Varunpoojari commented on Nov 22, 2026

    @Varunpoojari
    Collaborator

    I'd like to take this.

    Plan: fix each of the 17 by hand, adding the missing assertion where an unused variable was clearly meant to be checked and merging the nested with blocks. Nothing under src/ changes. I'll name any added assertion in the PR description.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    difficulty: lowenhancementgood first issuehackathonhelp wanted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions