File tree Expand file tree Collapse file tree 2 files changed +0
-11
lines changed
src/yandex_cloud_ml_sdk/_utils Expand file tree Collapse file tree 2 files changed +0
-11
lines changed Original file line number Diff line number Diff line change 99
1010def doc_from (source : DocSourceType , ** kwargs ) -> Callable [[DocSourceType ], DocSourceType ]:
1111 def decorator (destination : DocSourceType ) -> DocSourceType :
12- assert type (source ) is type (destination ), \
13- "docstring must be copied from class to class or from method to method"
14-
1512 doc = source .__doc__
1613
1714 assert doc , 'source docstring cannot be empty'
Original file line number Diff line number Diff line change @@ -55,14 +55,6 @@ class B:
5555
5656 assert B # type: ignore[truthy-function]
5757
58- with pytest .raises (AssertionError ):
59- class B2 :
60- @doc_from (A )
61- def b (self ):
62- return 1
63-
64- assert B2 # type: ignore[truthy-function]
65-
6658 class A2 :
6759 """A2 doc {placeholder}"""
6860
You can’t perform that action at this time.
0 commit comments