Skip to content

Commit

Permalink
Update crates/ruff_linter/resources/test/fixtures/pylint/invalid_retu…
Browse files Browse the repository at this point in the history
…rn_type_str.py

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
  • Loading branch information
charliermarsh and AlexWaygood committed Apr 18, 2024
1 parent 89d9954 commit aa5051d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,6 @@ def __str__(self):


class Str5:
def __str__(self):
def __str__(self): # PLE0307 (returns None if x <= 0)
if x > 0:
raise RuntimeError("__str__ not allowed")
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ invalid_return_type_str.py:21:16: PLE0307 `__str__` does not return `str`
invalid_return_type_str.py:58:9: PLE0307 `__str__` does not return `str`
|
57 | class Str5:
58 | def __str__(self):
58 | def __str__(self): # PLE0307 (returns None if x <= 0)
| ^^^^^^^ PLE0307
59 | if x > 0:
60 | raise RuntimeError("__str__ not allowed")
Expand Down

0 comments on commit aa5051d

Please sign in to comment.