Skip to content

Commit db335a0

Browse files
authored
Remove check from doc_from (#109)
1 parent 9b86538 commit db335a0

File tree

2 files changed

+0
-11
lines changed

2 files changed

+0
-11
lines changed

src/yandex_cloud_ml_sdk/_utils/doc.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@
99

1010
def 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'

tests/utils/test_doc.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)