Skip to content

Commit d38866f

Browse files
committed
Fix pull-types failure for Not special form
1 parent 1fad902 commit d38866f

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

crates/ty_python_semantic/resources/mdtest/type_api.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ directly.
1414

1515
### Negation
1616

17-
<!-- pull-types:skip -->
18-
1917
```py
2018
from typing import Literal
2119
from ty_extensions import Not, static_assert

crates/ty_python_semantic/src/types/infer.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9432,12 +9432,16 @@ impl<'db> TypeInferenceBuilder<'db, '_> {
94329432

94339433
// Type API special forms
94349434
SpecialFormType::Not => match arguments_slice {
9435-
ast::Expr::Tuple(_) => {
9435+
ast::Expr::Tuple(tuple) => {
9436+
for element in tuple {
9437+
self.infer_type_expression(element);
9438+
}
94369439
if let Some(builder) = self.context.report_lint(&INVALID_TYPE_FORM, subscript) {
94379440
builder.into_diagnostic(format_args!(
94389441
"Special form `{special_form}` expected exactly one type parameter",
94399442
));
94409443
}
9444+
self.store_expression_type(arguments_slice, Type::unknown());
94419445
Type::unknown()
94429446
}
94439447
_ => {

0 commit comments

Comments
 (0)