pylint-errors

E0110 (abstract-class-instantiated)

:x: Problematic code:

from abc import ABC, abstractmethod


class BaseClass(ABC):
    @abstractmethod
    def get_something(self):
        pass


base = BaseClass()

:heavy_check_mark: Correct code:

from abc import ABC, abstractmethod


class BaseClass(ABC):
    @abstractmethod
    def get_something(self):
        pass


class Foo(BaseClass):
    def get_something(self):
        pass


foo = Foo()

Rationale:

Used when an abstract class with abc.ABCMeta or abc.ABC as metaclass has abstract methods and is instantiated.