Improve error message when model does not have any docstring
issue4390 review12921002
This commit is contained in:
1 parent
288dc51876
commit
c4e96f4a08
1 file changed
+1
@@ -92,6 +92,7 @@ class Model(WarningErrorMixin, URLMixin, PoolBase):
|
||||
'''
|
||||
Returns the first non-empty line of the model docstring.
|
||||
'''
|
||||
assert cls.__doc__, '%s has no docstring' % cls
|
||||
lines = cls.__doc__.splitlines()
|
||||
for line in lines:
|
||||
line = line.strip()
|
||||
|
||||
Reference in new issue
Block a user