Skip to content

Commit

Permalink
fix ruff error
Browse files Browse the repository at this point in the history
  • Loading branch information
kjmeagher committed Apr 4, 2024
1 parent c9d6de4 commit 545ea52
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
9 changes: 3 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,12 @@ repos:
rev: v4.0.0-alpha.8
hooks:
- id: prettier
- repo: https://github.com/psf/black
rev: 24.3.0
hooks:
- id: black
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.3.4
rev: v0.3.5
hooks:
- id: ruff
args: [--fix]
args: [--fix, --show-fixes]
- id: ruff-format
- repo: https://github.com/pycqa/pylint
rev: v3.1.0
hooks:
Expand Down
1 change: 1 addition & 0 deletions ehist/bayesian_blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
.. [1] https://ui.adsabs.harvard.edu/abs/2013ApJ...764..167S
.. [2] https://www.astroml.org/ https://github.com//astroML/astroML/
"""

import warnings
from inspect import signature

Expand Down
4 changes: 3 additions & 1 deletion tests/test_hist1d.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
#
# SPDX-License-Identifier: BSD-2-Clause

import functools
import operator
import unittest

import numpy as np
Expand All @@ -20,7 +22,7 @@ def quadratic(x, a, b, c):

class TestAxis(unittest.TestCase):
def test_integer(self):
v = sum([i * [i] for i in range(10)], [])
v = functools.reduce(operator.iadd, [i * [i] for i in range(10)], [])
h = Hist1D(v)
assert_allclose(h.N, range(1, 10))
assert_allclose(h.H, range(1, 10))
Expand Down

0 comments on commit 545ea52

Please sign in to comment.