-
Notifications
You must be signed in to change notification settings - Fork 2k
Closed
Labels
Milestone
Description
Importing seaborn with a python instance which is using the -OO optimization option causes an AttributeError to be raised:
python -OO -c 'import seaborn'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/bais/anaconda3/lib/python3.7/site-packages/seaborn/__init__.py", line 8, in <module>
from .distributions import * # noqa: F401,F403
File "/home/bais/anaconda3/lib/python3.7/site-packages/seaborn/distributions.py", line 1584, in <module>
seealso=_core_docs["seealso"],
File "/home/bais/anaconda3/lib/python3.7/site-packages/seaborn/_docstrings.py", line 30, in __getattr__
return self.__getattribute__(attr)
AttributeError: 'DocstringComponents' object has no attribute 'stat'
It seems like a function in seaborn.distributions is being documented by assining its docstring explicitly after the function has been defined, rather than using the normal method of adding the docstring at the beginning of the function.