Skip to content

Commit

Permalink
Fix broken ManyToManyField(db_default)
Browse files Browse the repository at this point in the history
  • Loading branch information
Skorpyon committed Dec 16, 2023
1 parent 1b8b547 commit b95c1e6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
5 changes: 1 addition & 4 deletions django-stubs/db/models/fields/files.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ from django.utils._os import _PathCompatible
from django.utils.functional import _StrOrPromise
from typing_extensions import Self

# __set__ value type
_ST = TypeVar("_ST")

class FieldFile(File):
instance: Model
field: FileField
Expand Down Expand Up @@ -60,7 +57,7 @@ class FileField(Field):
null: bool = ...,
db_index: bool = ...,
default: Any = ...,
db_default: type[NOT_PROVIDED] | Expression | _ST = ...,
db_default: type[NOT_PROVIDED] | Expression | str = ...,
editable: bool = ...,
auto_created: bool = ...,
serialize: bool = ...,
Expand Down
1 change: 0 additions & 1 deletion django-stubs/db/models/fields/related.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,6 @@ class ManyToManyField(RelatedField[Any, Any], Generic[_To, _Through]):
blank: bool = ...,
db_index: bool = ...,
default: Any = ...,
db_default: type[NOT_PROVIDED] | Expression | _ST = ...,
editable: bool = ...,
auto_created: bool = ...,
serialize: bool = ...,
Expand Down

0 comments on commit b95c1e6

Please sign in to comment.