mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-05 11:36:54 +00:00
61 lines
498 B
Text
61 lines
498 B
Text
# bad
|
|
def foo(a,
|
|
b,
|
|
c,
|
|
*args,
|
|
**kwargs
|
|
):
|
|
pass
|
|
|
|
# okay
|
|
def bar():
|
|
pass
|
|
|
|
# bad
|
|
_ = foo(
|
|
1,
|
|
2,
|
|
3,
|
|
4,
|
|
e=5,
|
|
*[],
|
|
**{}
|
|
)
|
|
|
|
# okay
|
|
_ = bar()
|
|
|
|
# okay
|
|
_ = foo(bar, baz, womp)
|
|
|
|
# bad
|
|
class baz(
|
|
object,
|
|
object,
|
|
):
|
|
pass
|
|
|
|
# okay
|
|
class qux:
|
|
pass
|
|
|
|
# bad
|
|
_ = foo(
|
|
foo(
|
|
1 + foo(
|
|
1, # trickier
|
|
2,
|
|
3,
|
|
),
|
|
4,
|
|
5,
|
|
),
|
|
6,
|
|
7,
|
|
)
|
|
|
|
# bad
|
|
_ = '(wow)'.foo(
|
|
no,
|
|
way,
|
|
)
|