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.

func_noerror_no_warning_docstring.py 926B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. ''' Test for inheritance '''
  2. from __future__ import print_function
  3. __revision__ = 1
  4. # pylint: disable=too-few-public-methods, using-constant-test
  5. class AAAA(object):
  6. ''' class AAAA '''
  7. def __init__(self):
  8. pass
  9. def method1(self):
  10. ''' method 1 '''
  11. print(self)
  12. def method2(self):
  13. ''' method 2 '''
  14. print(self)
  15. class BBBB(AAAA):
  16. ''' class BBBB '''
  17. def __init__(self):
  18. AAAA.__init__(self)
  19. # should ignore docstring calling from class AAAA
  20. def method1(self):
  21. AAAA.method1(self)
  22. class CCCC(BBBB):
  23. ''' class CCCC '''
  24. def __init__(self):
  25. BBBB.__init__(self)
  26. # should ignore docstring since CCCC is inherited from BBBB which is
  27. # inherited from AAAA containing method2
  28. if __revision__:
  29. def method2(self):
  30. AAAA.method2(self)
  31. else:
  32. def method2(self):
  33. AAAA.method1(self)