File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -156,22 +156,25 @@ def __init__(
156
156
exclusive : Set [str ] | None = None ,
157
157
reason : str | None = None ,
158
158
):
159
- msg = ""
159
+ msg = []
160
160
if required :
161
- msg = (
161
+ msg . append (
162
162
"Required parameter(s) are missing: "
163
163
f"{ ', ' .join (repr (par ) for par in required )} ."
164
164
)
165
+
165
166
if require_any :
166
- msg = (
167
+ msg . append (
167
168
"At least one of the following parameters must be specified: "
168
169
f"{ ', ' .join (repr (par ) for par in require_any )} ."
169
170
)
171
+
170
172
if exclusive :
171
- msg = (
173
+ msg . append (
172
174
"Mutually exclusive parameter(s) are specified: "
173
175
f"{ ', ' .join (repr (par ) for par in exclusive )} ."
174
176
)
177
+
175
178
if reason :
176
- msg += f" { reason } "
177
- super ().__init__ (msg )
179
+ msg . append ( reason )
180
+ super ().__init__ (" " . join ( msg ) )
You can’t perform that action at this time.
0 commit comments