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.

async_functions.py 1.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. """Check that Python 3.5's async functions are properly analyzed by Pylint."""
  2. # pylint: disable=missing-docstring,invalid-name,too-few-public-methods
  3. # pylint: disable=using-constant-test
  4. async def next(): # [redefined-builtin]
  5. pass
  6. async def some_function(arg1, arg2): # [unused-argument]
  7. await arg1
  8. class OtherClass(object):
  9. @staticmethod
  10. def test():
  11. return 42
  12. class Class(object):
  13. async def some_method(self):
  14. super(OtherClass, self).test() # [bad-super-call]
  15. # +1: [too-many-arguments,too-many-return-statements, too-many-branches]
  16. async def complex_function(this, function, has, more, arguments, than,
  17. one, _, should, have):
  18. if 1:
  19. return this
  20. elif 1:
  21. return function
  22. elif 1:
  23. return has
  24. elif 1:
  25. return more
  26. elif 1:
  27. return arguments
  28. elif 1:
  29. return than
  30. try:
  31. return one
  32. finally:
  33. pass
  34. if 2:
  35. return should
  36. while True:
  37. pass
  38. if 1:
  39. return have
  40. elif 2:
  41. return function
  42. elif 3:
  43. pass
  44. # +1: [duplicate-argument-name,dangerous-default-value]
  45. async def func(a, a, b=[]):
  46. return a, b
  47. # +1: [empty-docstring, blacklisted-name]
  48. async def foo():
  49. ""