Skip to content

manipulation git fixes#874

Merged
mustafab0 merged 1 commit intogeneralized_manipulator_driverfrom
manipulation-ruff-fixes
Dec 23, 2025
Merged

manipulation git fixes#874
mustafab0 merged 1 commit intogeneralized_manipulator_driverfrom
manipulation-ruff-fixes

Conversation

@paul-nechifor
Copy link
Contributor

No description provided.

@chatgpt-codex-connector
Copy link

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Dec 23, 2025

Greptile Summary

This PR performs systematic code cleanup across the manipulator driver codebase, removing unused imports and modernizing type hints.

Key Changes:

  • Removed unused imports (Optional, Union, ABC, ManipulatorInfo, message types, etc.) across 26 files
  • Modernized type hints from Union[float, list[float]] to PEP 604 syntax float | list[float] in converters.py
  • Prefixed intentionally unused variables with underscore (_error, _qd_ref) to suppress linter warnings
  • Cleaned up trailing whitespace in model files
  • Removed extraneous blank lines for consistency

Impact:
All changes are non-functional cleanup that improve code quality without affecting runtime behavior. The changes reduce import clutter, adopt modern Python typing conventions, and follow best practices for unused variable naming.

Confidence Score: 5/5

  • This PR is safe to merge with no risk
  • All changes are purely cosmetic code cleanup with no functional modifications: removing unused imports, modernizing type hints to PEP 604 syntax, prefixing unused variables with underscore, and removing whitespace. These changes cannot introduce bugs or break existing functionality.
  • No files require special attention

Important Files Changed

Filename Overview
dimos/hardware/manipulators/base/components/motion.py Removed unused Optional import and prefixed unused error variable with underscore
dimos/hardware/manipulators/base/driver.py Removed unused imports: ABC, Optional, and ManipulatorInfo
dimos/hardware/manipulators/base/spec.py Removed unused imports: Optional, PoseStamped, Twist, and Path
dimos/hardware/manipulators/base/utils/converters.py Modernized type hints from Union[float, list[float]] to `float
dimos/manipulation/control/trajectory_controller/joint_trajectory_controller.py Prefixed unused qd_ref variable with underscore to indicate it's intentionally unused

Sequence Diagram

sequenceDiagram
    participant Dev as Developer
    participant Linter as Code Linter/IDE
    participant Code as Codebase
    
    Note over Dev,Code: Code Cleanup Process
    
    Dev->>Linter: Run import checker
    Linter->>Code: Identify unused imports
    Code-->>Linter: List of unused imports found
    
    Dev->>Code: Remove unused imports<br/>(Optional, Union, etc.)
    
    Dev->>Linter: Run type hint modernization
    Linter->>Code: Identify Union type hints
    Code-->>Linter: Union[float, list[float]] occurrences
    
    Dev->>Code: Update to modern syntax<br/>(float | list[float])
    
    Dev->>Linter: Check for unused variables
    Linter->>Code: Find unused return values
    Code-->>Linter: error, qd_ref not used
    
    Dev->>Code: Prefix with underscore<br/>(_error, _qd_ref)
    
    Dev->>Linter: Check whitespace
    Linter->>Code: Detect trailing whitespace
    Code-->>Linter: Trailing spaces found
    
    Dev->>Code: Remove trailing whitespace
    
    Note over Dev,Code: All changes are non-functional<br/>cleanup improvements
Loading

@mustafab0 mustafab0 merged commit 86b7b53 into generalized_manipulator_driver Dec 23, 2025
13 of 14 checks passed
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