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.

no_name_in_module.py 1.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. #pylint: disable=W0401,W0611,no-absolute-import,invalid-name,import-error,bare-except,broad-except,wrong-import-order,ungrouped-imports,wrong-import-position
  2. """check unexistant names imported are reported"""
  3. from __future__ import print_function
  4. import collections.tutu # [no-name-in-module]
  5. from collections import toto # [no-name-in-module]
  6. toto.yo()
  7. from xml.etree import ElementTree
  8. ElementTree.nonexistant_function() # [no-member]
  9. ElementTree.another.nonexistant.function() # [no-member]
  10. print(collections.yo) # [no-member]
  11. import sys
  12. print(sys.stdout, 'hello world')
  13. print(sys.stdoout, 'bye bye world') # [no-member]
  14. import re
  15. re.finditer('*', 'yo')
  16. from rie import *
  17. from re import findiiter, compiile # [no-name-in-module,no-name-in-module]
  18. import os
  19. 'SOMEVAR' in os.environ # [pointless-statement]
  20. try:
  21. from collections import something
  22. except ImportError:
  23. something = None
  24. try:
  25. from collections import anything # [no-name-in-module]
  26. except ValueError:
  27. anything = None
  28. try:
  29. import collections.missing
  30. except ImportError:
  31. pass
  32. try:
  33. import collections.indeed_missing # [no-name-in-module]
  34. except ValueError:
  35. pass
  36. try:
  37. import collections.emit # [no-name-in-module]
  38. except Exception:
  39. pass
  40. try:
  41. import collections.emit1 # [no-name-in-module]
  42. except:
  43. pass
  44. try:
  45. if something:
  46. import collections.emit2 # [no-name-in-module]
  47. except Exception:
  48. pass
  49. from .no_self_use import Super
  50. from .no_self_use import lala # [no-name-in-module]
  51. from .no_self_use.bla import lala1 # [no-name-in-module]