mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-29 21:35:58 +00:00
Implement StmtReturn (#4960)
* Implement StmtPass This implements StmtPass as `pass`. The snapshot diff is small because pass mainly occurs in bodies and function (#4951) and if/for bodies. * Implement StmtReturn This implements StmtReturn as `return` or `return {value}`. The snapshot diff is small because return occurs in functions (#4951)
This commit is contained in:
parent
c8442e91ce
commit
467df23e65
2 changed files with 19 additions and 5 deletions
|
@ -178,7 +178,7 @@ return np.divide(
|
|||
-return np.divide(
|
||||
- where=view.sum_of_weights_of_weight_long**2 > view.sum_of_weights_squared, # type: ignore
|
||||
-)
|
||||
+NOT_YET_IMPLEMENTED_StmtReturn
|
||||
+return NOT_IMPLEMENTED_call()
|
||||
```
|
||||
|
||||
## Ruff Output
|
||||
|
@ -234,7 +234,7 @@ q = [i for i in []]
|
|||
# WE SHOULD DEFINITELY NOT EAT THESE COMMENTS (https://github.com/psf/black/issues/2873)
|
||||
NOT_YET_IMPLEMENTED_StmtIf
|
||||
|
||||
NOT_YET_IMPLEMENTED_StmtReturn
|
||||
return NOT_IMPLEMENTED_call()
|
||||
```
|
||||
|
||||
## Black Output
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue