mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-02 14:52:01 +00:00
62 lines
784 B
Python
62 lines
784 B
Python
# DOC402
|
|
def foo(num: int) -> str:
|
|
"""
|
|
Do something
|
|
|
|
Parameters
|
|
----------
|
|
num : int
|
|
A number
|
|
"""
|
|
yield 'test'
|
|
|
|
|
|
# OK
|
|
def foo(num: int) -> str:
|
|
"""
|
|
Do something
|
|
|
|
Parameters
|
|
----------
|
|
num : int
|
|
A number
|
|
|
|
Yields
|
|
-------
|
|
str
|
|
A string
|
|
"""
|
|
yield 'test'
|
|
|
|
|
|
class Bar:
|
|
|
|
# OK
|
|
def foo(self) -> str:
|
|
"""
|
|
Do something
|
|
|
|
Parameters
|
|
----------
|
|
num : int
|
|
A number
|
|
|
|
Yields
|
|
-------
|
|
str
|
|
A string
|
|
"""
|
|
yield 'test'
|
|
|
|
|
|
# DOC402
|
|
def bar(self) -> str:
|
|
"""
|
|
Do something
|
|
|
|
Parameters
|
|
----------
|
|
num : int
|
|
A number
|
|
"""
|
|
yield 'test'
|