Skip to content

Commit 7324d8f

Browse files
[pre-commit.ci] pre-commit autoupdate (#2914)
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/astral-sh/ruff-pre-commit: v0.14.14 → v0.15.4](astral-sh/ruff-pre-commit@v0.14.14...v0.15.4) - [github.com/python-jsonschema/check-jsonschema: 0.36.1 → 0.37.0](python-jsonschema/check-jsonschema@0.36.1...0.37.0) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Allow lambda in Nested --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Steven Loria <git@stevenloria.com>
1 parent bd2cabd commit 7324d8f

3 files changed

Lines changed: 4 additions & 3 deletions

File tree

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ ci:
22
autoupdate_schedule: monthly
33
repos:
44
- repo: https://github.com/astral-sh/ruff-pre-commit
5-
rev: v0.14.14
5+
rev: v0.15.4
66
hooks:
77
- id: ruff-check
88
- id: ruff-format
99
- repo: https://github.com/python-jsonschema/check-jsonschema
10-
rev: 0.36.1
10+
rev: 0.37.0
1111
hooks:
1212
- id: check-github-workflows
1313
- id: check-readthedocs

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ ignore = [
108108
"PLR0915", # allow lots of statements
109109
"PT007", # ignore false positives due to https://github.com/astral-sh/ruff/issues/14743
110110
"PT011", # don't require match when using pytest.raises
111+
"PLW0108", # allow lambda: MySchema, which is needed in some of the test cases
111112
"RUF043", # allow metacharacters in match patterns
112113
"S", # allow asserts
113114
"SIM117", # allow nested with statements because it's more readable sometimes

src/marshmallow/validate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ def __call__(self, value: str) -> str:
204204
# Check first if the scheme is valid
205205
scheme = None
206206
if "://" in value:
207-
scheme = value.split("://")[0].lower()
207+
scheme = value.split("://", maxsplit=1)[0].lower()
208208
if scheme not in self.schemes:
209209
raise ValidationError(message)
210210

0 commit comments

Comments
 (0)