Skip to content

Commit cf5bffd

Browse files
frank101010Frank Pecher
and
Frank Pecher
authored
BUG: Added UnicodeDecodeError to list of expected exceptions in _pep224_docstrings() (#396)
Co-authored-by: Frank Pecher <frank.pecher@endress.com>
1 parent 96e9155 commit cf5bffd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pdoc/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ def _pep224_docstrings(doc_obj: Union['Module', 'Class'], *,
268268
# before using cleaned doc_obj.source
269269
_ = inspect.findsource(doc_obj.obj)
270270
tree = ast.parse(doc_obj.source)
271-
except (OSError, TypeError, SyntaxError) as exc:
271+
except (OSError, TypeError, SyntaxError, UnicodeDecodeError) as exc:
272272
# Don't emit a warning for builtins that don't have source available
273273
is_builtin = getattr(doc_obj.obj, '__module__', None) == 'builtins'
274274
if not is_builtin:

0 commit comments

Comments
 (0)