Skip to content

Commit

Permalink
Merge pull request #852 from marshmallow-code/pre-commit-autoupdate
Browse files Browse the repository at this point in the history
Pre-commit update
  • Loading branch information
lafrech authored Aug 5, 2023
2 parents 95d73b4 + fa45620 commit ee2e20c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
8 changes: 4 additions & 4 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: v3.8.0
rev: v3.10.1
hooks:
- id: pyupgrade
args: [--py37-plus]
- repo: https://github.com/psf/black
rev: 23.3.0
rev: 23.7.0
hooks:
- id: black
language_version: python3
- repo: https://github.com/pycqa/flake8
rev: 6.0.0
rev: 6.1.0
hooks:
- id: flake8
additional_dependencies: [flake8-bugbear==22.12.6]
- repo: https://github.com/asottile/blacken-docs
rev: 1.14.0
rev: 1.15.0
hooks:
- id: blacken-docs
additional_dependencies: [black==22.3.0]
Expand Down
5 changes: 3 additions & 2 deletions src/apispec/ext/marshmallow/field_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
This module is treated as private API.
Users should not need to use this module directly.
"""
from __future__ import annotations
import re
import functools
import operator
Expand All @@ -18,7 +19,7 @@


# marshmallow field => (JSON Schema type, format)
DEFAULT_FIELD_MAPPING = {
DEFAULT_FIELD_MAPPING: dict[type, tuple[str | None, str | None]] = {
marshmallow.fields.Integer: ("integer", None),
marshmallow.fields.Number: ("number", None),
marshmallow.fields.Float: ("number", None),
Expand Down Expand Up @@ -86,7 +87,7 @@
class FieldConverterMixin:
"""Adds methods for converting marshmallow fields to an OpenAPI properties."""

field_mapping = DEFAULT_FIELD_MAPPING
field_mapping: dict[type, tuple[str | None, str | None]] = DEFAULT_FIELD_MAPPING
openapi_version: Version

def init_attribute_functions(self):
Expand Down

0 comments on commit ee2e20c

Please sign in to comment.