From 9cf0fbe6810a73fa36d93b01552ccb4c9f4d0766 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 17 Oct 2026 13:03:03 +0000 Subject: [PATCH 1/2] Bump the pre-commit group with 4 updates Bumps the pre-commit group with 4 updates: [https://github.com/asottile/pyupgrade](https://github.com/asottile/pyupgrade), [https://github.com/psf/black](https://github.com/psf/black), [https://github.com/pre-commit/mirrors-clang-format](https://github.com/pre-commit/mirrors-clang-format) and [https://github.com/MarcoGorelli/cython-lint](https://github.com/MarcoGorelli/cython-lint). Updates `https://github.com/asottile/pyupgrade` from v3.21.2 to 3.22.0 - [Commits](https://github.com/asottile/pyupgrade/compare/v3.21.2...v3.22.0) Updates `https://github.com/psf/black` from 26.5.1 to 26.10.1 - [Release notes](https://github.com/psf/black/releases) - [Changelog](https://github.com/psf/black/blob/main/CHANGES.md) - [Commits](https://github.com/psf/black/compare/26.5.1...26.10.1) Updates `https://github.com/pre-commit/mirrors-clang-format` from v23.1.2 to 23.1.3 - [Commits](https://github.com/pre-commit/mirrors-clang-format/compare/v23.1.2...v23.1.3) Updates `https://github.com/MarcoGorelli/cython-lint` from v0.21.1 to 0.22.0 - [Release notes](https://github.com/MarcoGorelli/cython-lint/releases) - [Commits](https://github.com/MarcoGorelli/cython-lint/compare/v0.21.1...v0.22.0) --- updated-dependencies: - dependency-name: https://github.com/asottile/pyupgrade dependency-version: 3.22.0 dependency-type: direct:production dependency-group: pre-commit - dependency-name: https://github.com/psf/black dependency-version: 26.10.1 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: pre-commit - dependency-name: https://github.com/pre-commit/mirrors-clang-format dependency-version: 23.1.3 dependency-type: direct:production dependency-group: pre-commit - dependency-name: https://github.com/MarcoGorelli/cython-lint dependency-version: 0.22.0 dependency-type: direct:production dependency-group: pre-commit ... Signed-off-by: dependabot[bot] --- .pre-commit-config.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e697bcf2d67..7fe12fa4bd0 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -53,7 +53,7 @@ repos: - id: rst-inline-touching-normal - id: text-unicode-replacement-char - repo: https://github.com/asottile/pyupgrade - rev: v3.21.2 + rev: v3.22.0 hooks: - id: pyupgrade - repo: https://github.com/codespell-project/codespell @@ -64,7 +64,7 @@ repos: additional_dependencies: - tomli - repo: https://github.com/psf/black - rev: 26.5.1 + rev: 26.10.1 hooks: - id: black exclude: "dpnp/_version.py" @@ -89,7 +89,7 @@ repos: - flake8-docstrings==1.7.0 - flake8-bugbear==26.9.30 - repo: https://github.com/pre-commit/mirrors-clang-format - rev: v23.1.2 + rev: v23.1.3 hooks: - id: clang-format args: ["-i"] @@ -134,7 +134,7 @@ repos: exclude: "dpnp/backend/cmake/Modules/" args: ["-i", "-l", "88", "--no-warn-about-unknown-commands"] - repo: https://github.com/MarcoGorelli/cython-lint - rev: v0.21.1 + rev: v0.22.0 hooks: - id: cython-lint - id: double-quote-cython-strings From e228fc92c3c1ce6bc0e1535edfc548b066c6a3d8 Mon Sep 17 00:00:00 2001 From: Anton Volkov Date: Mon, 19 Oct 2026 19:05:30 +0200 Subject: [PATCH 2/2] Address pre-commit issues for pyupgrade 3.22.0 and cython-lint 0.22.0 --- dpnp/dpnp_algo/dpnp_algo.pxd | 4 +-- dpnp/dpnp_utils/dpnp_algo_utils.pxd | 35 +++++++------------ .../cupy/statistics_tests/test_histogram.py | 2 +- 3 files changed, 15 insertions(+), 26 deletions(-) diff --git a/dpnp/dpnp_algo/dpnp_algo.pxd b/dpnp/dpnp_algo/dpnp_algo.pxd index e83b6b58859..2ac2a0a0453 100644 --- a/dpnp/dpnp_algo/dpnp_algo.pxd +++ b/dpnp/dpnp_algo/dpnp_algo.pxd @@ -97,8 +97,6 @@ cdef extern from "dpnp_iface_fptr.hpp": ) except + -""" -Internal functions -""" +# Internal functions cdef DPNPFuncType dpnp_dtype_to_DPNPFuncType(dtype) cdef dpnp_DPNPFuncType_to_dtype(size_t type) diff --git a/dpnp/dpnp_utils/dpnp_algo_utils.pxd b/dpnp/dpnp_utils/dpnp_algo_utils.pxd index 3d0ff12621b..7b99aec3dd3 100644 --- a/dpnp/dpnp_utils/dpnp_algo_utils.pxd +++ b/dpnp/dpnp_utils/dpnp_algo_utils.pxd @@ -34,29 +34,24 @@ from dpnp.dpnp_algo cimport shape_type_c from dpnp.dpnp_algo.dpnp_algo cimport DPNPFuncType +# Throw exception ValueError if 'param' is not 'expected' cpdef checker_throw_value_error(function_name, param_name, param, expected) -""" Throw exception ValueError if 'param' is not 'expected' - -""" +# Throw exception TypeError if 'given_type' type is not supported cpdef checker_throw_type_error(function_name, given_type) -""" Throw exception TypeError if 'given_type' type is not supported - -""" +# This function needs to redirect particular computation cases to original +# backend +# +# Parameters: +# input1: One of the input parameter of the API function +# compute_size: Some amount of total compute size of the task +# Return: +# True - computations are better to be executed on original backend +# False - it is better to use this SW to compute cpdef cpp_bool use_origin_backend(input1=*, size_t compute_size=*) -""" -This function needs to redirect particular computation cases to original backend - -Parameters: - input1: One of the input parameter of the API function - compute_size: Some amount of total compute size of the task -Return: - True - computations are better to be executed on original backend - False - it is better to use this SW to compute -""" cpdef tuple _object_to_tuple(object obj) @@ -73,17 +68,13 @@ cdef class dpnp_descriptor: cdef void * get_data(self) +# Create output dpnp_descriptor based on shape, type and 'out' parameters cdef dpnp_descriptor create_output_descriptor(shape_type_c output_shape, DPNPFuncType c_type, dpnp_descriptor requested_out, device=*, usm_type=*, sycl_queue=*) -""" -Create output dpnp_descriptor based on shape, type and 'out' parameters -""" +# Get common USM allocation in the form of (sycl_device, usm_type, sycl_queue) cdef tuple get_common_usm_allocation(dpnp_descriptor x1, dpnp_descriptor x2) -""" -Get common USM allocation in the form of (sycl_device, usm_type, sycl_queue) -""" diff --git a/dpnp/tests/third_party/cupy/statistics_tests/test_histogram.py b/dpnp/tests/third_party/cupy/statistics_tests/test_histogram.py index cfaeeecf55a..f014dd0dff8 100644 --- a/dpnp/tests/third_party/cupy/statistics_tests/test_histogram.py +++ b/dpnp/tests/third_party/cupy/statistics_tests/test_histogram.py @@ -665,7 +665,7 @@ def test_histogramdd(self, xp, dtype): ) return [ y, - ] + [e for e in bin_edges] + ] + [*bin_edges] class TestHistogramddErrors(unittest.TestCase):