Skip to content

Commit 7512978

Browse files
maciejmajekboczekbartek
authored andcommitted
fix: remove unused imports by default (#39)
* fix: remove unused imports by default * style: run updated pre-commit
1 parent 0f40c26 commit 7512978

File tree

4 files changed

+7
-15
lines changed

4 files changed

+7
-15
lines changed

.pre-commit-config.yaml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@ repos:
2323
hooks:
2424
- id: shellcheck
2525

26+
- repo: https://github.com/pycqa/autoflake
27+
rev: v2.3.1
28+
hooks:
29+
- id: autoflake
30+
args: ["--remove-all-unused-imports", "--in-place"]
31+
2632
- repo: https://github.com/pycqa/isort
2733
rev: 5.13.2
2834
hooks:
@@ -33,8 +39,3 @@ repos:
3339
rev: 24.4.2
3440
hooks:
3541
- id: black
36-
37-
- repo: https://github.com/pycqa/autoflake
38-
rev: v2.3.1
39-
hooks:
40-
- id: autoflake

src/rai/scenario_engine/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +0,0 @@
1-
from .scenario_engine import *

src/rai/scenario_engine/tool_runner.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
11
from typing import Any, Dict, List, Literal, Sequence
22

33
from langchain.tools import BaseTool
4-
from langchain_core.messages import (
5-
AIMessage,
6-
BaseMessage,
7-
HumanMessage,
8-
ToolCall,
9-
ToolMessage,
10-
)
4+
from langchain_core.messages import AIMessage, BaseMessage, ToolCall, ToolMessage
115

126
from rai.scenario_engine.messages import ToolMultimodalMessage
137

src/rai/tools/ros/tools.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@ def _run(self, x: float, y: float, z: float = 0.0, text: str = ""):
3838
global marker_it
3939
"""Sets a waypoint on the map."""
4040
import rclpy
41-
from builtin_interfaces.msg import Time
42-
from geometry_msgs.msg import Point
4341
from rclpy.node import Node
4442
from visualization_msgs.msg import Marker
4543

0 commit comments

Comments
 (0)