Skip to content

Conversation

@paul-nechifor
Copy link
Contributor

No description provided.

@paul-nechifor paul-nechifor marked this pull request as draft January 25, 2026 15:35
@greptile-apps
Copy link

greptile-apps bot commented Jan 25, 2026

Greptile Overview

Greptile Summary

This PR fixes multiple ruff linting issues across the codebase, removing 8 rules from the ignore list in pyproject.toml.

Key Changes:

  • Removed unused imports (F401): Cleaned up imports in dimos/agents/__init__.py, dimos/control/blueprints.py
  • Replaced star imports (F403): Converted wildcard imports to explicit imports in dimos/perception/common/__init__.py and dimos/perception/detection/__init__.py
  • Fixed naming conventions (N812, N813, N816):
    • Renamed RxOps to rxops in dimos/agents_deprecated/agent.py (42 occurrences)
    • Renamed F to functional in embedding models for clarity
    • Renamed detectionDB_module to detection_db_module across multiple files
  • Fixed async task tracking (RUF006): Added task tracking in test_actors.py and gateway/client.py to prevent dangling asyncio tasks
  • Fixed closure binding (B023): Updated cleanup_on_exit in mujoco_connection.py to use default parameter binding
  • Fixed docstring encoding (RUF002): Changed en-dash to hyphen in CudaImage.py docstring
  • Added __all__ exports: Improved public API clarity in multiple __init__.py files
  • Added noqa comments: Properly marked intentional unused imports for availability checks

The changes are mechanical linting fixes that improve code quality without altering functionality.

Confidence Score: 5/5

  • This PR is safe to merge - consists entirely of mechanical linting fixes with no functional changes
  • All changes are automated linting fixes addressing code style and best practices. The refactorings (renaming variables, replacing star imports, adding task tracking) follow established Python patterns and do not modify runtime behavior. The extensive scope (27 files) reflects thorough cleanup rather than risk.
  • No files require special attention

Important Files Changed

Filename Overview
dimos/agents_deprecated/agent.py Renamed RxOps to rxops for PEP8 compliance (N813)
dimos/agents_deprecated/modules/gateway/client.py Added _aclose_task field to track async cleanup task (RUF006)
dimos/models/embedding/init.py Refactored optional imports to use try/except/else pattern avoiding F401
dimos/perception/common/init.py Replaced star import with explicit imports (F403)
dimos/perception/detection/moduleDB.py Renamed detectionDB_module to detection_db_module for PEP8 (N816)
dimos/robot/unitree_webrtc/testing/test_actors.py Added _tasks set to track background tasks preventing dangling tasks (RUF006)
dimos/robot/unitree_webrtc/unitree_g1_blueprints.py Updated import and usage from detectionDB_module to detection_db_module
pyproject.toml Removed fixed ruff rules from ignore list: B023, F401, F403, N812, N813, N816, RUF002, RUF006

Sequence Diagram

sequenceDiagram
    participant Dev as Developer
    participant Ruff as Ruff Linter
    participant PR as Pull Request
    participant CI as CI Pipeline

    Dev->>Ruff: Run ruff check
    Ruff-->>Dev: Report violations: F401, F403, N812, N813, N816, B023, RUF002, RUF006
    
    Note over Dev: Fix F401 (unused imports)
    Dev->>PR: Remove unused imports
    Dev->>PR: Add noqa comments for intentional imports
    
    Note over Dev: Fix F403 (star imports)
    Dev->>PR: Replace wildcards with explicit imports
    Dev->>PR: Add __all__ export lists
    
    Note over Dev: Fix naming violations (N812, N813, N816)
    Dev->>PR: Rename RxOps → rxops (42 occurrences)
    Dev->>PR: Rename F → functional
    Dev->>PR: Rename detectionDB_module → detection_db_module
    
    Note over Dev: Fix RUF006 (dangling tasks)
    Dev->>PR: Add task tracking with _tasks set
    Dev->>PR: Store _aclose_task reference
    
    Note over Dev: Fix B023 & RUF002
    Dev->>PR: Use default params for closure binding
    Dev->>PR: Fix docstring encoding
    
    Dev->>PR: Update pyproject.toml ignore list
    PR->>CI: Trigger validation
    CI->>Ruff: Run ruff check
    Ruff-->>CI: All checks pass ✓
    CI-->>PR: Build successful
Loading

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

No files reviewed, no comments

Edit Code Review Agent Settings | Greptile

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