mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge pull request #5441 from tk0miya/use_collection.abc
napoleon: Use collections.abc
This commit is contained in:
commit
f5616139e8
@ -11,7 +11,7 @@
|
||||
:license: BSD, see LICENSE for details.
|
||||
"""
|
||||
|
||||
import collections
|
||||
import collections.abc
|
||||
import inspect
|
||||
import re
|
||||
from functools import partial
|
||||
@ -120,7 +120,7 @@ class GoogleDocstring(UnicodeMixin):
|
||||
what = 'class'
|
||||
elif inspect.ismodule(obj):
|
||||
what = 'module'
|
||||
elif isinstance(obj, collections.Callable): # type: ignore
|
||||
elif isinstance(obj, collections.abc.Callable):
|
||||
what = 'function'
|
||||
else:
|
||||
what = 'object'
|
||||
|
Loading…
Reference in New Issue
Block a user