Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
clbarnes committed Jan 18, 2024
1 parent 7bb2855 commit 61aa086
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 17 deletions.
6 changes: 3 additions & 3 deletions nblast-py/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ clean-test: ## remove test and coverage artifacts
rm -fr .pytest_cache

fmt:
black $(PY_PATHS)
ruff format $(PY_PATHS)
cargo fmt

lint: ## check style with flake8
flake8 $(PY_PATHS)
black --check $(PY_PATHS)
ruff check $(PY_PATHS)
ruff format --check $(PY_PATHS)

test: ## run tests quickly with the default Python
maturin develop
Expand Down
4 changes: 1 addition & 3 deletions nblast-py/python/pynblast/arena.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,7 @@ def add_points_tangents_alphas(
if alphas.shape != (len(points),):
raise ValueError("Alphas must be 1D and have same length as points")

return self._impl.add_points_tangents_alphas(
points, tangents, alphas
)
return self._impl.add_points_tangents_alphas(points, tangents, alphas)

def query_target(
self,
Expand Down
1 change: 0 additions & 1 deletion nblast-py/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,4 @@ watchdog==2.3.1
ruff
coverage==7.2.1
Sphinx==6.1.3
black==23.1
mypy==1.1.1
2 changes: 0 additions & 2 deletions nblast-rs/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,6 @@ impl Symmetry {
}
}



/// The result of comparing two (point, tangent) tuples.
/// Contains the Euclidean distance between the points,
/// and the absolute dot product of the (unit) tangents,
Expand Down
10 changes: 2 additions & 8 deletions nblast-rs/src/neurons/nabo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,7 @@ impl NaboTangentsAlphas {
let (tree, tangents_alphas) = points_to_nabo_tangents_alphas(points.iter(), k);
Self {
tree,
points_tangents_alphas: points
.into_iter()
.zip(tangents_alphas)
.collect(),
points_tangents_alphas: points.into_iter().zip(tangents_alphas).collect(),
}
}

Expand All @@ -120,10 +117,7 @@ impl NaboTangentsAlphas {
let tree = points_to_nabo(points.iter());
Self {
tree,
points_tangents_alphas: points
.into_iter()
.zip(tangents_alphas)
.collect(),
points_tangents_alphas: points.into_iter().zip(tangents_alphas).collect(),
}
}
}
Expand Down

0 comments on commit 61aa086

Please sign in to comment.