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.

abstract_class_instantiated_in_class.py 346B

1234567891011121314151617181920
  1. """Don't warn if the class is instantiated in its own body."""
  2. # pylint: disable=missing-docstring
  3. import abc
  4. import six
  5. @six.add_metaclass(abc.ABCMeta)
  6. class Ala(object):
  7. @abc.abstractmethod
  8. def bala(self):
  9. pass
  10. @classmethod
  11. def portocala(cls):
  12. instance = cls()
  13. return instance