#27546: Replace hardcoded class names in __repr__-methods
------------------------------------------------+------------------------
               Reporter:  Mads Jensen           |          Owner:  nobody
                   Type:  Cleanup/optimization  |         Status:  new
              Component:  Uncategorized         |        Version:  1.10
               Severity:  Normal                |       Keywords:
           Triage Stage:  Unreviewed            |      Has patch:  0
    Needs documentation:  0                     |    Needs tests:  0
Patch needs improvement:  0                     |  Easy pickings:  1
                  UI/UX:  0                     |
------------------------------------------------+------------------------
 I noticed there are a few places where {{{__repr__}}} does not use
 {{{self.__class__.__name__}}}. I think this is a small clean-up that would
 make sense to do, but perhaps there was a good reason not to do that
 (probably they're never subclassed?). The following output is from grep:

 {{{
 django/db/models/query.py:        return "<RawQuerySet: %s>" % self.query
 django/db/models/sql/query.py:        return "<RawQuery: %s>" % self
 django/db/migrations/state.py:        return "<ModelState: '%s.%s'>" %
 (self.app_label, self.name)
 django/utils/baseconv.py:        return "<BaseConverter: base%s (%s)>" %
 (len(self.digits), self.digits)
 django/core/management/commands/makemessages.py:        return
 "<TranslatableFile: %s>" % os.sep.join([self.dirpath, self.file])
 django/core/serializers/base.py:        return "<DeserializedObject:
 %s(pk=%s)>" % (
 }}}

--
Ticket URL: <https://code.djangoproject.com/ticket/27546>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/053.8dd9955d080d5486c17cd7664c0cdf7d%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to