diff --git a/.github/workflows/flake8-problem-matcher.json b/.github/workflows/flake8-problem-matcher.json deleted file mode 100644 index fa7c7d1..0000000 --- a/.github/workflows/flake8-problem-matcher.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "problemMatcher": [ - { - "owner": "flake8", - "pattern": [ - { - "regexp": "^(.*?):(\\d+):(\\d+):\\s*(.*?)$", - "file": 1, - "line": 2, - "column": 3, - "message": 4 - } - ] - } - ] -} diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 2738852..f1480b6 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -20,7 +20,7 @@ jobs: run: | python3 -m mypy --exclude=build . - flake8: + ruff-check: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -29,13 +29,10 @@ jobs: python-version: '3.10' - name: Install run: | - python3 -m pip install flake8 - - name: Add matcher - run: | - echo "::add-matcher::.github/workflows/flake8-problem-matcher.json" - - name: Lint with flake8 - run: | - python3 -m flake8 . + python3 -m pip install ruff + + - name: Run ruff check + run: ruff check --output-format=github . black: runs-on: ubuntu-latest diff --git a/pyproject.toml b/pyproject.toml index f222ddd..b5c2ea1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,8 +4,12 @@ requires = ["setuptools>=42", "wheel"] [tool.black] line-length = 79 -[tool.pylint.messages_control] -disable = "C0330, C0326" +[tool.ruff] +lint.select = [ + "E", + "F", + #"B", # bugbear +] [tool.mypy] ignore_missing_imports = true diff --git a/trifinger_simulation/real_finger.py b/trifinger_simulation/real_finger.py index 8e306b9..a56e5ba 100644 --- a/trifinger_simulation/real_finger.py +++ b/trifinger_simulation/real_finger.py @@ -1,10 +1,10 @@ #!/usr/bin/env python3 -# ------------------------------------------------------------------------------------------------- +# -------------------------------------------------------------------------------------- # The documentation in this code is heavily derived from the official # documentation of PyBullet at # https://docs.google.com/document/d/10sXEhzFRSnvFcl3XxNGhnD4N2SedqwdAvK3dsihxVUA/edit# # among other scattered sources. -# ------------------------------------------------------------------------------------------------- +# -------------------------------------------------------------------------------------- import os from ament_index_python.packages import get_package_share_directory diff --git a/trifinger_simulation/tasks/rearrange_dice/__init__.py b/trifinger_simulation/tasks/rearrange_dice/__init__.py index a52c1f4..b2b0d47 100644 --- a/trifinger_simulation/tasks/rearrange_dice/__init__.py +++ b/trifinger_simulation/tasks/rearrange_dice/__init__.py @@ -142,7 +142,7 @@ def _get_cell_corners_3d( # order of the corners is the same as in the cube model of the # trifinger_object_tracking package - # people.tue.mpg.de/mpi-is-software/robotfingers/docs/trifinger_object_tracking/doc/cube_model.html + # https://open-dynamic-robot-initiative.github.io/trifinger_object_tracking/doc/a2_cube_model.html return np.array( ( nppos + (d, -d, d),