Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [ "3.11", "3.15-dev" ]
python-version: [ "3.11", "3.15" ]
os: [ windows-latest, ubuntu-latest, macos-latest ]
fail-fast: false

Expand All @@ -36,6 +36,6 @@ jobs:

- name: Tests
run: |
python -m pytest -s -rxs -v gsw/tests
python -m pytest -s -rxs -v -W error gsw/tests
permissions:
actions: none
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ repos:
- --ignore-words-list=nin,preformed,wih,pres,

- repo: https://github.com/tox-dev/pyproject-fmt
rev: v2.30.3
rev: v2.30.6
hooks:
- id: pyproject-fmt

Expand All @@ -31,7 +31,7 @@ repos:
- id: ruff

- repo: https://github.com/woodruffw/zizmor-pre-commit
rev: v1.31.1
rev: v1.32.0
hooks:
- id: zizmor

Expand Down
8 changes: 7 additions & 1 deletion gsw/_utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,13 @@ def wrapper(*args, **kwargs):
)
where = ~mask

new_kwargs = {"where": where}
# Values under the mask are left uninitialized, which is fine for masked
# arrays; passing out=None explicitly avoids numpy's "'where' used
# without 'out'" warning. Multi-output ufuncs need one None per output.
nout = len(f.types[0].split("->")[1]) if hasattr(f, "types") else 1
out = None if nout == 1 else (None,) * nout

new_kwargs = {"where": where, "out": out}
new_kwargs.update(
**kwargs
) # Allow user override of the where kwarg if they passed it in.
Expand Down
5 changes: 5 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,8 @@ ignore = [
"tools",
"tools/*",
]

[tool.pytest]
ini_options.filterwarnings = [
"error:::gsw.*",
]
Loading