Development of an internal social media platform with personalised dashboards for students
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

arguments_differ_py3.py 1.1KB

123456789101112131415161718192021222324252627282930313233343536
  1. # pylint: disable=missing-docstring,too-few-public-methods
  2. class AbstractFoo:
  3. def kwonly_1(self, first, *, second, third):
  4. "Normal positional with two positional only params."
  5. def kwonly_2(self, *, first, second):
  6. "Two positional only parameter."
  7. def kwonly_3(self, *, first, second):
  8. "Two positional only params."
  9. def kwonly_4(self, *, first, second=None):
  10. "One positional only and another with a default."
  11. def kwonly_5(self, *, first, **kwargs):
  12. "Keyword only and keyword variadics."
  13. class Foo(AbstractFoo):
  14. def kwonly_1(self, first, *, second): # [arguments-differ]
  15. "One positional and only one positional only param."
  16. def kwonly_2(self, first): # [arguments-differ]
  17. "Only one positional parameter instead of two positional only parameters."
  18. def kwonly_3(self, first, second): # [arguments-differ]
  19. "Two positional params."
  20. def kwonly_4(self, first, second): # [arguments-differ]
  21. "Two positional params."
  22. def kwonly_5(self, *, first): # [arguments-differ]
  23. "Keyword only, but no variadics."