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.

used_prior_global_declaration.py 484B

123456789101112131415161718192021222324252627282930313233343536373839
  1. # pylint: disable=missing-docstring, pointless-statement, global-variable-not-assigned, global-statement
  2. CONST = 1
  3. def test():
  4. CONST # [used-prior-global-declaration]
  5. global CONST
  6. def other_test():
  7. CONST
  8. global SOMETHING
  9. def other_test_1():
  10. global SOMETHING
  11. CONST
  12. def other_test_2():
  13. CONST
  14. def inner():
  15. global CONST
  16. return inner
  17. def other_test_3():
  18. def inner():
  19. return CONST
  20. global CONST
  21. return inner