mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-08 21:52:48 +07:00
It correctly takes into account the first argument of `__new__` that is also implicit, and thus should be excluded when reporting positional-only parameters following non-positional-only ones. GitOrigin-RevId: abf09c6be5e49c21c12264d22bf63a51018fdcd6
19 lines
815 B
Python
19 lines
815 B
Python
def f1(a, <warning descr="Positional-only parameter follows parameter that is not positional-only">__b</warning>): pass
|
|
def f2(__b, a): pass
|
|
def f3(a, /, __b): pass
|
|
def f4(a, *, __b): pass
|
|
def f5(a, *args, __b): pass
|
|
def f6(a, __b__, __): pass
|
|
|
|
class A:
|
|
def m1(self, __b): pass
|
|
def m2(self, a, <warning descr="Positional-only parameter follows parameter that is not positional-only">__b</warning>): pass
|
|
@classmethod
|
|
def c1(cls, __b): pass
|
|
@classmethod
|
|
def c2(cls, a, <warning descr="Positional-only parameter follows parameter that is not positional-only">__b</warning>): pass
|
|
@staticmethod
|
|
def s1(__b): pass
|
|
@staticmethod
|
|
def s1(a, <warning descr="Positional-only parameter follows parameter that is not positional-only">__b</warning>): pass
|
|
def __new__(cls, __b): pass |