-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
213d315
commit 8950bff
Showing
15 changed files
with
542 additions
and
100 deletions.
There are no files selected for viewing
32 changes: 32 additions & 0 deletions
32
crates/ruff_linter/resources/test/fixtures/flake8_annotations/auto_return_type.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
def func(): | ||
return 1 | ||
|
||
|
||
def func(): | ||
return 1.5 | ||
|
||
|
||
def func(x: int): | ||
if x > 0: | ||
return 1 | ||
else: | ||
return 1.5 | ||
|
||
|
||
def func(): | ||
return True | ||
|
||
|
||
def func(x: int): | ||
if x > 0: | ||
return None | ||
else: | ||
return | ||
|
||
|
||
def func(x: int): | ||
return 1 or 2.5 if x > 0 else 1.5 or "str" | ||
|
||
|
||
def func(x: int): | ||
return 1 + 2.5 if x > 0 else 1.5 or "str" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.