From af6661ee732fa3bc3f8fa385433915b8a809d76e Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 10 Aug 2023 17:54:11 +0200 Subject: [PATCH] [pre-commit.ci] pre-commit autoupdate (#28) --- .pre-commit-config.yaml | 10 ++++++++-- src/lcm/simulate.py | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1aaeb9a7..0191b521 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -6,7 +6,7 @@ repos: - id: check-useless-excludes # - id: identity # Prints all files passed to pre-commits. Debugging. - repo: https://github.com/lyz-code/yamlfix - rev: 1.12.0 + rev: 1.13.0 hooks: - id: yamlfix - repo: https://github.com/pre-commit/pre-commit-hooks @@ -54,7 +54,7 @@ repos: hooks: - id: blacken-docs - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.0.278 + rev: v0.0.282 hooks: - id: ruff # args: @@ -70,8 +70,14 @@ repos: rev: 1.7.0 hooks: - id: nbqa-black + additional_dependencies: + - black==23.7.0 exclude: src/lcm/sandbox/ - id: nbqa-ruff + additional_dependencies: + - ruff==v0.0.281 + args: + - --ignore=B018,T201 exclude: src/lcm/sandbox/ - repo: https://github.com/executablebooks/mdformat rev: 0.7.16 diff --git a/src/lcm/simulate.py b/src/lcm/simulate.py index aff803ee..3fb1ec95 100644 --- a/src/lcm/simulate.py +++ b/src/lcm/simulate.py @@ -274,7 +274,7 @@ def create_data_scs( has_sparse_choice_vars = len(vi.query("is_sparse & is_choice")) > 0 - n_states = len(list(states.values())[0]) + n_states = len(next(iter(states.values()))) # check that all states have an initial value # ==================================================================================