Opened 5 years ago

Closed 5 years ago

#30301 closed Cleanup/optimization (fixed)

`django.core.management.base.OutputWrapper` discards the `style_func` argument.

Reported by: Adam Barnes Owned by: nobody
Component: Core (Management commands) Version: 2.1
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

https://github.com/django/django/blob/c296e55dc6a697c7e4d4be92b954633cda4a79b1/django/core/management/base.py#L99

I would have assumed that line should read self.style_func = style_func. If it's correct to be discarding the provided style_func arg, and setting the attribute on self to be None, the argument shouldn't be provided.

Of course, I'm not particularly familiar with this inner working of Django yet, so it's possible this is entirely intentional for some reason I don't yet know, in which case, a comment explaining the discarding wouldn't go amiss.

Change History (3)

comment:1 by Tim Graham, 5 years ago

Has patch: set
Triage Stage: UnreviewedAccepted
Type: UncategorizedCleanup/optimization

comment:2 by Simon Charette, 5 years ago

Triage Stage: AcceptedReady for checkin

comment:3 by GitHub <noreply@…>, 5 years ago

Resolution: fixed
Status: newclosed

In e8774a74:

Fixed #30301 -- Removed OutputWrapper.init()'s style_func arg.

Unused since 533532302ae842c95cf7294ef6cd7f3e2bfaca65.

Note: See TracTickets for help on using tickets.
Back to Top