Skip to content

Commit

Permalink
Update Black to 23.1.0 and reformat with new style (#335)
Browse files Browse the repository at this point in the history
Black 23 introduced some changes to the stable formatting style, but very trivial in this project.

More details: https://github.com/psf/black/blob/main/CHANGES.md#2310
  • Loading branch information
intgr committed Feb 2, 2023
1 parent e55f354 commit 092ec42
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ repos:
hooks:
- id: isort
- repo: https://github.com/psf/black
rev: 22.12.0
rev: 23.1.0
hooks:
- id: black
- repo: https://github.com/PyCQA/flake8
Expand Down
13 changes: 5 additions & 8 deletions rest_framework-stubs/serializers.pyi
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
from collections.abc import Callable, Iterable, Iterator, Mapping, MutableMapping, Sequence
from typing import Any, Generic, NoReturn, TypeVar
from _typeshed import Self

from _typeshed import Self
from django.core.exceptions import ValidationError as DjangoValidationError
from django.db import models
from django.db.models import DurationField as ModelDurationField
from django.db.models import Manager, Model, QuerySet
from django.db.models.fields import Field as DjangoModelField
from django.utils.translation import ugettext_lazy as _
from django.utils.functional import cached_property
from typing_extensions import Literal

from django.utils.translation import ugettext_lazy as _
from rest_framework.exceptions import APIException as APIException
from rest_framework.exceptions import AuthenticationFailed as AuthenticationFailed
from rest_framework.exceptions import ErrorDetail as ErrorDetail
Expand Down Expand Up @@ -67,7 +65,8 @@ from rest_framework.relations import SlugRelatedField as SlugRelatedField
from rest_framework.relations import StringRelatedField as StringRelatedField
from rest_framework.utils.model_meta import FieldInfo, RelationInfo
from rest_framework.utils.serializer_helpers import BindingDict, BoundField, ReturnDict, ReturnList
from rest_framework.validators import Validator, UniqueTogetherValidator, BaseUniqueForValidator
from rest_framework.validators import BaseUniqueForValidator, UniqueTogetherValidator, Validator
from typing_extensions import Literal

LIST_SERIALIZER_KWARGS: Sequence[str]
ALL_FIELDS: str
Expand Down Expand Up @@ -126,9 +125,7 @@ class SerializerMetaclass(type):
def as_serializer_error(exc: Exception) -> dict[str, list[ErrorDetail]]: ...

class Serializer(
BaseSerializer[
_IN,
],
BaseSerializer[_IN],
metaclass=SerializerMetaclass,
):
_declared_fields: dict[str, Field]
Expand Down

0 comments on commit 092ec42

Please sign in to comment.