--- a/Documentation/Source/eric6.Plugins.CheckerPlugins.CodeStyleChecker.pycodestyle.html Fri Jan 20 18:46:09 2017 +0100 +++ b/Documentation/Source/eric6.Plugins.CheckerPlugins.CodeStyleChecker.pycodestyle.html Fri Jan 20 18:55:28 2017 +0100 @@ -71,6 +71,9 @@ <td><a href="#ambiguous_identifier">ambiguous_identifier</a></td> <td>Never use the characters 'l', 'O', or 'I' as variable names.</td> </tr><tr> +<td><a href="#bare_except">bare_except</a></td> +<td>When catching exceptions, mention specific exceptions whenever possible.</td> +</tr><tr> <td><a href="#blank_lines">blank_lines</a></td> <td>Separate top-level function and class definitions with two blank lines.</td> </tr><tr> @@ -759,6 +762,18 @@ </p> <div align="right"><a href="#top">Up</a></div> <hr /><hr /> +<a NAME="bare_except" ID="bare_except"></a> +<h2>bare_except</h2> +<b>bare_except</b>(<i>logical_line, noqa</i>) +<p> +When catching exceptions, mention specific exceptions whenever possible. +</p><p> + Okay: except Exception: + Okay: except BaseException: + E722: except: +</p> +<div align="right"><a href="#top">Up</a></div> +<hr /><hr /> <a NAME="blank_lines" ID="blank_lines"></a> <h2>blank_lines</h2> <b>blank_lines</b>(<i>logical_line, blank_lines, indent_level, line_number, blank_before, previous_logical, previous_unindented_logical_line, previous_indent_level, lines</i>) @@ -1177,8 +1192,11 @@ Okay: # this is a comment\nimport os Okay: '''this is a module docstring'''\nimport os Okay: r'''this is a module docstring'''\nimport os - Okay: try:\n import x\nexcept:\n pass\nelse:\n pass\nimport y - Okay: try:\n import x\nexcept:\n pass\nfinally:\n pass\nimport y + Okay: + try:\n\timport x\nexcept ImportError:\n\tpass\nelse:\n\tpass\nimport y + Okay: + try:\n\timport x\nexcept ImportError:\n\tpass\nfinally:\n\tpass\nimport y +</p><p> E402: a=1\nimport os E402: 'One string'\n"Two string"\nimport os E402: a=1\nfrom sys import x