Skip to content

Commit

Permalink
Run pre-commit autoupdate
Browse files Browse the repository at this point in the history
  • Loading branch information
sloria committed Jan 30, 2022
1 parent d79d464 commit 13f6739
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 16 deletions.
12 changes: 6 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
repos:
- repo: https://github.com/asottile/pyupgrade
rev: v2.11.0
rev: v2.31.0
hooks:
- id: pyupgrade
args: [--py36-plus]
- repo: https://github.com/python/black
rev: 20.8b1
rev: 22.1.0
hooks:
- id: black
language_version: python3
- repo: https://gitlab.com/pycqa/flake8
rev: 3.9.0
rev: 3.9.2
hooks:
- id: flake8
additional_dependencies: [flake8-bugbear==21.4.3]
additional_dependencies: [flake8-bugbear==22.1.11]
- repo: https://github.com/asottile/blacken-docs
rev: v1.10.0
rev: v1.12.1
hooks:
- id: blacken-docs
additional_dependencies: [black==20.8b1]
additional_dependencies: [black==22.1.0]
2 changes: 1 addition & 1 deletion src/flask_marshmallow/compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
import marshmallow

_MARSHMALLOW_VERSION_INFO = tuple(
[int(part) for part in marshmallow.__version__.split(".") if part.isdigit()]
int(part) for part in marshmallow.__version__.split(".") if part.isdigit()
)
12 changes: 3 additions & 9 deletions src/flask_marshmallow/sqla.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ class SQLAlchemySchema(msqla.SQLAlchemySchema, Schema):

OPTIONS_CLASS = SQLAlchemySchemaOpts


else:
SQLAlchemySchema = None

Expand All @@ -70,7 +69,6 @@ class SQLAlchemyAutoSchema(msqla.SQLAlchemyAutoSchema, Schema):

OPTIONS_CLASS = SQLAlchemyAutoSchemaOpts


else:
SQLAlchemyAutoSchema = None

Expand Down Expand Up @@ -108,16 +106,12 @@ def _deserialize(self, value, *args, **kwargs):
endpoint, kwargs = self.adapter.match(value)
if endpoint != self.endpoint:
raise ValidationError(
(
'Parsed endpoint "{endpoint}" from URL "{value}"; expected '
'"{self.endpoint}"'
).format(**locals())
f'Parsed endpoint "{endpoint}" from URL "{value}"; expected '
f'"{self.endpoint}"'
)
if self.url_key not in kwargs:
raise ValidationError(
'URL pattern "{self.url_key}" not found in {kwargs!r}'.format(
**locals()
)
f'URL pattern "{self.url_key}" not found in {kwargs!r}'
)
return super()._deserialize(kwargs[self.url_key], *args, **kwargs)

Expand Down

0 comments on commit 13f6739

Please sign in to comment.