From d5e3ff2f486e4360f0605d9b6bb07c308761f3cd Mon Sep 17 00:00:00 2001 From: Bruno Cauet Date: Mon, 19 Jan 2015 10:42:00 +0100 Subject: [PATCH] Improve repr(ConfigView): fix class name displayed Use config.__class__.__name__ instead of "ConfigView" in __repr__(). Before: >>> from beets import ui >>> c >>> c['foo'] After: >>> from beets import ui >>> c >>> c['foo'] --- beets/util/confit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/beets/util/confit.py b/beets/util/confit.py index ea7d0690b..4317045b3 100644 --- a/beets/util/confit.py +++ b/beets/util/confit.py @@ -208,7 +208,7 @@ class ConfigView(object): raise NotImplementedError def __repr__(self): - return '' % self.name + return '<{}: {}>'.format(self.__class__.__name__, self.name) def __iter__(self): """Prevent list(config) from using __getitem__ and never halting"""