Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#35)
Browse files Browse the repository at this point in the history
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/pre-commit/pre-commit-hooks: v4.5.0 → v4.6.0](pre-commit/pre-commit-hooks@v4.5.0...v4.6.0)
- [github.com/asottile/pyupgrade: v3.15.0 → v3.15.2](asottile/pyupgrade@v3.15.0...v3.15.2)
- [github.com/psf/black: 23.12.1 → 24.4.2](psf/black@23.12.1...24.4.2)
- [github.com/PyCQA/flake8: 6.1.0 → 7.0.0](PyCQA/flake8@6.1.0...7.0.0)
- [github.com/pre-commit/mirrors-clang-format: v17.0.6 → v18.1.4](pre-commit/mirrors-clang-format@v17.0.6...v18.1.4)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
pre-commit-ci[bot] authored May 17, 2024
1 parent e1800d9 commit 21af110
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ exclude: "third_party/nanoflann.hpp"

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: "v4.5.0"
rev: "v4.6.0"
hooks:
- id: check-added-large-files
- id: check-case-conflict
Expand All @@ -29,7 +29,7 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/asottile/pyupgrade
rev: "v3.15.0"
rev: "v3.15.2"
hooks:
- id: pyupgrade
args: [--py36-plus]
Expand All @@ -40,19 +40,19 @@ repos:
- id: isort

- repo: https://github.com/psf/black
rev: "23.12.1"
rev: "24.4.2"
hooks:
- id: black
args: [--line-length=79]

- repo: https://github.com/PyCQA/flake8
rev: 6.1.0
rev: 7.0.0
hooks:
- id: flake8
args: [--extend-ignore=E203]

- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v17.0.6
rev: v18.1.4
hooks:
- id: clang-format
types_or: [c++]
8 changes: 3 additions & 5 deletions src/python/pykdt.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,7 @@ class PyKDT {
DistT* d_buf_ptr = static_cast<DistT*>(d_buf.ptr);

if (kneighbors > static_cast<int>(datalen_)) {
std::cout << "WARNING - "
<< "kneighbors (" << kneighbors
std::cout << "WARNING - " << "kneighbors (" << kneighbors
<< ") is bigger than number of tree data (" << datalen_ << "! "
<< "Returning arrays `[:, " << datalen_ - kneighbors
<< ":]` entries will be filled with random indices."
Expand Down Expand Up @@ -352,9 +351,8 @@ class PyKDT {
// execution ending error is too brutal and merciless
// print warning and return empty
if (qlen != rlen) {
std::cout << "CRITICAL WARNING - "
<< "query length (" << qlen << ") and radii length (" << rlen
<< ") differ! "
std::cout << "CRITICAL WARNING - " << "query length (" << qlen
<< ") and radii length (" << rlen << ") differ! "
<< "returning empty tuple." << std::endl;

return py::tuple{};
Expand Down

0 comments on commit 21af110

Please sign in to comment.