diff --git a/astroid/nodes/node_classes.py b/astroid/nodes/node_classes.py index 0beaf9157c..98a428852b 100644 --- a/astroid/nodes/node_classes.py +++ b/astroid/nodes/node_classes.py @@ -2062,11 +2062,12 @@ def __init__( source code. Note: This is after the last symbol. """ if getattr(value, "__name__", None) == "__doc__": - raise AssertionError( # pragma: no cover + warnings.warn( # pragma: no cover "You have most likely called a __doc__ field of some object " "and it didn't return a string. " "That happens to some symbols from the standard library. " - "Check for isinstance(.__doc__, str)." + "Check for isinstance(.__doc__, str).", + RuntimeWarning, ) self.value = value """The value that the constant represents."""