mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-30 05:45:24 +00:00
78 lines
998 B
Python
78 lines
998 B
Python
# OK
|
|
def foo(num: int) -> str:
|
|
"""
|
|
Do something
|
|
|
|
Parameters
|
|
----------
|
|
num : int
|
|
A number
|
|
"""
|
|
print('test')
|
|
|
|
|
|
# DOC202
|
|
def foo(num: int) -> str:
|
|
"""
|
|
Do something
|
|
|
|
Parameters
|
|
----------
|
|
num : int
|
|
A number
|
|
|
|
Returns
|
|
-------
|
|
str
|
|
A string
|
|
"""
|
|
print('test')
|
|
|
|
|
|
class Bar:
|
|
|
|
# DOC202
|
|
def foo(self) -> str:
|
|
"""
|
|
Do something
|
|
|
|
Parameters
|
|
----------
|
|
num : int
|
|
A number
|
|
|
|
Returns
|
|
-------
|
|
str
|
|
A string
|
|
"""
|
|
print('test')
|
|
|
|
|
|
# OK
|
|
def bar(self) -> str:
|
|
"""
|
|
Do something
|
|
|
|
Parameters
|
|
----------
|
|
num : int
|
|
A number
|
|
"""
|
|
print('test')
|
|
|
|
|
|
import abc
|
|
|
|
|
|
class A(metaclass=abc.abcmeta):
|
|
@abc.abstractmethod
|
|
def f(self):
|
|
"""Lorem ipsum
|
|
|
|
Returns
|
|
-------
|
|
dict:
|
|
The values
|
|
"""
|
|
return
|