mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-14 18:05:27 +07:00
Remove custom deprecation check for abc. Typesheds now have deprecation decorator GitOrigin-RevId: 72ba0028bfda2d7eda4a8e01aed5962613305531
44 lines
1.1 KiB
Python
44 lines
1.1 KiB
Python
import abc
|
|
|
|
|
|
class A(metaclass=abc.ABCMeta):
|
|
@abc.<warning descr="Use 'property' with 'abstractmethod' instead">abstractproperty</warning>
|
|
def prop(self):
|
|
pass
|
|
|
|
|
|
from abc import <warning descr="Use 'property' with 'abstractmethod' instead">abstractproperty</warning>
|
|
|
|
|
|
class B(metaclass=abc.ABCMeta):
|
|
@<warning descr="Use 'property' with 'abstractmethod' instead">abstractproperty</warning>
|
|
def prop(self):
|
|
pass
|
|
|
|
|
|
from abc import <warning descr="Use 'property' with 'abstractmethod' instead">abstractproperty</warning> as ap
|
|
|
|
|
|
class C(metaclass=abc.ABCMeta):
|
|
@<warning descr="Use 'property' with 'abstractmethod' instead">ap</warning>
|
|
def prop(self):
|
|
pass
|
|
|
|
|
|
import abc as foo
|
|
|
|
|
|
class D(metaclass=abc.ABCMeta):
|
|
@foo.<warning descr="Use 'property' with 'abstractmethod' instead">abstractproperty</warning>
|
|
def prop(self):
|
|
pass
|
|
|
|
|
|
class A:
|
|
@abc.<warning descr="Use 'classmethod' with 'abstractmethod' instead">abstractclassmethod</warning>
|
|
def foo(cls):
|
|
pass
|
|
|
|
@abc.<warning descr="Use 'staticmethod' with 'abstractmethod' instead">abstractstaticmethod</warning>
|
|
def bar():
|
|
pass |