diff --git a/crates/ty_python_semantic/resources/mdtest/hover.md b/crates/ty_python_semantic/resources/mdtest/hover.md index c9e77115fd..b846ddddec 100644 --- a/crates/ty_python_semantic/resources/mdtest/hover.md +++ b/crates/ty_python_semantic/resources/mdtest/hover.md @@ -1,10 +1,10 @@ # Hover type assertions -You can use the `hover` assertion to test the infered type of an expression. This exercises the same -logic as the hover LSP action. +You can use the `hover` assertion to test the inferred type of an expression. This exercises the +same logic as the hover LSP action. Typically, you will not need to use the `hover` action to test the behavior of our type inference -code, since you can also use `reveal_type` to display the infered type of an expression. Since +code, since you can also use `reveal_type` to display the inferred type of an expression. Since `reveal_type` is part of the standard library, we prefer to use it when possible. However, there are certain situations where `reveal_type` and `hover` will give different results. @@ -16,10 +16,10 @@ In particular, `reveal_type` is not transparent to bidirectional type checking, ### Basic syntax The `hover` assertion operates on a specific location in the source text. We find the "inner-most" -expression at that position, and then query the infered type of that expression. The row to query is -identified just like any other mdtest assertion. The column to query is identified by a down arrow -(↓) in the assertion. (Note that the down arrow should always appear immediately before the `hover` -keyword in the assertion.) +expression at that position, and then query the inferred type of that expression. The row to query +is identified just like any other mdtest assertion. The column to query is identified by a down +arrow (↓) in the assertion. (Note that the down arrow should always appear immediately before the +`hover` keyword in the assertion.) ```py def test_basic_types(parameter: int) -> None: diff --git a/crates/ty_test/src/hover.rs b/crates/ty_test/src/hover.rs index 5245df4a58..c654c91c00 100644 --- a/crates/ty_test/src/hover.rs +++ b/crates/ty_test/src/hover.rs @@ -25,7 +25,7 @@ pub(crate) struct HoverOutput { } /// Get the inferred type at a given position in a file. Returns None if no node is found at that -/// position or if the node has no infered type. +/// position or if the node has no inferred type. /// /// This reuses much of the logic from [`ty_ide::hover`]. Unlike that function, we return types for /// literals, which is useful for testing type inference in mdtest assertions.