Skip to content

Commit

Permalink
Pass *args to init
Browse files Browse the repository at this point in the history
  • Loading branch information
q0w committed Feb 25, 2024
1 parent 6dbe485 commit c18581e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 5 additions & 1 deletion django-stubs/db/models/constraints.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ class BaseConstraint:
violation_error_message: _StrOrPromise | None
default_violation_error_message: _StrOrPromise
def __init__(
self, name: str, violation_error_code: str | None = ..., violation_error_message: _StrOrPromise | None = ...
self,
*args: Any,
name: str,
violation_error_code: str | None = ...,
violation_error_message: _StrOrPromise | None = ...,
) -> None: ...
def constraint_sql(self, model: type[Model] | None, schema_editor: BaseDatabaseSchemaEditor | None) -> str: ...
def create_sql(self, model: type[Model] | None, schema_editor: BaseDatabaseSchemaEditor | None) -> str: ...
Expand Down
3 changes: 0 additions & 3 deletions scripts/stubtest/allowlist_todo_django50.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ django.contrib.gis.admin.OpenLayersWidget
django.contrib.gis.admin.options.spherical_mercator_srid
django.contrib.gis.admin.widgets
django.contrib.gis.db.backends.spatialite.schema.SpatialiteSchemaEditor.alter_db_table
django.contrib.gis.db.models.BaseConstraint.__init__
django.contrib.gis.db.models.Case.allowed_default
django.contrib.gis.db.models.ExpressionWrapper.allowed_default
django.contrib.gis.db.models.F.allowed_default
Expand Down Expand Up @@ -149,7 +148,6 @@ django.db.backends.sqlite3.schema.DatabaseSchemaEditor.sql_alter_column_comment
django.db.backends.sqlite3.schema.DatabaseSchemaEditor.sql_alter_table_comment
django.db.backends.utils.CursorWrapper.APPS_NOT_READY_WARNING_MSG
django.db.migrations.serializer.BaseUnorderedSequenceSerializer
django.db.models.BaseConstraint.__init__
django.db.models.Case.allowed_default
django.db.models.ExpressionWrapper.allowed_default
django.db.models.F.allowed_default
Expand All @@ -168,7 +166,6 @@ django.db.models.Prefetch.get_current_querysets
django.db.models.Q.identity
django.db.models.Value.allowed_default
django.db.models.When.allowed_default
django.db.models.constraints.BaseConstraint.__init__
django.db.models.expressions.BaseExpression.allowed_default
django.db.models.expressions.Case.allowed_default
django.db.models.expressions.CombinedExpression.allowed_default
Expand Down

0 comments on commit c18581e

Please sign in to comment.