diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e71944875..3b4c90656 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -15,7 +15,7 @@ repos: # Standard hooks - repo: https://github.com/pre-commit/pre-commit-hooks - rev: "v4.2.0" + rev: "v4.3.0" hooks: - id: check-added-large-files - id: check-case-conflict @@ -32,7 +32,7 @@ repos: # Upgrade old Python syntax - repo: https://github.com/asottile/pyupgrade - rev: "v2.33.0" + rev: "v2.34.0" hooks: - id: pyupgrade args: [--py36-plus] @@ -123,7 +123,7 @@ repos: # Check static types with mypy - repo: https://github.com/pre-commit/mirrors-mypy - rev: "v0.960" + rev: "v0.961" hooks: - id: mypy args: [] @@ -164,7 +164,7 @@ repos: # Clang format the codebase automatically - repo: https://github.com/pre-commit/mirrors-clang-format - rev: "v14.0.3" + rev: "v14.0.4-1" hooks: - id: clang-format types_or: [c++, c, cuda] diff --git a/include/pybind11/numpy.h b/include/pybind11/numpy.h index 97a71e453..12a3dddf3 100644 --- a/include/pybind11/numpy.h +++ b/include/pybind11/numpy.h @@ -1526,7 +1526,7 @@ PYBIND11_NOINLINE void register_structured_dtype(any_container } auto tindex = std::type_index(tinfo); - numpy_internals.registered_dtypes[tindex] = {dtype_ptr, format_str}; + numpy_internals.registered_dtypes[tindex] = {dtype_ptr, std::move(format_str)}; get_internals().direct_conversions[tindex].push_back(direct_converter); }