mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
#362: In autodoc, check for the existence of `__self__
` on function objects before accessing it.
This commit is contained in:
parent
e8fe8584e4
commit
f12991c93e
3
CHANGES
3
CHANGES
@ -1,6 +1,9 @@
|
||||
Release 0.6.6 (in development)
|
||||
==============================
|
||||
|
||||
* #362: In autodoc, check for the existence of ``__self__`` on
|
||||
function objects before accessing it.
|
||||
|
||||
* #353: Strip leading and trailing whitespace when extracting
|
||||
search words in the search function.
|
||||
|
||||
|
@ -982,6 +982,7 @@ class MethodDocumenter(ClassLevelDocumenter):
|
||||
self.member_order = self.member_order - 1
|
||||
elif isinstance(self.object, FunctionType) or \
|
||||
(isinstance(self.object, BuiltinFunctionType) and
|
||||
hasattr(self.object, '__self__') and
|
||||
self.object.__self__ is not None):
|
||||
self.directivetype = 'staticmethod'
|
||||
# document class and static members before ordinary ones
|
||||
|
Loading…
Reference in New Issue
Block a user