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.

invalid_name.py 615B

12345678910111213141516171819202122232425262728293031
  1. """ Tests for invalid-name checker. """
  2. # pylint: disable=unused-import, no-absolute-import, wrong-import-position
  3. AAA = 24
  4. try:
  5. import collections
  6. except ImportError:
  7. collections = None
  8. aaa = 42 # [invalid-name]
  9. try:
  10. import time
  11. except ValueError:
  12. time = None # [invalid-name]
  13. try:
  14. from sys import argv, executable as python
  15. except ImportError:
  16. argv = 42
  17. python = 24
  18. def test():
  19. """ Shouldn't emit an invalid-name here. """
  20. try:
  21. import re
  22. except ImportError:
  23. re = None
  24. return re
  25. def a(): # [invalid-name]
  26. """yo"""