Skip to content

Commit

Permalink
Merge pull request #2081 from marshmallow-code/pre-commit-ci-update-c…
Browse files Browse the repository at this point in the history
…onfig

[pre-commit.ci] pre-commit autoupdate
  • Loading branch information
lafrech committed Dec 19, 2022
2 parents dd7420c + 519aa8d commit 0b0bdd3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 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.37.3
rev: v3.3.1
hooks:
- id: pyupgrade
args: [--py37-plus]
- repo: https://github.com/python/black
rev: 22.8.0
- repo: https://github.com/psf/black
rev: 22.12.0
hooks:
- id: black
language_version: python3
- repo: https://github.com/pycqa/flake8
rev: 5.0.4
rev: 6.0.0
hooks:
- id: flake8
additional_dependencies: [flake8-bugbear==22.9.11]
additional_dependencies: [flake8-bugbear==22.12.6]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.971
rev: v0.991
hooks:
- id: mypy
additional_dependencies: [types-simplejson, types-pytz, packaging]
Expand Down
4 changes: 2 additions & 2 deletions src/marshmallow/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def validate_age(self, data, **kwargs):
from __future__ import annotations

import functools
from typing import Any, Callable, Dict, Tuple, cast
from typing import Any, Callable, cast

PRE_DUMP = "pre_dump"
POST_DUMP = "post_dump"
Expand All @@ -72,7 +72,7 @@ def validate_age(self, data, **kwargs):


class MarshmallowHook:
__marshmallow_hook__ = None # type: Dict[Tuple[str, bool] | str, Any] | None
__marshmallow_hook__: dict[tuple[str, bool] | str, Any] | None = None


def validates(field_name: str) -> Callable[..., Any]:
Expand Down
4 changes: 2 additions & 2 deletions src/marshmallow/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -1055,9 +1055,9 @@ def _bind_field(self, field_name: str, field_obj: ma_fields.Field) -> None:
# the type checker's perspective.
if isinstance(field_obj, type) and issubclass(field_obj, base.FieldABC):
msg = (
'Field for "{}" must be declared as a '
'Field for "{field_name}" must be declared as a '
"Field instance, not a class. "
'Did you mean "fields.{}()"?'.format(field_name, field_obj.__name__)
'Did you mean "fields.{field_obj.__name__}()"?'
)
raise TypeError(msg) from error
raise error
Expand Down

0 comments on commit 0b0bdd3

Please sign in to comment.