Skip to content

Commit cdfa990

Browse files
committed
Add a TODO
1 parent c451a62 commit cdfa990

File tree

1 file changed

+9
-2
lines changed
  • crates/ty_python_semantic/src/types

1 file changed

+9
-2
lines changed

crates/ty_python_semantic/src/types/infer.rs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5735,14 +5735,16 @@ impl<'db, 'ast> TypeInferenceBuilder<'db, 'ast> {
57355735

57365736
let find_narrowed_symbol = || match arguments.args.first() {
57375737
None => {
5738-
// This branch looks extraneous, especially in the face of
5739-
// `missing-arguments`. However, that lint won't be able to catch this:
5738+
// This branch looks extraneous, especially in the face of `missing-arguments`.
5739+
// However, that lint won't be able to catch this:
57405740
//
57415741
// ```python
57425742
// def f(v: object = object()) -> TypeIs[int]: ...
57435743
//
57445744
// if f(): ...
57455745
// ```
5746+
//
5747+
// TODO: Will this report things that is actually fine?
57465748
if let Some(builder) = self
57475749
.context
57485750
.report_lint(&INVALID_TYPE_GUARD_CALL, arguments)
@@ -5762,6 +5764,11 @@ impl<'db, 'ast> TypeInferenceBuilder<'db, 'ast> {
57625764
Some(_) => None,
57635765
};
57645766

5767+
self
5768+
5769+
let use_def_map = self.infer_local_place_load(expr, expr_ref);
5770+
5771+
57655772
// TODO: Handle unions/intersections
57665773
match return_ty {
57675774
// TODO: TypeGuard

0 commit comments

Comments
 (0)