File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -3172,11 +3172,15 @@ def process_paramspec_declaration(self, s: AssignmentStmt) -> bool:
3172
3172
# PEP 612 reserves the right to define bound, covariant and contravariant arguments to
3173
3173
# ParamSpec in a later PEP. If and when that happens, we should do something
3174
3174
# on the lines of process_typevar_parameters
3175
- paramspec_var = ParamSpecExpr (
3176
- name , self .qualified_name (name ), self .object_type (), INVARIANT
3177
- )
3178
- paramspec_var .line = call .line
3179
- call .analyzed = paramspec_var
3175
+
3176
+ if not call .analyzed :
3177
+ paramspec_var = ParamSpecExpr (
3178
+ name , self .qualified_name (name ), self .object_type (), INVARIANT
3179
+ )
3180
+ paramspec_var .line = call .line
3181
+ call .analyzed = paramspec_var
3182
+ else :
3183
+ assert isinstance (call .analyzed , ParamSpecExpr )
3180
3184
self .add_symbol (name , call .analyzed , s )
3181
3185
return True
3182
3186
You can’t perform that action at this time.
0 commit comments