Skip to content

Commit ec6a7f7

Browse files
authored
Merge pull request #816 from marshmallow-code/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2 parents 5f356b3 + 65bcd43 commit ec6a7f7

File tree

3 files changed

+10
-12
lines changed

3 files changed

+10
-12
lines changed

.pre-commit-config.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
repos:
22
- repo: https://github.com/asottile/pyupgrade
3-
rev: v2.38.0
3+
rev: v3.3.1
44
hooks:
55
- id: pyupgrade
66
args: [--py37-plus]
7-
- repo: https://github.com/python/black
8-
rev: 22.8.0
7+
- repo: https://github.com/psf/black
8+
rev: 22.12.0
99
hooks:
1010
- id: black
1111
language_version: python3
1212
- repo: https://github.com/pycqa/flake8
13-
rev: 5.0.4
13+
rev: 6.0.0
1414
hooks:
1515
- id: flake8
16-
additional_dependencies: [flake8-bugbear==22.9.11]
16+
additional_dependencies: [flake8-bugbear==22.12.6]
1717
- repo: https://github.com/asottile/blacken-docs
1818
rev: v1.12.1
1919
hooks:
2020
- id: blacken-docs
2121
additional_dependencies: [black==22.3.0]
2222
- repo: https://github.com/pre-commit/mirrors-mypy
23-
rev: v0.971
23+
rev: v0.991
2424
hooks:
2525
- id: mypy
2626
additional_dependencies: ["marshmallow>=3,<4", "types-PyYAML"]

src/apispec/ext/marshmallow/field_converter.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -239,15 +239,15 @@ def field2choices(
239239
attributes = {}
240240

241241
comparable = [
242-
validator.comparable # type:ignore
242+
validator.comparable
243243
for validator in field.validators
244244
if hasattr(validator, "comparable")
245245
]
246246
if comparable:
247247
attributes["enum"] = comparable
248248
else:
249249
choices = [
250-
OrderedSet(validator.choices) # type:ignore
250+
OrderedSet(validator.choices)
251251
for validator in field.validators
252252
if hasattr(validator, "choices")
253253
]
@@ -348,9 +348,7 @@ def field2length(
348348
max_attr = "maxItems" if is_array else "maxLength"
349349

350350
equal_list = [
351-
validator.equal # type:ignore
352-
for validator in validators
353-
if validator.equal is not None # type:ignore
351+
validator.equal for validator in validators if validator.equal is not None
354352
]
355353
if equal_list:
356354
return {min_attr: equal_list[0], max_attr: equal_list[0]}

tests/test_core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1185,7 +1185,7 @@ def test_plugin_operation_helper_is_used(self, openapi_version):
11851185
class TestPluginsOrder:
11861186
class OrderedPlugin(BasePlugin):
11871187
def __init__(self, index, output):
1188-
super(TestPluginsOrder.OrderedPlugin, self).__init__()
1188+
super().__init__()
11891189
self.index = index
11901190
self.output = output
11911191

0 commit comments

Comments
 (0)