diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0139ef21..09f58811 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,7 +4,7 @@ ci: repos: - repo: https://github.com/psf/black - rev: 23.1.0 + rev: 23.3.0 hooks: - id: black-jupyter @@ -23,7 +23,7 @@ repos: - id: trailing-whitespace - repo: https://github.com/charliermarsh/ruff-pre-commit - rev: v0.0.258 + rev: v0.0.264 hooks: - id: ruff args: ["--fix", "--show-fixes"] @@ -35,14 +35,14 @@ repos: # Notebook formatting - repo: https://github.com/nbQA-dev/nbQA - rev: 1.6.4 + rev: 1.7.0 hooks: - id: nbqa-ruff additional_dependencies: [ruff==0.0.253] args: ["--extend-ignore=B008,T20,I002,E402", "--fix", "--show-fixes"] - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.1.1 + rev: v1.2.0 hooks: - id: mypy files: ^src diff --git a/pyproject.toml b/pyproject.toml index 23cbbb1f..82067cee 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -199,7 +199,7 @@ select = [ "UP", # pyupgrade "YTT", # flake8-2020 ] -extend-ignore = ["PLR", "E501", "PT011", "PT013", "PT004"] +extend-ignore = ["PLR", "E501", "PT011", "PT013", "PT004", "B017"] target-version = "py37" typing-modules = ["hist._compat.typing"] src = ["src"] diff --git a/tests/baseline/test_plot1d_auto_handling.png b/tests/baseline/test_plot1d_auto_handling.png index d56aea8c..8ba6869e 100644 Binary files a/tests/baseline/test_plot1d_auto_handling.png and b/tests/baseline/test_plot1d_auto_handling.png differ diff --git a/tests/test_general.py b/tests/test_general.py index 29ffe77e..9269ef31 100644 --- a/tests/test_general.py +++ b/tests/test_general.py @@ -687,8 +687,7 @@ def test_hist_proxy(): assert type(h) == Hist - with pytest.raises(AttributeError): - Hist().new + assert not hasattr(Hist(), "new") h = ( Hist.new.Reg(10, 0, 1, name="x") diff --git a/tests/test_named.py b/tests/test_named.py index 911bd575..f1c58b5a 100644 --- a/tests/test_named.py +++ b/tests/test_named.py @@ -725,8 +725,7 @@ def test_named_hist_proxy(): assert type(h) is NamedHist - with pytest.raises(AttributeError): - NamedHist().new + assert not hasattr(NamedHist(), "new") h = ( NamedHist.new.Reg(10, 0, 1, name="x")