From 2de48675f03819338961047feecbf76b927bf082 Mon Sep 17 00:00:00 2001 From: Filipe Fernandes Date: Wed, 9 Aug 2023 08:04:00 -0300 Subject: [PATCH 1/3] use setuptools instead of distutils --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 6a33d6e..6924b1b 100644 --- a/setup.py +++ b/setup.py @@ -6,10 +6,10 @@ import os import shutil import sys -from distutils.command.build_ext import build_ext as _build_ext import pkg_resources from setuptools import Extension, setup +from setuptools.command.build_ext import build_ext as _build_ext rootpath = os.path.abspath(os.path.dirname(__file__)) From 129a3b9a3c13c9a5ffd306d11cc58a0061ceca56 Mon Sep 17 00:00:00 2001 From: Filipe Fernandes Date: Wed, 9 Aug 2023 08:04:08 -0300 Subject: [PATCH 2/3] update pre-commits --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8671302..69149b3 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -20,13 +20,13 @@ repos: - --ignore-words-list=nin,preformed,wih, - repo: https://github.com/tox-dev/pyproject-fmt - rev: 0.12.1 + rev: 0.13.0 hooks: - id: pyproject-fmt - repo: https://github.com/charliermarsh/ruff-pre-commit - rev: v0.0.274 + rev: v0.0.283 hooks: - id: ruff From 43c7a36a816b81efd5d83ab49f99568e9dbddcc3 Mon Sep 17 00:00:00 2001 From: Filipe Fernandes Date: Wed, 9 Aug 2023 08:04:15 -0300 Subject: [PATCH 3/3] run pre-commit fixes --- gsw/geostrophy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gsw/geostrophy.py b/gsw/geostrophy.py index bbc6211..d8c5fda 100644 --- a/gsw/geostrophy.py +++ b/gsw/geostrophy.py @@ -179,7 +179,7 @@ def distance(lon, lat, p=0, axis=-1): raise ValueError(f'lon, lat shapes must match; found {lon.shape}, {lat.shape}') if not (lon.ndim in (1, 2) and lon.shape[axis] > 1): raise ValueError('lon, lat must be 1-D or 2-D with more than one point' - ' along axis; found shape {} and axis {}'.format(lon.shape, axis)) + f' along axis; found shape {lon.shape} and axis {axis}') if lon.ndim == 1: one_d = True # xarray requires expand_dims() rather than [newaxis, :]