Skip to content

Commit

Permalink
Merge pull request #88 from funkelab/update-precommit
Browse files Browse the repository at this point in the history
Use ruff-format, add Caroline to authors
  • Loading branch information
tlambert03 authored Apr 30, 2024
2 parents 09f5c33 + b11d0ef commit 022c813
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 12 deletions.
10 changes: 3 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,14 @@ ci:

repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.3.4
rev: v0.4.2
hooks:
- id: ruff
args: [--fix, --unsafe-fixes]

- repo: https://github.com/psf/black
rev: 24.3.0
hooks:
- id: black
- id: ruff-format

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.9.0
rev: v1.10.0
hooks:
- id: mypy
files: "^motile/"
1 change: 0 additions & 1 deletion motile/costs/edge_distance.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ def apply(self, solver: Solver) -> None:
solver.add_variable_cost(index, 1.0, self.constant)

def __get_node_position(self, graph: nx.DiGraph, node: int) -> np.ndarray:

if isinstance(self.position_attribute, tuple):
return np.array([graph.nodes[node][p] for p in self.position_attribute])
else:
Expand Down
7 changes: 4 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ license = { text = "MIT" }
authors = [
{ name = 'Jan Funke', email = '[email protected]' },
{ name = 'Talley Lambert', email = '[email protected]' },
{ name = 'Caroline Malin-Mayor', email = '[email protected]' },
{ name = 'Benjamin Gallusser', email = '[email protected]' },
{ name = 'Florian Jug', email = '[email protected]' },
]
Expand Down Expand Up @@ -44,6 +45,7 @@ path = "motile/__init__.py"
[tool.ruff]
target-version = "py38"
src = ["motile"]

[tool.ruff.lint]
select = [
"F", # pyflakes
Expand All @@ -58,13 +60,12 @@ ignore = [
"D104", # Missing docstring in public package
"D105", # Missing docstring in magic method
"D107", # Missing docstring in `__init__`

"D102", # Missing docstring in public method
# "D205", # 1 blank line required between summary line and description

]

[tool.ruff.lint.pydocstyle]
convention = "google"

[tool.ruff.lint.per-file-ignores]
"tests/*" = ["D"]

Expand Down
1 change: 0 additions & 1 deletion tests/test_constraints.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ def test_max_parents(solver: motile.Solver) -> None:


def test_exlusive_nodes(solver: motile.Solver) -> None:

exclusive_sets = [
[0, 1],
[2, 3],
Expand Down

0 comments on commit 022c813

Please sign in to comment.