mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-31 04:07:30 +07:00
Report error for abstract method in non-abstract class. GitOrigin-RevId: 824d45a310b95ada628d6e607ae1ced6e351d849
28 lines
546 B
Python
28 lines
546 B
Python
from abc import abstractmethod, ABCMeta
|
|
|
|
|
|
class A:
|
|
<weak_warning descr="Abstract methods are allowed in classes whose metaclass is 'ABCMeta'">@abstractmethod</weak_warning>
|
|
def foo(self): ...
|
|
|
|
|
|
class AbstractClassA(metaclass=ABCMeta):
|
|
...
|
|
|
|
|
|
class AbstractClassB(AbstractClassA):
|
|
@abstractmethod
|
|
def foo(self): ...
|
|
|
|
|
|
class AbstractClassC(AbstractClassB):
|
|
@abstractmethod
|
|
def bar(self): ...
|
|
|
|
|
|
class AbstractClassD(AbstractClassC):
|
|
def foo(self): ...
|
|
def bar(self): ...
|
|
@abstractmethod
|
|
def buz(self): ...
|