Skip to content

Update Black to 23.1.0 and reformat with new style #335

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 _
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isort also made changes to the import order, I thought lint was checking that already?

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