From 983d381c6faf57e5c2e7a9daecc5d01fc5208ca4 Mon Sep 17 00:00:00 2001 From: Zanie Date: Tue, 11 Jul 2023 10:53:26 -0500 Subject: [PATCH] Extend docs for `CheckableExprType` --- crates/ruff/src/rules/ruff/rules/invalid_index_type.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/crates/ruff/src/rules/ruff/rules/invalid_index_type.rs b/crates/ruff/src/rules/ruff/rules/invalid_index_type.rs index 5795edb65b2db4..990e4f623b918d 100644 --- a/crates/ruff/src/rules/ruff/rules/invalid_index_type.rs +++ b/crates/ruff/src/rules/ruff/rules/invalid_index_type.rs @@ -143,7 +143,11 @@ pub(crate) fn invalid_index_type<'a>(checker: &mut Checker, expr: &'a ExprSubscr } } -/// An expression that can be checked for type compatibility +/// An expression that can be checked for type compatibility. +/// +/// These are generally "literal" type expressions in that we know their concrete type +/// without additional analysis; opposed to expressions like a function call where we +/// cannot determine what type it may return. #[derive(Debug)] enum CheckableExprType<'a> { Constant(&'a Constant),