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.

too_many_return_statements.py 843B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. # pylint: disable=missing-docstring
  2. def stupid_function(arg): # [too-many-return-statements]
  3. if arg == 1:
  4. return 1
  5. elif arg == 2:
  6. return 2
  7. elif arg == 3:
  8. return 3
  9. elif arg == 4:
  10. return 4
  11. elif arg == 5:
  12. return 5
  13. elif arg == 6:
  14. return 6
  15. elif arg == 7:
  16. return 7
  17. elif arg == 8:
  18. return 8
  19. elif arg == 9:
  20. return 9
  21. elif arg == 10:
  22. return 10
  23. return None
  24. def many_yield(text):
  25. """Not a problem"""
  26. if text:
  27. yield " line 1: %s\n" % text
  28. yield " line 2\n"
  29. yield " line 3\n"
  30. yield " line 4\n"
  31. yield " line 5\n"
  32. else:
  33. yield " line 6\n"
  34. yield " line 7\n"
  35. yield " line 8\n"
  36. yield " line 9\n"
  37. yield " line 10\n"