Skip to content

Commit 58ab2ff

Browse files
committed
[Pre-Commit] Add shell check and pin to shas
Added shellcheck to the precommit. WIWT: Pinned ruff-pre-commit to latest in the format SRE has been doing with GitHub Actions. Update caused changed and included that change.
1 parent 84f9ce0 commit 58ab2ff

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

.pre-commit-config.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
repos:
22
- repo: https://github.com/astral-sh/ruff-pre-commit
33
# Ruff version.
4-
rev: v0.14.0
4+
rev: 745be0411e3c150e246d527e531e5a221b8c3462 # v0.15.19
55
hooks:
66
# Run the linter.
77
- id: ruff-check
88
args: [ --fix ]
99
# Run the formatter.
1010
- id: ruff-format
11+
- repo: https://github.com/shellcheck-py/shellcheck-py
12+
rev: 745eface02aef23e168a8afb6b5737818efbea95 # v0.11.0.1
13+
hooks:
14+
- id: shellcheck
15+
args: [ "-S", "error" ]

ciq_tag.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -398,10 +398,10 @@ def add_tag(
398398
# Find the first property which is 'greater' than inserted_tag in the sense that it appears
399399
# later in the CiqTag enum dictating the order in which properties are expected to occur
400400
# in a message. The inserted_tag will be inserted right before it, if it exists, or right after
401-
# the last existing property, if any exists, or at the begginging of the message body otherwise.
401+
# the last existing property, if any exists, or at the beginning of the message body otherwise.
402402
first_greater = mit.first_true(
403403
range(len(self._tags)),
404-
pred=lambda i: (inserted_tag.get_order_num() < self._tags[i]._tag_type.get_order_num()),
404+
pred=lambda i: inserted_tag.get_order_num() < self._tags[i]._tag_type.get_order_num(),
405405
default=len(self._tags),
406406
)
407407
self._tags.insert(

0 commit comments

Comments
 (0)