Skip to content

Commit

Permalink
flake8 isort black -> ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
nim65s committed Dec 11, 2024
1 parent 6ef068e commit f4aaaae
Show file tree
Hide file tree
Showing 8 changed files with 45 additions and 67 deletions.
78 changes: 38 additions & 40 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,42 +1,40 @@
ci:
autoupdate_branch: 'devel'
autoupdate_branch: devel
repos:
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v18.1.7
hooks:
- id: clang-format
args: [--style=Google]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-added-large-files
- id: check-ast
- id: check-executables-have-shebangs
- id: check-json
- id: check-merge-conflict
- id: check-symlinks
- id: check-toml
- id: check-yaml
- id: debug-statements
- id: destroyed-symlinks
- id: detect-private-key
- id: end-of-file-fixer
- id: fix-byte-order-marker
- id: mixed-line-ending
- id: trailing-whitespace
- repo: https://github.com/psf/black
rev: 24.4.2
hooks:
- id: black
- repo: https://github.com/PyCQA/flake8
rev: 7.1.0
hooks:
- id: flake8
- repo: https://github.com/cheshirekow/cmake-format-precommit
rev: v0.6.13
hooks:
- id: cmake-format
- repo: https://github.com/PyCQA/isort
rev: 5.13.2
hooks:
- id: isort
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.7
hooks:
- id: ruff
args:
- --fix
- --exit-non-zero-on-fix
- id: ruff-format
- repo: https://github.com/cheshirekow/cmake-format-precommit
rev: v0.6.13
hooks:
- id: cmake-format
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v19.1.5
hooks:
- id: clang-format
args:
- --style=Google
exclude: '^.*\.ipynb$'
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-added-large-files
- id: check-ast
- id: check-executables-have-shebangs
- id: check-json
- id: check-merge-conflict
- id: check-symlinks
- id: check-toml
- id: check-yaml
- id: debug-statements
- id: destroyed-symlinks
- id: detect-private-key
- id: end-of-file-fixer
- id: fix-byte-order-marker
- id: mixed-line-ending
- id: trailing-whitespace
4 changes: 2 additions & 2 deletions bindings/python/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Copyright (c) 2015-2018, CNRS
# Authors: Justin Carpentier <jcarpent@laas.fr>

import numpy as np
from libmulticontact_api import *
import numpy as np # noqa: F401
from libmulticontact_api import * # noqa: F403
4 changes: 2 additions & 2 deletions bindings/python/multicontact_api/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Copyright (c) 2015-2018, CNRS
# Authors: Justin Carpentier <jcarpent@laas.fr>

import numpy as np
from multicontact_api.libmulticontact_api import *
import numpy as np # noqa: F401
from multicontact_api.libmulticontact_api import * # noqa: F403
Original file line number Diff line number Diff line change
Expand Up @@ -105,16 +105,15 @@ struct ForceConePythonVisitor
.def("toWrenchCone", &toWrenchCone, "Returns *this as a WrenchCone.")

.def("RegularCone",
(ForceCone(*)(const Scalar, const VectorD &, const int)) &
ForceCone::RegularCone,
(ForceCone(*)(const Scalar, const VectorD &,
const int))&ForceCone::RegularCone,
bp::args("mu", "direction", "num rays"),
"Generates a regular linear cone from a given number of rays, a "
"main direction and a friction "
"coefficient.")
.def("RegularCone",
(ForceCone(*)(const Scalar, const VectorD &, const int,
const Scalar)) &
ForceCone::RegularCone,
const Scalar))&ForceCone::RegularCone,
bp::args("mu", "direction", "num rays", "angle offset"),
"Generates a regular linear cone from a given number of rays, a "
"main direction and a friction "
Expand Down
1 change: 0 additions & 1 deletion notebooks/1_basic_usage.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,6 @@
}
],
"source": [
"import ndcurves\n",
"from ndcurves import polynomial\n",
"\n",
"coefs = np.random.rand(\n",
Expand Down
5 changes: 0 additions & 5 deletions notebooks/3_load_from_file.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@
}
],
"source": [
"import ndcurves\n",
"from pinocchio import SE3\n",
"from multicontact_api import ContactSequence\n",
"\n",
"cs = ContactSequence()\n",
Expand Down Expand Up @@ -1091,7 +1089,6 @@
],
"source": [
"import numpy as np\n",
"import matplotlib\n",
"\n",
"%matplotlib notebook\n",
"import matplotlib.pyplot as plt\n",
Expand Down Expand Up @@ -2269,7 +2266,6 @@
}
],
"source": [
"from ipywidgets import interact\n",
"from example_robot_data import load\n",
"from pinocchio.visualize import MeshcatVisualizer\n",
"\n",
Expand Down Expand Up @@ -2305,7 +2301,6 @@
}
],
"source": [
"import ndcurves\n",
"import time\n",
"\n",
"# concatenate the joint trajectories of each phases in a single curve object\n",
Expand Down
5 changes: 0 additions & 5 deletions pyproject.toml

This file was deleted.

8 changes: 0 additions & 8 deletions setup.cfg

This file was deleted.

0 comments on commit f4aaaae

Please sign in to comment.