Skip to content

chore(lint): E402 module-level import not at top in three knowledge test files #20985

Open

Description

@mrveiss

Ruff reports 6 E402 (module-level import not at top of file) errors in three knowledge test files. They were found during #20967 and are not caused by it.

Verified on main (git show origin/main:<path>, ruff check --select E402 --no-cache): 6 errors

  • autobot-backend/services/knowledge/code_indexer_extensions_test.py: lines 31, 32, 41
  • autobot-backend/services/knowledge/code_indexer_test.py: line 21
  • autobot-backend/services/knowledge/impact_analysis_test.py: lines 27, 28

code_indexer_test.py places a try/except import (tree_sitter_python) and a pytest.mark.skipif assignment before the from services.knowledge.code_indexer import ... line. The other two files have the same pattern.

Acceptance criteria

  • The three files pass ruff check --select E402 with no per-file ignore
  • The imports are fixed at their root (the code before the import is moved or restructured), not suppressed with noqa

Activity

  1. removed
    needs-structureMissing goal milestone, matching phase label or native parent (#19522)
    on Nov 7, 2026
  2. mrveiss commented on Nov 7, 2026

    @mrveiss
    OwnerAuthor

    Maintainer decision: this issue belongs under the KB retrieval umbrella #20948 (now a native sub-issue). It will be fixed in the next PR that touches these knowledge test files.

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions