LibCST/libcst/tests
Zsolt Dollenstein 9286446f88
PEP 695 - Type Parameter Syntax (#1004)
This PR adds support for parsing and representing Type Parameters and Type Aliases as specified by PEP 695. What's missing are the scope rules, to be implemented in a future PR.

Notable (user visible) changes:

- new `TypeAlias` CST node, which is a `SmallStatement`
- new CST nodes to represent TypeVarLikes: `TypeVar`, `TypeVarTuple`, `ParamSpec`
- new helper CST nodes:  `TypeParameters` to serve as a container for multiple TypeVarLikes, and `TypeParam` which is a single item in a `TypeParameters` (owning the separating comma)
- extended `FunctionDef` and `ClassDef` with an optional `type_parameters` field, as well as `whitespace_after_type_parameters` to own the extra whitespace between type parameters and the following token
  - these new fields are added after all others to avoid breaking callers passing in fields as positional arguments
- in `FunctionDef` and `ClassDef`, `whitespace_after_name` now owns the whitespace before the type parameters if they exist
2023-08-28 22:07:22 +01:00
..
pyre Script to regenerate test fixtures (#872) 2023-02-22 12:35:23 -08:00
__init__.py Fix license headers (#560) 2021-12-28 11:55:18 +00:00
__main__.py PEP 621 + hatch to run tests/lint/etc 2023-03-14 19:37:41 -07:00
test_add_slots.py add slots to base classes, @add_slots takes bases into account (#605) 2022-01-16 14:14:32 +00:00
test_batched_visitor.py add slots to base classes, @add_slots takes bases into account (#605) 2022-01-16 14:14:32 +00:00
test_deep_clone.py Fix license headers (#560) 2021-12-28 11:55:18 +00:00
test_deep_replace.py Fix license headers (#560) 2021-12-28 11:55:18 +00:00
test_e2e.py Don't gather dirs ending .py (#994) 2023-08-26 10:54:32 +01:00
test_exceptions.py Fix license headers (#560) 2021-12-28 11:55:18 +00:00
test_fuzz.py The ufmt tool combines usort and black with a consistent wrapper, (#515) 2021-08-25 20:39:29 -04:00
test_pyre_integration.py Script to regenerate test fixtures (#872) 2023-02-22 12:35:23 -08:00
test_tabs.py Fix license headers (#560) 2021-12-28 11:55:18 +00:00
test_tool.py PEP 695 - Type Parameter Syntax (#1004) 2023-08-28 22:07:22 +01:00
test_type_enforce.py Fix license headers (#560) 2021-12-28 11:55:18 +00:00
test_visitor.py Fix license headers (#560) 2021-12-28 11:55:18 +00:00