Skip to content

Commit

Permalink
Fixes #2413 -- update ModelAdmin.log_FOO method signatures
Browse files Browse the repository at this point in the history
Renamed the 'object' parameter to 'obj' to be consistent with the
runtime implementation.

Verified against Django 4.2 and the main branch.
  • Loading branch information
sergei-maertens committed Oct 21, 2024
1 parent b7f43dd commit 7fe0fe1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions django-stubs/contrib/admin/options.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,9 @@ class ModelAdmin(BaseModelAdmin[_ModelT]):
orphans: int = ...,
allow_empty_first_page: bool = ...,
) -> Paginator: ...
def log_addition(self, request: HttpRequest, object: _ModelT, message: Any) -> LogEntry: ...
def log_change(self, request: HttpRequest, object: _ModelT, message: Any) -> LogEntry: ...
def log_deletion(self, request: HttpRequest, object: _ModelT, object_repr: str) -> LogEntry: ...
def log_addition(self, request: HttpRequest, obj: _ModelT, message: Any) -> LogEntry: ...
def log_change(self, request: HttpRequest, obj: _ModelT, message: Any) -> LogEntry: ...
def log_deletion(self, request: HttpRequest, obj: _ModelT, object_repr: str) -> LogEntry: ...
def action_checkbox(self, obj: _ModelT) -> SafeString: ...
def get_actions(self, request: HttpRequest) -> dict[str, tuple[Callable[..., str], str, str] | None]: ...
def get_action_choices(
Expand Down

0 comments on commit 7fe0fe1

Please sign in to comment.