Skip to content

Commit a068622

Browse files
committed
update
1 parent 157153c commit a068622

18 files changed

+28
-28
lines changed

.pre-commit-config.yaml

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,46 @@
11
repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v4.0.1
3+
rev: v4.5.0
44
hooks:
55
# - id: check-added-large-files
6-
- id: check-case-conflict
76
- id: check-json
8-
- id: check-merge-conflict
7+
- id: check-toml
98
- id: check-yaml
9+
- id: check-case-conflict
10+
- id: check-merge-conflict
1011
- id: end-of-file-fixer
1112
- id: fix-encoding-pragma
1213
args: [--remove]
1314
- id: mixed-line-ending
1415
- id: trailing-whitespace
1516
args: [--markdown-linebreak-ext=md]
1617
exclude: "__snapshots__/"
17-
# this is not technically always safe but usually is
18-
# use comments `# isort: off` and `# isort: on` to disable/re-enable isort
18+
19+
- repo: https://github.com/psf/black
20+
rev: 23.10.0
21+
hooks:
22+
- id: black
23+
args:
24+
- "--line-length=240"
25+
26+
- repo: https://github.com/astral-sh/ruff-pre-commit
27+
rev: v0.1.1
28+
hooks:
29+
- id: ruff
30+
args:
31+
- "--line-length=240"
32+
1933
- repo: https://github.com/pycqa/isort
2034
rev: 5.12.0
2135
hooks:
2236
- id: isort
2337
args: [--line-length=240, --profile=black]
2438

25-
# this is slightly dangerous because python imports have side effects
26-
# and this tool removes unused imports, which may be providing
27-
# necessary side effects for the code to run
28-
- repo: https://github.com/PyCQA/autoflake
29-
rev: v1.6.1
39+
- repo: https://github.com/codespell-project/codespell
40+
rev: v2.2.5
3041
hooks:
31-
- id: autoflake
32-
args:
33-
- "--in-place"
34-
- "--expand-star-imports"
35-
- "--remove-duplicate-keys"
36-
- "--remove-unused-variables"
37-
- "--remove-all-unused-imports"
38-
39-
- repo: https://github.com/psf/black
40-
rev: 22.8.0
41-
hooks:
42-
- id: black
43-
args: [--line-length=240, --exclude=""]
42+
- id: codespell
43+
types_or: [python, markdown]
4444

4545
- repo: local
4646
hooks:

src/fuzzy_json/decoder.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ def state_int(input: str, stack: list[str]) -> str | None:
186186
if input[0].isspace():
187187
return input[0] + state_post_value(input[1:], stack)
188188
# NOTE:
189-
# the original grammer not accept 3e3 (without dot)
189+
# the original grammar not accept 3e3 (without dot)
190190
if input[0] in {"e", "E"}:
191191
return input[0] + state_exponent_sign(input[1:], stack)
192192

@@ -228,7 +228,7 @@ def state_double(input: str, stack: list[str]) -> str | None:
228228
@state
229229
def state_exponent_sign(input: str, stack: list[str]) -> str | None:
230230
# NOTE:
231-
# the original grammer not accept 3.0e3 (without sign)
231+
# the original grammar not accept 3.0e3 (without sign)
232232
if input[0].isdigit():
233233
return input[0] + state_exponent_digits(input[1:], stack)
234234

0 commit comments

Comments
 (0)