Skip to content

Commit

Permalink
pre-commit autoupdate
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] authored Feb 3, 2025
1 parent 45f84b9 commit 5ebb567
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/executablebooks/mdformat
rev: 08fba30538869a440b5059de90af03e3502e35fb # frozen: 0.7.17
rev: ff29be1a1ba8029d9375882aa2c812b62112a593 # frozen: 0.7.22
hooks:
- id: mdformat
additional_dependencies:
Expand All @@ -14,11 +14,11 @@ repos:
- flake8-builtins
- flake8-comprehensions
- repo: https://github.com/PyCQA/isort
rev: c235f5e450b4b84e58d114ed4c589cbf454175a3 # frozen: 5.13.2
rev: 0a0b7a830386ba6a31c2ec8316849ae4d1b8240d # frozen: 6.0.0
hooks:
- id: isort
- repo: https://github.com/psf/black-pre-commit-mirror
rev: c53240a7f974b3707e13eac6710542cc96a2d61a # frozen: 24.10.0
rev: a4920527036bb9a3f3e6055d595849d67d0da066 # frozen: 25.1.0
hooks:
- id: black
- repo: https://github.com/hukkin/docformatter
Expand All @@ -44,7 +44,7 @@ repos:
- flake8-builtins
- flake8-comprehensions
- repo: https://github.com/pre-commit/mirrors-mypy
rev: d4911cfb7f1010759fde68da196036feeb25b99d # frozen: v1.11.2
rev: bbc3dc1f890007061f18f17e2334f216ea9e5df7 # frozen: v1.14.1
hooks:
- id: mypy
args: ["--scripts-are-modules"]
Expand Down
10 changes: 5 additions & 5 deletions tests/test_encode.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"%00%FF", "%00%FF", id="should preserve non-utf8 encoded characters"
),
pytest.param(
"\x00\x7F\x80",
"\x00\x7f\x80",
"%00%7F%C2%80",
id="should encode characters on the cache borders",
), # protects against off-by-one in cache implementation
Expand All @@ -38,12 +38,12 @@ def test_encode_arguments():

def test_encode_surrogates():
# bad surrogates (high)
assert encode("\uD800foo") == "%EF%BF%BDfoo"
assert encode("foo\uD800") == "foo%EF%BF%BD"
assert encode("\ud800foo") == "%EF%BF%BDfoo"
assert encode("foo\ud800") == "foo%EF%BF%BD"

# bad surrogates (low)
assert encode("\uDD00foo") == "%EF%BF%BDfoo"
assert encode("foo\uDD00") == "foo%EF%BF%BD"
assert encode("\udd00foo") == "%EF%BF%BDfoo"
assert encode("foo\udd00") == "foo%EF%BF%BD"

# valid one
# (the codepoint is "D800 DD00" in UTF-16BE)
Expand Down

0 comments on commit 5ebb567

Please sign in to comment.