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 # ==================================================================================