We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f83d1cd commit 25b9f81Copy full SHA for 25b9f81
astroid/nodes/node_classes.py
@@ -2062,11 +2062,12 @@ def __init__(
2062
source code. Note: This is after the last symbol.
2063
"""
2064
if getattr(value, "__name__", None) == "__doc__":
2065
- raise AssertionError( # pragma: no cover
+ warnings.warn( # pragma: no cover
2066
"You have most likely called a __doc__ field of some object "
2067
"and it didn't return a string. "
2068
"That happens to some symbols from the standard library. "
2069
- "Check for isinstance(<X>.__doc__, str)."
+ "Check for isinstance(<X>.__doc__, str).",
2070
+ RuntimeWarning,
2071
)
2072
self.value = value
2073
"""The value that the constant represents."""
0 commit comments