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

[5.0] Add django.db.models.GeneratedField #1944

Merged
merged 5 commits into from
Feb 17, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
Apply suggestions from code review
sobolevn authored Feb 17, 2024
commit 25d073246405a512599d33066e53ff34e3941c8b
10 changes: 5 additions & 5 deletions django-stubs/db/models/fields/generated.pyi
Original file line number Diff line number Diff line change
@@ -10,10 +10,10 @@ from django.utils.datastructures import DictWrapper
from django.utils.functional import _StrOrPromise

class GeneratedField(models.Field):
generated: Literal[True] = ...
db_returning: Literal[True] = ...
_query: Query | None = ...
output_field: models.Field | None = ...
generated: Literal[True]
db_returning: Literal[True]
_query: Query | None
output_field: models.Field | None

def __init__(
self,
@@ -42,6 +42,6 @@ class GeneratedField(models.Field):
validators: Iterable[_ValidatorCallable] = ...,
error_messages: _ErrorMessagesMapping | None = ...,
**kwargs: Any,
): ...
) -> None: ...
def generated_sql(self, connection: BaseDatabaseWrapper) -> tuple[str, Any]: ...
def db_type_parameters(self, connection: BaseDatabaseWrapper) -> DictWrapper: ...