Skip to content

Commit

Permalink
Use explicit target versions for black (#558)
Browse files Browse the repository at this point in the history
* Use explicit target versions for black

* [pre-commit.ci] auto fixes from pre-commit.com hooks

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
sobolevn and pre-commit-ci[bot] authored Mar 14, 2024
1 parent c030e6f commit 510e2e1
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 5 deletions.
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

0 comments on commit 510e2e1

Please sign in to comment.