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