diff options
Diffstat (limited to 'tests/functional/t/too/too_many_arguments_overload.py')
-rw-r--r-- | tests/functional/t/too/too_many_arguments_overload.py | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/tests/functional/t/too/too_many_arguments_overload.py b/tests/functional/t/too/too_many_arguments_overload.py new file mode 100644 index 000000000..1155deb0c --- /dev/null +++ b/tests/functional/t/too/too_many_arguments_overload.py @@ -0,0 +1,38 @@ +# pylint: disable=missing-function-docstring,missing-module-docstring,missing-class-docstring +# pylint: disable=too-few-public-methods +from typing import overload + + +class ClassA: + @classmethod + @overload + def method(cls, arg1): + pass + + @classmethod + @overload + def method(cls, arg1, arg2): + pass + + @classmethod + def method(cls, arg1, arg2=None): + pass + + +ClassA.method(1, 2) + + +class ClassB: + @overload + def method(self, arg1): + pass + + @overload + def method(self, arg1, arg2): + pass + + def method(self, arg1, arg2=None): + pass + + +ClassB().method(1, arg2=2) |