mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge pull request #8077 from tk0miya/8074_napoleon_crashes_by_cython
Fix #8074: napoleon: Crashes during processing C-ext module
This commit is contained in:
commit
a01acc4e1c
2
CHANGES
2
CHANGES
@ -37,6 +37,8 @@ Features added
|
|||||||
Bugs fixed
|
Bugs fixed
|
||||||
----------
|
----------
|
||||||
|
|
||||||
|
* #8074: napoleon: Crashes during processing C-ext module
|
||||||
|
|
||||||
Testing
|
Testing
|
||||||
--------
|
--------
|
||||||
|
|
||||||
|
@ -1074,7 +1074,10 @@ class NumpyDocstring(GoogleDocstring):
|
|||||||
super().__init__(docstring, config, app, what, name, obj, options)
|
super().__init__(docstring, config, app, what, name, obj, options)
|
||||||
|
|
||||||
def _get_location(self) -> str:
|
def _get_location(self) -> str:
|
||||||
|
try:
|
||||||
filepath = inspect.getfile(self._obj) if self._obj is not None else None
|
filepath = inspect.getfile(self._obj) if self._obj is not None else None
|
||||||
|
except TypeError:
|
||||||
|
filepath = None
|
||||||
name = self._name
|
name = self._name
|
||||||
|
|
||||||
if filepath is None and name is None:
|
if filepath is None and name is None:
|
||||||
|
Loading…
Reference in New Issue
Block a user