Skip to content
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

Use explicit target versions for black #558

Merged
merged 2 commits into from
Mar 14, 2024
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
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[tool.black]
line-length = 120
include = '\.pyi?$'
target-version = ["py38", "py39", "py310", "py311", "py312"]

[tool.ruff]
# Adds to default excludes: https://docs.astral.sh/ruff/settings/#exclude
Expand Down
2 changes: 1 addition & 1 deletion rest_framework-stubs/renderers.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class BrowsableAPIRenderer(BaseRenderer):
view_instance: APIView,
request: Request,
*args: Incomplete,
**kwargs: Incomplete
**kwargs: Incomplete,
) -> BaseSerializer: ...
def get_rendered_html_form(self, data: Any, view: APIView, method: str, request: Request) -> Any: ...
def render_form_for_serializer(self, serializer: BaseSerializer) -> Any: ...
Expand Down
4 changes: 2 additions & 2 deletions rest_framework-stubs/reverse.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ def reverse(
kwargs: Mapping[str, Any] | None = ...,
request: HttpRequest | None = ...,
format: str | None = ...,
**extra: Any
**extra: Any,
) -> str: ...
def _reverse(
viewname: str,
args: Sequence[Any] | None = ...,
kwargs: Mapping[str, Any] | None = ...,
request: HttpRequest | None = ...,
format: str | None = ...,
**extra: Any
**extra: Any,
) -> str: ...

reverse_lazy: Callable[..., str]
2 changes: 1 addition & 1 deletion rest_framework-stubs/utils/serializer_helpers.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class ReturnDict(dict[_KT, _VT], Generic[_KT, _VT]):
__map: SupportsKeysAndGetItem[str, _VT],
*,
serializer: BaseSerializer,
**kwargs: _VT
**kwargs: _VT,
) -> None: ...
@overload
def __init__(self, __iterable: Iterable[tuple[_KT, _VT]], *, serializer: BaseSerializer) -> None: ...
Expand Down
2 changes: 1 addition & 1 deletion rest_framework-stubs/versioning.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class BaseVersioning:
kwargs: Mapping[str, Any] | None = ...,
request: Request | None = ...,
format: str | None = ...,
**extra: Any
**extra: Any,
) -> str: ...
def is_allowed_version(self, version: str | None) -> bool: ...

Expand Down
Loading