From 1fef38d12bc0771f1b36584a3baadfb6e713e6f2 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 4 Nov 2024 20:12:21 +0000 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pre-commit/pre-commit-hooks: v4.6.0 → v5.0.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.6.0...v5.0.0) - [github.com/astral-sh/ruff-pre-commit: v0.6.5 → v0.7.2](https://github.com/astral-sh/ruff-pre-commit/compare/v0.6.5...v0.7.2) - [github.com/executablebooks/mdformat: 0.7.17 → 0.7.18](https://github.com/executablebooks/mdformat/compare/0.7.17...0.7.18) - [github.com/kynan/nbstripout: 0.7.1 → 0.8.0](https://github.com/kynan/nbstripout/compare/0.7.1...0.8.0) - [github.com/pre-commit/mirrors-mypy: v1.11.2 → v1.13.0](https://github.com/pre-commit/mirrors-mypy/compare/v1.11.2...v1.13.0) --- .pre-commit-config.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c6c5559..7bb7ad8 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -10,7 +10,7 @@ repos: hooks: - id: yamlfix - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.6.0 + rev: v5.0.0 hooks: - id: check-added-large-files args: @@ -46,7 +46,7 @@ repos: hooks: - id: yamllint - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.6.5 + rev: v0.7.2 hooks: # Run the linter. - id: ruff @@ -63,7 +63,7 @@ repos: - pyi - jupyter - repo: https://github.com/executablebooks/mdformat - rev: 0.7.17 + rev: 0.7.18 hooks: - id: mdformat additional_dependencies: @@ -75,14 +75,14 @@ repos: - '88' files: (README\.md) - repo: https://github.com/kynan/nbstripout - rev: 0.7.1 + rev: 0.8.0 hooks: - id: nbstripout args: - --drop-empty-cells - --keep-output - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.11.2 + rev: v1.13.0 hooks: - id: mypy files: src|tests From ef2dcbd46143f21a1bb92c4b07dee2f9feebd57d Mon Sep 17 00:00:00 2001 From: Tim Mensinger Date: Wed, 13 Nov 2024 16:40:24 +0100 Subject: [PATCH 2/2] Pre-commit Autoupdate; fix pdbp init --- .pre-commit-config.yaml | 2 +- pixi.lock | 6 +++--- pyproject.toml | 4 ++++ src/lcm/__init__.py | 4 +--- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7bb7ad8..8d064bc 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -46,7 +46,7 @@ repos: hooks: - id: yamllint - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.7.2 + rev: v0.7.3 hooks: # Run the linter. - id: ruff diff --git a/pixi.lock b/pixi.lock index b171fcf..8c8c3c8 100644 --- a/pixi.lock +++ b/pixi.lock @@ -6525,9 +6525,9 @@ packages: timestamp: 1719463874284 - kind: pypi name: lcm - version: 0.1.dev179+ga5fc6e2 + version: 0.1.dev174+g1fef38d.d20241113 path: . - sha256: efc514b4c6d74785bd569e7423386104e3e27ccc115200396c7f388d8fbe2b64 + sha256: 81e25560cd9cdc6a4fcd35456d665443f0a128fc6d80d52443ad1fc082e81db7 requires_dist: - dags - numpy @@ -10019,7 +10019,7 @@ packages: sha256: 28575580c6ebdaf4505b22c6256a2b9de86b316dc63ba9e93abde3d78dfdbcf2 requires_dist: - numpy>=1.23 ; extra == 'default' - - scipy!=1.11.0,!=1.11.1,>=1.9 ; extra == 'default' + - scipy>=1.9,!=1.11.0,!=1.11.1 ; extra == 'default' - matplotlib>=3.6 ; extra == 'default' - pandas>=1.4 ; extra == 'default' - changelist==0.5 ; extra == 'developer' diff --git a/pyproject.toml b/pyproject.toml index 2bdb3a3..7be8e6e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -212,6 +212,9 @@ extend-ignore = [ # Private member accessed: `_stochastic_info` "SLF001", + # Use `contextlib.suppress(ImportError)` instead of `try`-`except`-`pass` + "SIM105", + # long messages outside the exception class "TRY003", @@ -247,6 +250,7 @@ markers = [ "illustrative: Tests are designed for illustrative purposes", ] norecursedirs = ["docs", ".envs"] +addopts = ["--pdbcls=pdbp:Pdb"] # ====================================================================================== diff --git a/src/lcm/__init__.py b/src/lcm/__init__.py index 8d1a197..6df028c 100644 --- a/src/lcm/__init__.py +++ b/src/lcm/__init__.py @@ -1,9 +1,7 @@ -import contextlib - try: import pdbp # noqa: F401 except ImportError: - contextlib.suppress(Exception) + pass from lcm import mark from lcm.grids import DiscreteGrid, LinspaceGrid, LogspaceGrid