Skip to content

Commit

Permalink
chore(deps): update pre-commit hooks (#5123)
Browse files Browse the repository at this point in the history
* chore(deps): update pre-commit hooks

updates:
- [github.com/pre-commit/mirrors-clang-format: v18.1.2 → v18.1.4](pre-commit/mirrors-clang-format@v18.1.2...v18.1.4)
- [github.com/astral-sh/ruff-pre-commit: v0.3.5 → v0.4.3](astral-sh/ruff-pre-commit@v0.3.5...v0.4.3)
- [github.com/pre-commit/mirrors-mypy: v1.9.0 → v1.10.0](pre-commit/mirrors-mypy@v1.9.0...v1.10.0)
- [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/python-jsonschema/check-jsonschema: 0.28.1 → 0.28.2](python-jsonschema/check-jsonschema@0.28.1...0.28.2)

* style: pre-commit fixes

* Update .pre-commit-config.yaml

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Henry Schreiner <[email protected]>
  • Loading branch information
pre-commit-ci[bot] and henryiii authored May 10, 2024
1 parent ede061c commit aa98d95
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
12 changes: 6 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,22 @@ repos:

# Clang format the codebase automatically
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: "v18.1.2"
rev: "v18.1.4"
hooks:
- id: clang-format
types_or: [c++, c, cuda]

# Ruff, the Python auto-correcting linter/formatter written in Rust
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.3.5
rev: v0.4.3
hooks:
- id: ruff
args: ["--fix", "--show-fixes"]
- id: ruff-format

# Check static types with mypy
- repo: https://github.com/pre-commit/mirrors-mypy
rev: "v1.9.0"
rev: "v1.10.0"
hooks:
- id: mypy
args: []
Expand All @@ -62,7 +62,7 @@ repos:

# Standard hooks
- 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 Down Expand Up @@ -123,7 +123,7 @@ repos:
hooks:
- id: codespell
exclude: ".supp$"
args: ["-x.codespell-ignore-lines", "-Lccompiler"]
args: ["-x.codespell-ignore-lines", "-Lccompiler,intstruct"]

# Check for common shell mistakes
- repo: https://github.com/shellcheck-py/shellcheck-py
Expand All @@ -148,7 +148,7 @@ repos:
files: ^pybind11

- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.28.1
rev: 0.28.2
hooks:
- id: check-readthedocs
- id: check-github-workflows
Expand Down
2 changes: 1 addition & 1 deletion tests/test_class.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ TEST_SUBMODULE(class_, m) {
// [workaround(intel)] = default does not work here
// Removing or defaulting this destructor results in linking errors with the Intel compiler
// (in Debug builds only, tested with icpc (ICC) 2021.1 Beta 20200827)
~PublicistB() override{}; // NOLINT(modernize-use-equals-default)
~PublicistB() override {}; // NOLINT(modernize-use-equals-default)
using ProtectedB::foo;
using ProtectedB::get_self;
using ProtectedB::void_foo;
Expand Down
2 changes: 1 addition & 1 deletion tests/test_numpy_dtypes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ TEST_SUBMODULE(numpy_dtypes, m) {
// is not a POD type
struct NotPOD {
std::string v;
NotPOD() : v("hi"){};
NotPOD() : v("hi") {};
};
PYBIND11_NUMPY_DTYPE(NotPOD, v);
#endif
Expand Down
2 changes: 1 addition & 1 deletion tests/test_stl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ struct hash<TplCtorClass> {
template <template <typename> class OptionalImpl, typename T>
struct OptionalHolder {
// NOLINTNEXTLINE(modernize-use-equals-default): breaks GCC 4.8
OptionalHolder(){};
OptionalHolder() {};
bool member_initialized() const { return member && member->initialized; }
OptionalImpl<T> member = T{};
};
Expand Down
2 changes: 1 addition & 1 deletion tests/test_thread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace py = pybind11;
namespace {

struct IntStruct {
explicit IntStruct(int v) : value(v){};
explicit IntStruct(int v) : value(v) {};
~IntStruct() { value = -value; }
IntStruct(const IntStruct &) = default;
IntStruct &operator=(const IntStruct &) = default;
Expand Down

0 comments on commit aa98d95

Please sign in to comment.