mirror of
https://github.com/mtshiba/pylyzer.git
synced 2025-07-08 01:54:59 +00:00
24 lines
426 B
Python
24 lines
426 B
Python
print("aaa", sep = ";", end = "") # OK
|
|
print("a", sep=1) # ERR
|
|
print("a", foo=None) # ERR
|
|
|
|
def f(x, y=1):
|
|
return x + y
|
|
|
|
print(f(1, 2)) # OK
|
|
print(f(1)) # OK
|
|
print(f(1, y="a")) # ERR
|
|
|
|
def g(first, second):
|
|
pass
|
|
|
|
g(**{"first": "bar", "second": 1}) # OK
|
|
g(**[1, 2]) # ERR
|
|
g(1, *[2]) # OK
|
|
g(*[1, 2]) # OK
|
|
g(1, 2, *[3, 4]) # ERR
|
|
g(*1) # ERR
|
|
g(*[1], **{"second": 1}) # OK
|
|
|
|
_ = f(1, *[2]) # OK
|
|
_ = f(**{"x": 1, "y": 2}) # OK
|