ruff/crates/red_knot_python_semantic/resources/mdtest
Dhruv Manilawala 43bf1a8907
Add tests for "keyword as identifier" syntax errors (#14754)
## Summary

This is related to #13778, more specifically
https://github.com/astral-sh/ruff/issues/13778#issuecomment-2513556004.

This PR adds various test cases where a keyword is being where an
identifier is expected. The tests are to make sure that red knot doesn't
panic, raises the syntax error and the identifier is added to the symbol
table. The final part allows editor related features like renaming the
symbol.
2024-12-05 17:32:48 +05:30
..
annotations [red-knot] Add typing.Any as a spelling for the Any type (#14742) 2024-12-04 09:56:36 -05:00
assignment [red-knot] Meta data for Type::Todo (#14500) 2024-11-21 09:59:47 +01:00
binary [red-knot] Meta data for Type::Todo (#14500) 2024-11-21 09:59:47 +01:00
boolean [red-knot] Remove Type::Unbound (#13980) 2024-10-31 20:05:53 +01:00
call [red-knot] Meta data for Type::Todo (#14500) 2024-11-21 09:59:47 +01:00
comparison [red-knot] Refactoring the inference logic of lexicographic comparisons (#14422) 2024-11-19 17:32:43 -08:00
conditional [red-knot] Remove Type::Unbound (#13980) 2024-10-31 20:05:53 +01:00
declaration [red-knot] Remove lint-phase (#13922) 2024-10-25 18:40:52 +00:00
exception [red-knot] Meta data for Type::Todo (#14500) 2024-11-21 09:59:47 +01:00
expression [red-knot] Infer precise types for len() calls (#14599) 2024-12-04 11:16:53 -08:00
import [red-knot] Diagnostic for possibly unbound imports (#14281) 2024-11-11 20:26:01 +01:00
literal [red-knot] Meta data for Type::Todo (#14500) 2024-11-21 09:59:47 +01:00
loops [red-knot] Semantic index: handle invalid breaks (#14522) 2024-11-22 13:13:55 +01:00
narrow red-knot: support narrowing for bool(E) (#14668) 2024-12-03 03:04:59 +00:00
regression [red-knot] Do not attach diagnostics to wrong file (#14337) 2024-11-14 15:39:51 +01:00
scopes [red-knot] Meta data for Type::Todo (#14500) 2024-11-21 09:59:47 +01:00
shadowing [red-knot] have mdformat wrap mdtest files to 100 columns (#14020) 2024-10-31 21:00:51 +00:00
stubs [red-knot] Add MRO resolution for classes (#14027) 2024-11-04 13:31:38 +00:00
subscript [red-knot] Fix Boolean flags in mdtests (#14654) 2024-11-28 14:29:35 +01:00
unary [red-knot] Infer unary not operation for instances (#13827) 2024-11-13 23:31:36 +00:00
with [red-knot] Meta data for Type::Todo (#14500) 2024-11-21 09:59:47 +01:00
.mdformat.toml [red-knot] have mdformat wrap mdtest files to 100 columns (#14020) 2024-10-31 21:00:51 +00:00
attributes.md [red-knot] Add tests for member lookup on union types (#14296) 2024-11-12 14:11:55 +01:00
generics.md [red-knot] remove wrong typevar attribute implementations (#14540) 2024-11-22 13:17:16 -08:00
invalid_syntax.md Add tests for "keyword as identifier" syntax errors (#14754) 2024-12-05 17:32:48 +05:30
metaclass.md [red-knot] Meta data for Type::Todo (#14500) 2024-11-21 09:59:47 +01:00
mro.md [red-knot] Minor fix in MRO tests (#14652) 2024-11-28 10:17:15 +01:00
sys_version_info.md [red-knot] Meta data for Type::Todo (#14500) 2024-11-21 09:59:47 +01:00
type_alias.md [red-knot] PEP 695 type aliases (#14357) 2024-11-22 08:47:14 +01:00
unpacking.md [red-knot] Infer precise types for len() calls (#14599) 2024-12-04 11:16:53 -08:00