From a00a0269538eda2dc242ffae9d38d78bbb1b89c7 Mon Sep 17 00:00:00 2001 From: Eric Traut Date: Mon, 6 Mar 2023 18:12:20 -0700 Subject: [PATCH] Fixed capitalization inconsistency in docs. --- docs/type-inference.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/type-inference.md b/docs/type-inference.md index 63c3d55bb..59f50585d 100644 --- a/docs/type-inference.md +++ b/docs/type-inference.md @@ -109,7 +109,7 @@ var5 = (3,) # Type is assumed to be tuple[Literal[3]] var6: tuple[float, ...] = (3,) # Type of RHS is now tuple[float, ...] ``` -#### Empty list and Dictionary Type Inference +#### Empty List and Dictionary Type Inference It is common to initialize a local variable or instance variable to an empty list (`[]`) or empty dictionary (`{}`) on one code path but initialize it to a non-empty list or dictionary on other code paths. In such cases, Pyright will infer the type based on the non-empty list or dictionary and suppress errors about a “partially unknown type”.