From d7bf91f401b32ab17629d0911ad6845dcaf80774 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20H=C3=B8xbro=20Hansen?= Date: Sat, 16 Sep 2023 13:30:03 +0200 Subject: [PATCH] Update pre-commit and fixes (#5889) --- .pre-commit-config.yaml | 4 ++-- holoviews/core/data/grid.py | 2 +- pyproject.toml | 1 - 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e1d5c48d7a..524281a259 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -17,13 +17,13 @@ repos: exclude: \.min\.js$ - id: trailing-whitespace - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.0.284 + rev: v0.0.290 hooks: - id: ruff args: [holoviews] files: holoviews/ - repo: https://github.com/hoxbro/clean_notebook - rev: v0.1.10 + rev: v0.1.11 hooks: - id: clean-notebook - repo: https://github.com/codespell-project/codespell diff --git a/holoviews/core/data/grid.py b/holoviews/core/data/grid.py index a92c779142..df39e6217d 100644 --- a/holoviews/core/data/grid.py +++ b/holoviews/core/data/grid.py @@ -131,7 +131,7 @@ def init(cls, eltype, data, kdims, vdims): 'match the expected dimensionality indicated ' 'by the key dimensions. Expected %d-D array, ' 'found %d-D array.' % (vdim, len(expected), len(shape))) - elif any((s!=e and (s+1)!=e) for s, e in zip(shape, valid_shape)): + elif any((e not in (s, s + 1)) for s, e in zip(shape, valid_shape)): raise error(f'Key dimension values and value array {vdim} ' f'shapes do not match. Expected shape {valid_shape}, ' f'actual shape: {shape}', cls) diff --git a/pyproject.toml b/pyproject.toml index 77097111cc..c78d5ef341 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -68,7 +68,6 @@ ignore = [ "E731", # Do not assign a lambda expression, use a def "E741", # Ambiguous variable name "F405", # From star imports - "PLC1901", # empty string is falsey "PLE0604", # Invalid object in `__all__`, must contain only strings "PLE0605", # Invalid format for `__all__` "PLR091", # Too many arguments/branches/statements