-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
help wantedContributions especially welcomeContributions especially welcometestingRelated to testing Ruff itselfRelated to testing Ruff itselftyMulti-file analysis & type inferenceMulti-file analysis & type inference
Description
We have a lot of mdtests in red-knot that have this pattern in them to create instance types:
def bool_instance() -> bool:
return True
x = bool_instance()
def int_instance() -> int:
return 42
y = int_instance()
# do some reveal_type calls or whatever in the test now with `x` and `y`Now that #14802 has landed, however, we don't need nearly as much boilerplate in our tests. Instead, we can do something much more elegant:
def f(x: bool, y: int):
...
# do some reveal_type calls or whatever with `x` and `y`We should go through all the Python snippets in https://github.com/astral-sh/ruff/tree/main/crates/red_knot_python_semantic/resources/mdtest to reduce the boilerplate in our mdtests.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
help wantedContributions especially welcomeContributions especially welcometestingRelated to testing Ruff itselfRelated to testing Ruff itselftyMulti-file analysis & type inferenceMulti-file analysis & type inference