Skip to content

Commit

Permalink
Merge pull request marshmallow-code#2051 from marshmallow-code/pre-co…
Browse files Browse the repository at this point in the history
…mmit-autoupdate

pre-commit autoupdate
  • Loading branch information
lafrech committed Dec 11, 2022
2 parents f8e97d8 + 8ffd5c4 commit f230b54
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 11 deletions.
10 changes: 5 additions & 5 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.31.1
rev: v2.37.3
hooks:
- id: pyupgrade
args: [--py37-plus]
- repo: https://github.com/python/black
rev: 22.3.0
rev: 22.8.0
hooks:
- id: black
language_version: python3
- repo: https://github.com/pycqa/flake8
rev: 4.0.1
rev: 5.0.4
hooks:
- id: flake8
additional_dependencies: [flake8-bugbear==22.1.11]
additional_dependencies: [flake8-bugbear==22.9.11]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.960
rev: v0.971
hooks:
- id: mypy
additional_dependencies: [types-simplejson, types-pytz, packaging]
Expand Down
3 changes: 1 addition & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@
license_files = LICENSE

[flake8]
extend-ignore = E203, E266, E501, E731, B903
max-line-length = 90
max-complexity = 18
select = B,C,E,F,W,T4,B9
extend-ignore = E203, E266, E501, E731, B903

[tool:pytest]
norecursedirs = .git .ropeproject .tox docs env venv tests/mypy_test_cases
Expand Down
16 changes: 12 additions & 4 deletions src/marshmallow/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -658,9 +658,17 @@ def _deserialize(
d_kwargs["partial"] = sub_partial
else:
d_kwargs["partial"] = partial
getter = lambda val: field_obj.deserialize(
val, field_name, data, **d_kwargs
)

def getter(
val, field_obj=field_obj, field_name=field_name, d_kwargs=d_kwargs
):
return field_obj.deserialize(
val,
field_name,
data,
**d_kwargs,
)

value = self._call_and_store(
getter_func=getter,
data=raw_value,
Expand Down Expand Up @@ -1055,7 +1063,7 @@ def _bind_field(self, field_name: str, field_obj: ma_fields.Field) -> None:
raise error
self.on_bind_field(field_name, field_obj)

@lru_cache(maxsize=8)
@lru_cache(maxsize=8) # noqa (https://github.com/PyCQA/flake8-bugbear/issues/310)
def _has_processors(self, tag) -> bool:
return bool(self._hooks[(tag, True)] or self._hooks[(tag, False)])

Expand Down

0 comments on commit f230b54

Please sign in to comment.