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__(
156156 exclusive : Set [str ] | None = None ,
157157 reason : str | None = None ,
158158 ):
159- msg = ""
159+ msg = []
160160 if required :
161- msg = (
161+ msg . append (
162162 "Required parameter(s) are missing: "
163163 f"{ ', ' .join (repr (par ) for par in required )} ."
164164 )
165+
165166 if require_any :
166- msg = (
167+ msg . append (
167168 "At least one of the following parameters must be specified: "
168169 f"{ ', ' .join (repr (par ) for par in require_any )} ."
169170 )
171+
170172 if exclusive :
171- msg = (
173+ msg . append (
172174 "Mutually exclusive parameter(s) are specified: "
173175 f"{ ', ' .join (repr (par ) for par in exclusive )} ."
174176 )
177+
175178 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