Skip to content

Commit bd6c739

Browse files
authored
chore: Update pre-commit (#6657)
1 parent 67a71f2 commit bd6c739

9 files changed

Lines changed: 9 additions & 10 deletions

File tree

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ repos:
1717
- id: check-json
1818
- id: detect-private-key
1919
- repo: https://github.com/astral-sh/ruff-pre-commit
20-
rev: v0.12.0
20+
rev: v0.12.7
2121
hooks:
2222
- id: ruff-check
2323
- repo: https://github.com/hoxbro/clean_notebook
@@ -42,7 +42,7 @@ repos:
4242
hooks:
4343
- id: shellcheck
4444
- repo: https://github.com/hoxbro/prettier-pre-commit
45-
rev: v3.5.3
45+
rev: v3.6.2
4646
hooks:
4747
- id: prettier
4848
exclude: conda.recipe/meta.yaml

doc/releases.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4298,7 +4298,6 @@ API changes:
42984298
- Interface to Pandas improved (1a7cd3d)
42994299
- Removed `xlim`, `ylim` and `zlim` to eliminate redundancy.
43004300
- Renaming of various plot and style options including:
4301-
43024301
- `figure_*` to `fig_*`
43034302
- `vertical_spacing` and `horizontal_spacing` to `vspace` and
43044303
`hspace` respectively

holoviews/core/data/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1053,7 +1053,7 @@ def groupby(self, dimensions=None, container_type=HoloMap, group_type=None,
10531053
if dimensions is None:
10541054
dimensions = []
10551055
if not isinstance(dimensions, list): dimensions = [dimensions]
1056-
if not len(dimensions): dimensions = self.dimensions('key', True)
1056+
if not dimensions: dimensions = self.dimensions('key', True)
10571057
if group_type is None: group_type = type(self)
10581058

10591059
dimensions = [self.get_dimension(d, strict=True) for d in dimensions]

holoviews/core/data/interface.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ def range(cls, dataset, dimension):
424424
return finite_range(column, np.nanmin(column), np.nanmax(column))
425425
except (AssertionError, TypeError):
426426
column = [v for v in util.python2sort(column) if v is not None]
427-
if not len(column):
427+
if not column:
428428
return np.nan, np.nan
429429
return column[0], column[-1]
430430

holoviews/core/ndmapping.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ def reindex(self, kdims=None, force=False):
441441
old_kdims = [d.name for d in self.kdims]
442442
if not isinstance(kdims, list):
443443
kdims = [kdims]
444-
elif not len(kdims):
444+
elif not kdims:
445445
kdims = [d for d in old_kdims
446446
if not len(set(self.dimension_values(d))) == 1]
447447
indices = [self.get_dimension_index(el) for el in kdims]

holoviews/core/util/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -961,7 +961,7 @@ def find_range(values, soft_range=None):
961961
try:
962962
values = np.array(values)
963963
values = np.squeeze(values) if len(values.shape) > 1 else values
964-
if len(soft_range):
964+
if soft_range:
965965
values = np.concatenate([values, soft_range])
966966
if values.dtype.kind == 'M':
967967
return values.min(), values.max()

holoviews/element/raster.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ def closest(self, coords=None, **kwargs):
484484
coords = [(0, c) if idx else (c, 0) for c in v]
485485
if len(coords) not in [0, len(v)]:
486486
raise ValueError("Length of samples must match")
487-
elif len(coords):
487+
elif coords:
488488
coords = [(t[abs(idx-1)], c) if idx else (c, t[abs(idx-1)])
489489
for c, t in zip(v, coords, strict=None)]
490490
getter.append(idx)

holoviews/plotting/bokeh/sankey.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ def _compute_labels(self, element, data, mapping):
171171
xs = np.array([node['x0'] for node in nodes]) - offset
172172

173173
for i, node in enumerate(nodes):
174-
if len(text):
174+
if text:
175175
label = text[i]
176176
else:
177177
label = ''

holoviews/plotting/mpl/sankey.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ def get_data(self, element, ranges, style):
9696
x0, x1, y0, y1 = (node[a+i] for a in 'xy' for i in '01')
9797
rect = {'height': y1-y0, 'width': x1-x0, 'xy': (x0, y0)}
9898
rects.append(rect)
99-
if len(text):
99+
if text:
100100
label = text[i]
101101
else:
102102
label = ''

0 commit comments

Comments
 (0)