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

Fix tuple[A] types to be tuple[A, ...] types #2328

Merged
merged 1 commit into from
Aug 7, 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
2 changes: 1 addition & 1 deletion django-stubs/contrib/postgres/constraints.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class ExclusionConstraint(BaseConstraint):
index_type: str | None = None,
condition: Q | None = None,
deferrable: Deferrable | None = None,
include: list[str] | tuple[str] | None = None,
include: list[str] | tuple[str, ...] | None = None,
violation_error_code: str | None = None,
violation_error_message: _StrOrPromise | None = None,
) -> None: ...
Expand Down
4 changes: 2 additions & 2 deletions django-stubs/db/models/options.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ class Options(Generic[_M]):
db_table: str
ordering: Sequence[str] | None
indexes: list[Any]
unique_together: Sequence[tuple[str]] # Are always normalized
index_together: Sequence[tuple[str]] # Are always normalized
unique_together: Sequence[tuple[str, ...]] # Are always normalized
index_together: Sequence[tuple[str, ...]] # Are always normalized
select_on_save: bool
default_permissions: Sequence[str]
permissions: list[Any]
Expand Down
2 changes: 1 addition & 1 deletion django-stubs/template/base.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ class FilterExpression:
class Variable:
var: dict[Any, Any] | str
literal: SafeString | float | None
lookups: tuple[str] | None
lookups: tuple[str, ...] | None
translate: bool
message_context: str | None
def __init__(self, var: dict[Any, Any] | str) -> None: ...
Expand Down
4 changes: 2 additions & 2 deletions django-stubs/template/engine.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class Engine:
dirs: list[str]
app_dirs: bool
autoescape: bool
context_processors: list[str] | tuple[str]
context_processors: list[str] | tuple[str, ...]
debug: bool
loaders: Sequence[_Loader]
string_if_invalid: str
Expand All @@ -30,7 +30,7 @@ class Engine:
self,
dirs: list[str] | None = None,
app_dirs: bool = False,
context_processors: list[str] | tuple[str] | None = None,
context_processors: list[str] | tuple[str, ...] | None = None,
debug: bool = False,
loaders: Sequence[_Loader] | None = None,
string_if_invalid: str = "",
Expand Down
2 changes: 1 addition & 1 deletion django-stubs/test/utils.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ class LoggingCaptureMixin:
def tearDown(self) -> None: ...

class isolate_apps(TestContextDecorator):
installed_apps: tuple[str]
installed_apps: tuple[str, ...]
def __init__(self, *installed_apps: Any, **kwargs: Any) -> None: ...
old_apps: Apps

Expand Down
3 changes: 2 additions & 1 deletion django-stubs/utils/cache.pyi
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from collections.abc import Iterable
from typing import Any

from django.core.cache.backends.base import BaseCache
Expand All @@ -17,7 +18,7 @@ def get_conditional_response(
) -> HttpResponse | None: ...
def patch_response_headers(response: HttpResponseBase, cache_timeout: int | None = ...) -> None: ...
def add_never_cache_headers(response: HttpResponseBase) -> None: ...
def patch_vary_headers(response: HttpResponseBase, newheaders: tuple[str]) -> None: ...
def patch_vary_headers(response: HttpResponseBase, newheaders: Iterable[str]) -> None: ...
def has_vary_header(response: HttpResponse, header_query: str) -> bool: ...
def get_cache_key(
request: HttpRequest, key_prefix: str | None = ..., method: str = ..., cache: BaseCache | None = ...
Expand Down
Loading