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.

names_in__all__.py 1.1KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. # pylint: disable=too-few-public-methods,no-self-use, no-absolute-import,import-error
  2. """Test Pylint's use of __all__.
  3. * NonExistant is not defined in this module, and it is listed in
  4. __all__. An error is expected.
  5. * This module imports path and republished it in __all__. No errors
  6. are expected.
  7. """
  8. from __future__ import print_function
  9. from os import path
  10. from collections import deque
  11. from missing import Missing
  12. __all__ = [
  13. 'Dummy',
  14. '', # [undefined-all-variable]
  15. Missing,
  16. SomeUndefined, # [undefined-variable]
  17. 'NonExistant', # [undefined-all-variable]
  18. 'path',
  19. 'func', # [undefined-all-variable]
  20. 'inner', # [undefined-all-variable]
  21. 'InnerKlass', deque.__name__] # [undefined-all-variable]
  22. class Dummy(object):
  23. """A class defined in this module."""
  24. pass
  25. DUMMY = Dummy()
  26. def function():
  27. """Function docstring
  28. """
  29. pass
  30. function()
  31. class Klass(object):
  32. """A klass which contains a function"""
  33. def func(self):
  34. """A klass method"""
  35. inner = None
  36. print(inner)
  37. class InnerKlass(object):
  38. """A inner klass"""
  39. pass