File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -107,13 +107,13 @@ def group(self,
107
107
if not issubclass (cls , OptionGroup ):
108
108
raise TypeError ("'cls' must be a subclass of 'OptionGroup' class." )
109
109
110
- frame = inspect .getouterframes (inspect .currentframe ())[self ._outer_frame_index ]
111
- lineno = frame .lineno
112
-
113
110
def decorator (func ):
114
111
callback , params = get_callback_and_params (func )
115
112
116
113
if callback not in self ._decorating_state :
114
+ frame = inspect .getouterframes (inspect .currentframe ())[self ._outer_frame_index ]
115
+ lineno = frame .lineno
116
+
117
117
with_name = f' "{ name } "' if name else ''
118
118
warnings .warn ((f'The empty option group{ with_name } was found (line { lineno } ) '
119
119
f'for "{ callback .__name__ } ". The group will not be added.' ),
You can’t perform that action at this time.
0 commit comments