From 269cb2a13134141e693440e0edef9167ffebc327 Mon Sep 17 00:00:00 2001 From: Laurent Monin Date: Mon, 8 Apr 2024 11:13:44 +0200 Subject: [PATCH] DebugOpt.name -> optname --- picard/debug_opts.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/picard/debug_opts.py b/picard/debug_opts.py index af5a2893b17..65adfc54d9d 100644 --- a/picard/debug_opts.py +++ b/picard/debug_opts.py @@ -26,8 +26,8 @@ class DebugOpt(IntEnum): WS_REPLIES = 1 @property - def name(self): - return _debug_opts_descriptions[self].name + def optname(self): + return _debug_opts_descriptions[self].optname @property def title(self): @@ -49,11 +49,11 @@ def enabled(self, enable): _debug_opts.remove(self) -DebugOptDesc = namedtuple('DebugOptDesc', ('name', 'title', 'description')) +DebugOptDesc = namedtuple('DebugOptDesc', ('optname', 'title', 'description')) _debug_opts_descriptions = { DebugOpt.WS_REPLIES: DebugOptDesc( - name='ws_replies', + optname='ws_replies', title=N_('WS Replies'), description=N_('Log web service replies'), ), @@ -65,7 +65,7 @@ def enabled(self, enable): def debug_opts_names(): """Returns a sorted list of all valid names for debug options""" - return sorted(o.name for o in DebugOpt) + return sorted(o.optname for o in DebugOpt) def parse_command_line_debug_opts(string): @@ -73,4 +73,4 @@ def parse_command_line_debug_opts(string): and enable corresponding debug options""" opts = {str(o).strip().lower() for o in string.split(',')} for o in DebugOpt: - o.enabled = o.name in opts + o.enabled = o.optname in opts