From a6177fe3693d292cec2eeeda5714590a72ef8ba0 Mon Sep 17 00:00:00 2001 From: YigitElma Date: Thu, 21 May 2026 13:41:40 -0400 Subject: [PATCH 1/2] fix the release error, update black version --- .pre-commit-config.yaml | 2 +- dev-requirements.txt | 2 +- versioneer.py | 9 +++------ 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 19e75a7..8750d50 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/psf/black - rev: 22.10.0 + rev: 26.3.1 hooks: - id: black - repo: https://github.com/pre-commit/pre-commit-hooks diff --git a/dev-requirements.txt b/dev-requirements.txt index 215a2a0..085467d 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -2,7 +2,7 @@ -r requirements.txt # linting -black[jupyter] == 24.10.0 +black[jupyter] == 26.3.1 flake8 ~= 7.3 flake8-docstrings >= 1.0.0, <= 1.7.0 flake8-eradicate >= 1.0.0, <= 1.5.0 diff --git a/versioneer.py b/versioneer.py index 0d3dd81..1088f94 100644 --- a/versioneer.py +++ b/versioneer.py @@ -275,7 +275,6 @@ """ - try: import configparser except ImportError: @@ -342,9 +341,9 @@ def get_config_from_root(root): # configparser.NoOptionError (if it lacks "VCS="). See the docstring at # the top of versioneer.py for instructions on writing your setup.cfg . setup_cfg = os.path.join(root, "setup.cfg") - parser = configparser.SafeConfigParser() + parser = configparser.ConfigParser() with open(setup_cfg) as f: - parser.readfp(f) + parser.read_file(f) VCS = parser.get("versioneer", "VCS") # mandatory def get(parser, name): @@ -426,9 +425,7 @@ def run_command(commands, args, cwd=None, verbose=False, hide_stderr=False, env= return stdout, p.returncode -LONG_VERSION_PY[ - "git" -] = r''' +LONG_VERSION_PY["git"] = r''' # This file helps to compute a version number in source trees obtained from # git-archive tarball (such as those provided by githubs download-from-tag # feature). Distribution tarballs (built by setup.py sdist) and build From fe97114db9bc0a3b82b04e25806c395c7a874199 Mon Sep 17 00:00:00 2001 From: YigitElma Date: Thu, 21 May 2026 13:46:00 -0400 Subject: [PATCH 2/2] format black --- zernipax/backend.py | 4 ++-- zernipax/zernike.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/zernipax/backend.py b/zernipax/backend.py index 0e24153..140d5ff 100644 --- a/zernipax/backend.py +++ b/zernipax/backend.py @@ -80,8 +80,8 @@ def _dummy_jvp(nondiff_dr, x, xdot): This is just the same function called with dx+1. """ - (r, l, m) = x - (rdot, ldot, mdot) = xdot + r, l, m = x + rdot, ldot, mdot = xdot f = dummy(r, l, m, nondiff_dr) df = dummy(r, l, m, nondiff_dr + 1) return f, (df.T * rdot).T diff --git a/zernipax/zernike.py b/zernipax/zernike.py index 1a04dbc..c905d1f 100644 --- a/zernipax/zernike.py +++ b/zernipax/zernike.py @@ -569,8 +569,8 @@ def _jacobi_body_fun(kk, d_p_a_b_x): @_jacobi.defjvp def _jacobi_jvp(dx, x, xdot): - (n, alpha, beta, x) = x - (ndot, alphadot, betadot, xdot) = xdot + n, alpha, beta, x = x + ndot, alphadot, betadot, xdot = xdot f = _jacobi(n, alpha, beta, x, dx) df = _jacobi(n, alpha, beta, x, dx + 1) return f, df * xdot