Skip to content
Permalink
Browse files

raise more exception, change a default value for parameter

  • Loading branch information...
sdpython committed May 5, 2016
1 parent 3b1ea19 commit dfd7b785254252cd12bd9fd22c66f7c75f13e410
@@ -5,9 +5,9 @@
.. todoext::
:title: add subfolder when building indexes of notebooks
:tag: enhancement
When there are too many notebooks, the notebook index is difficult to read.
"""
from .conf_path_tools import get_graphviz_dot
from .convert_doc_helper import rst2html, docstring2html, HTMLWriterWithCustomDirectives
@@ -850,11 +850,16 @@ def decode_outerr(outerr, encoding, encerror, msg):
decode the output or the error after running a command line instructions
@param outerr output or error
@param encoding encoding
@param encoding encoding (if None, it is replaced by ascii)
@param encerror how to handle errors
@param msg part of the error to add message
@param msg to add to the exception message
@return converted string
.. versionchanged:: 1.4
If *encoding* is None, it is replaced by ``'ascii'``.
"""
if encoding is None:
encoding = "ascii"
typstr = str # unicode#
if not isinstance(outerr, bytes):
raise TypeError(
@@ -176,6 +176,10 @@ def check_lenght_line(fname, line):
ig = ignore + ('F401',)
else:
ig = ignore
if file is None:
raise TypeError("file cannot be None")
if len(file) == 0:
raise TypeError("file cannot be empty")
res = check_file(file, ignore=ig, complexity=complexity)
if extended is not None:
with open(file, "r", errors="ignore") as f:

0 comments on commit dfd7b78

Please sign in to comment.
You can’t perform that action at this time.