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_w0613.py 1.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. # pylint: disable=R0903, print-statement
  2. """test unused argument
  3. """
  4. from __future__ import print_function
  5. def function(arg=1):
  6. """ignore arg"""
  7. class AAAA(object):
  8. """dummy class"""
  9. def method(self, arg):
  10. """dummy method"""
  11. print(self)
  12. def __init__(self, *unused_args, **unused_kwargs):
  13. pass
  14. @classmethod
  15. def selected(cls, *args, **kwargs):
  16. """called by the registry when the vobject has been selected.
  17. """
  18. return cls
  19. def using_inner_function(self, etype, size=1):
  20. """return a fake result set for a particular entity type"""
  21. rset = AAAA([('A',)]*size, '%s X' % etype,
  22. description=[(etype,)]*size)
  23. def inner(row, col=0, etype=etype, req=self, rset=rset):
  24. """inner using all its argument"""
  25. # pylint: disable = E1103
  26. return req.vreg.etype_class(etype)(req, rset, row, col)
  27. # pylint: disable = W0201
  28. rset.get_entity = inner
  29. class BBBB(object):
  30. """dummy class"""
  31. def __init__(self, arg):
  32. """Constructor with an extra parameter. Should raise a warning"""
  33. self.spam = 1