mirror of
https://github.com/beetbox/beets.git
synced 2026-02-22 07:14:24 +01:00
Improve repr(ConfigView): fix class name displayed
Use config.__class__.__name__ instead of "ConfigView" in __repr__(). Before: >>> from beets import ui >>> c <ConfigView: root> >>> c['foo'] <ConfigView: foo> After: >>> from beets import ui >>> c <LazyConfig: root> >>> c['foo'] <Subview: foo>
This commit is contained in:
parent
70ef96d565
commit
d5e3ff2f48
1 changed files with 1 additions and 1 deletions
|
|
@ -208,7 +208,7 @@ class ConfigView(object):
|
|||
raise NotImplementedError
|
||||
|
||||
def __repr__(self):
|
||||
return '<ConfigView: %s>' % self.name
|
||||
return '<{}: {}>'.format(self.__class__.__name__, self.name)
|
||||
|
||||
def __iter__(self):
|
||||
"""Prevent list(config) from using __getitem__ and never halting"""
|
||||
|
|
|
|||
Loading…
Reference in a new issue