Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ruff workflow #187

Merged
merged 3 commits into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,4 @@ jobs:
run: |
black --check .
mypy .
ruff check .
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ dynamic = ["version"]
repository = "https://github.com/equinor/isar-robot.git"

[project.optional-dependencies]
dev = ["black", "mypy", "pip-tools", "pre-commit", "pytest"]
dev = ["black", "mypy", "pip-tools", "pre-commit", "pytest", "ruff"]

[tool.setuptools_scm]
version_file = "src/isar_robot/version.py"
Expand Down
2 changes: 0 additions & 2 deletions src/isar_robot/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from .robotinterface import Robot

try:
from isar_robot.version import version as __version__
except ImportError:
Expand Down
2 changes: 1 addition & 1 deletion src/isar_robot/config/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
class Settings(BaseSettings):
def __init__(self) -> None:
try:
with pkg_resources.path(f"isar_robot.config", "settings.env") as path:
with pkg_resources.path("isar_robot.config", "settings.env") as path:
env_file_path = path
except ModuleNotFoundError:
env_file_path = None
Expand Down
2 changes: 1 addition & 1 deletion src/isar_robot/inspections.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def _read_data_from_file(filename: Path) -> bytes:
try:
with open(filename, "rb") as f:
data: bytes = f.read()
except FileNotFoundError as e:
except FileNotFoundError:
raise RobotRetrieveInspectionException(
"An error occurred while retrieving the inspection data"
)
Expand Down
2 changes: 1 addition & 1 deletion src/isar_robot/robotinterface.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from threading import Thread
from typing import Callable, List, Optional

from robot_interface.models.initialize import InitializeParams
from robot_interface.models.initialize.initialize_params import InitializeParams
from robot_interface.models.inspection.inspection import Inspection
from robot_interface.models.mission.mission import Mission
from robot_interface.models.mission.status import RobotStatus, TaskStatus
Expand Down
Loading