Documentation/Source/eric5.Plugins.CheckerPlugins.CodeStyleChecker.pep8.html

Sun, 30 Mar 2014 22:00:14 +0200

author
T.Rzepka <Tobias.Rzepka@gmail.com>
date
Sun, 30 Mar 2014 22:00:14 +0200
branch
Py2 comp.
changeset 3456
96232974dcdb
parent 3209
c5432abceb25
child 3484
645c12de6b0c
permissions
-rw-r--r--

Merge with BgService.

2985
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1 <!DOCTYPE html>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2 <html><head>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3 <title>eric5.Plugins.CheckerPlugins.CodeStyleChecker.pep8</title>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4 <meta charset="UTF-8">
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5 <style>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6 body {
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
7 background: #EDECE6;
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
8 margin: 0em 1em 10em 1em;
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
9 color: black;
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
10 }
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
11
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
12 h1 { color: white; background: #85774A; }
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
13 h2 { color: white; background: #85774A; }
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
14 h3 { color: white; background: #9D936E; }
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
15 h4 { color: white; background: #9D936E; }
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
16
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
17 a { color: #BA6D36; }
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
18
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
19 </style>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
20 </head>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
21 <body><a NAME="top" ID="top"></a>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
22 <h1>eric5.Plugins.CheckerPlugins.CodeStyleChecker.pep8</h1>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
23
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
24 <h3>Global Attributes</h3>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
25 <table>
3456
96232974dcdb Merge with BgService.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3209
diff changeset
26 <tr><td>ARITHMETIC_OP</td></tr><tr><td>BENCHMARK_KEYS</td></tr><tr><td>COMMENT_WITH_NL</td></tr><tr><td>COMPARE_SINGLETON_REGEX</td></tr><tr><td>COMPARE_TYPE_REGEX</td></tr><tr><td>DEFAULT_EXCLUDE</td></tr><tr><td>DEFAULT_IGNORE</td></tr><tr><td>DOCSTRING_REGEX</td></tr><tr><td>ERRORCODE_REGEX</td></tr><tr><td>EXTRANEOUS_WHITESPACE_REGEX</td></tr><tr><td>HUNK_REGEX</td></tr><tr><td>INDENT_REGEX</td></tr><tr><td>KEYWORDS</td></tr><tr><td>KEYWORD_REGEX</td></tr><tr><td>LAMBDA_REGEX</td></tr><tr><td>MAX_LINE_LENGTH</td></tr><tr><td>OPERATOR_REGEX</td></tr><tr><td>PROJECT_CONFIG</td></tr><tr><td>PyCF_ONLY_AST</td></tr><tr><td>RAISE_COMMA_REGEX</td></tr><tr><td>REPORT_FORMAT</td></tr><tr><td>RERAISE_COMMA_REGEX</td></tr><tr><td>SINGLETONS</td></tr><tr><td>SKIP_TOKENS</td></tr><tr><td>TESTSUITE_PATH</td></tr><tr><td>UNARY_OPERATORS</td></tr><tr><td>WHITESPACE</td></tr><tr><td>WHITESPACE_AFTER_COMMA_REGEX</td></tr><tr><td>WS_NEEDED_OPERATORS</td></tr><tr><td>WS_OPTIONAL_OPERATORS</td></tr><tr><td>__version__</td></tr><tr><td>_checks</td></tr><tr><td>noqa</td></tr>
2985
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
27 </table>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
28 <h3>Classes</h3>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
29 <table>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
30 <tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
31 <td><a href="#BaseReport">BaseReport</a></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
32 <td>Collect the results of the checks.</td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
33 </tr><tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
34 <td><a href="#Checker">Checker</a></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
35 <td>Load a Python source file, tokenize it, check coding style.</td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
36 </tr><tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
37 <td><a href="#DiffReport">DiffReport</a></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
38 <td>Collect and print the results for the changed lines only.</td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
39 </tr><tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
40 <td><a href="#FileReport">FileReport</a></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
41 <td>Collect the results of the checks and print only the filenames.</td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
42 </tr><tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
43 <td><a href="#StandardReport">StandardReport</a></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
44 <td>Collect and print the results of the checks.</td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
45 </tr><tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
46 <td><a href="#StyleGuide">StyleGuide</a></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
47 <td>Initialize a PEP-8 instance with few options.</td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
48 </tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
49 </table>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
50 <h3>Functions</h3>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
51 <table>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
52 <tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
53 <td><a href="#_add_check">_add_check</a></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
54 <td></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
55 </tr><tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
56 <td><a href="#_main">_main</a></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
57 <td>Parse options and run checks on Python source.</td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
58 </tr><tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
59 <td><a href="#blank_lines">blank_lines</a></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
60 <td>Separate top-level function and class definitions with two blank lines.</td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
61 </tr><tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
62 <td><a href="#comparison_to_singleton">comparison_to_singleton</a></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
63 <td>Comparisons to singletons like None should always be done with "is" or "is not", never the equality operators.</td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
64 </tr><tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
65 <td><a href="#comparison_type">comparison_type</a></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
66 <td>Object type comparisons should always use isinstance() instead of comparing types directly.</td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
67 </tr><tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
68 <td><a href="#compound_statements">compound_statements</a></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
69 <td>Compound statements (multiple statements on the same line) are generally discouraged.</td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
70 </tr><tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
71 <td><a href="#continued_indentation">continued_indentation</a></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
72 <td>Continuation lines should align wrapped elements either vertically using Python's implicit line joining inside parentheses, brackets and braces, or using a hanging indent.</td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
73 </tr><tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
74 <td><a href="#expand_indent">expand_indent</a></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
75 <td>Return the amount of indentation.</td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
76 </tr><tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
77 <td><a href="#explicit_line_join">explicit_line_join</a></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
78 <td>Avoid explicit line join between brackets.</td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
79 </tr><tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
80 <td><a href="#extraneous_whitespace">extraneous_whitespace</a></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
81 <td>Avoid extraneous whitespace in the following situations:</td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
82 </tr><tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
83 <td><a href="#filename_match">filename_match</a></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
84 <td>Check if patterns contains a pattern that matches filename.</td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
85 </tr><tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
86 <td><a href="#get_parser">get_parser</a></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
87 <td></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
88 </tr><tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
89 <td><a href="#imports_on_separate_lines">imports_on_separate_lines</a></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
90 <td>Imports should usually be on separate lines.</td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
91 </tr><tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
92 <td><a href="#indentation">indentation</a></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
93 <td>Use 4 spaces per indentation level.</td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
94 </tr><tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
95 <td><a href="#init_checks_registry">init_checks_registry</a></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
96 <td>Register all globally visible functions where the first argument name is 'physical_line' or 'logical_line'.</td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
97 </tr><tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
98 <td><a href="#maximum_line_length">maximum_line_length</a></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
99 <td>Limit all lines to a maximum of 79 characters.</td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
100 </tr><tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
101 <td><a href="#missing_newline">missing_newline</a></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
102 <td>JCR: The last line should have a newline.</td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
103 </tr><tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
104 <td><a href="#missing_whitespace">missing_whitespace</a></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
105 <td>JCR: Each comma, semicolon or colon should be followed by whitespace.</td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
106 </tr><tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
107 <td><a href="#missing_whitespace_around_operator">missing_whitespace_around_operator</a></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
108 <td>- Always surround these binary operators with a single space on either side: assignment (=), augmented assignment (+=, -= etc.), comparisons (==, <, >, !=, <>, <=, >=, in, not in, is, is not), Booleans (and, or, not).</td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
109 </tr><tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
110 <td><a href="#mute_string">mute_string</a></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
111 <td>Replace contents with 'xxx' to prevent syntax matching.</td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
112 </tr><tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
113 <td><a href="#parse_udiff">parse_udiff</a></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
114 <td>Return a dictionary of matching lines.</td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
115 </tr><tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
116 <td><a href="#process_options">process_options</a></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
117 <td>Process options passed either via arglist or via command line args.</td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
118 </tr><tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
119 <td><a href="#python_3000_backticks">python_3000_backticks</a></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
120 <td>Backticks are removed in Python 3.</td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
121 </tr><tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
122 <td><a href="#python_3000_has_key">python_3000_has_key</a></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
123 <td>The {}.has_key() method is removed in the Python 3.</td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
124 </tr><tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
125 <td><a href="#python_3000_not_equal">python_3000_not_equal</a></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
126 <td>!= can also be written <>, but this is an obsolete usage kept for backwards compatibility only.</td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
127 </tr><tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
128 <td><a href="#python_3000_raise_comma">python_3000_raise_comma</a></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
129 <td>When raising an exception, use "raise ValueError('message')" instead of the older form "raise ValueError, 'message'".</td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
130 </tr><tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
131 <td><a href="#read_config">read_config</a></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
132 <td>Read both user configuration and local configuration.</td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
133 </tr><tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
134 <td><a href="#readlines">readlines</a></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
135 <td></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
136 </tr><tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
137 <td><a href="#readlines_1">readlines</a></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
138 <td></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
139 </tr><tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
140 <td><a href="#register_check">register_check</a></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
141 <td>Register a new check object.</td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
142 </tr><tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
143 <td><a href="#stdin_get_value">stdin_get_value</a></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
144 <td></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
145 </tr><tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
146 <td><a href="#tabs_obsolete">tabs_obsolete</a></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
147 <td>For new projects, spaces-only are strongly recommended over tabs.</td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
148 </tr><tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
149 <td><a href="#tabs_or_spaces">tabs_or_spaces</a></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
150 <td>Never mix tabs and spaces.</td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
151 </tr><tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
152 <td><a href="#trailing_blank_lines">trailing_blank_lines</a></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
153 <td>JCR: Trailing blank lines are superfluous.</td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
154 </tr><tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
155 <td><a href="#trailing_whitespace">trailing_whitespace</a></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
156 <td>JCR: Trailing whitespace is superfluous.</td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
157 </tr><tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
158 <td><a href="#whitespace_around_comma">whitespace_around_comma</a></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
159 <td>Avoid extraneous whitespace in the following situations:</td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
160 </tr><tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
161 <td><a href="#whitespace_around_keywords">whitespace_around_keywords</a></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
162 <td>Avoid extraneous whitespace around keywords.</td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
163 </tr><tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
164 <td><a href="#whitespace_around_named_parameter_equals">whitespace_around_named_parameter_equals</a></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
165 <td>Don't use spaces around the '=' sign when used to indicate a keyword argument or a default parameter value.</td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
166 </tr><tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
167 <td><a href="#whitespace_around_operator">whitespace_around_operator</a></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
168 <td>Avoid extraneous whitespace in the following situations:</td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
169 </tr><tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
170 <td><a href="#whitespace_before_inline_comment">whitespace_before_inline_comment</a></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
171 <td>Separate inline comments by at least two spaces.</td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
172 </tr><tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
173 <td><a href="#whitespace_before_parameters">whitespace_before_parameters</a></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
174 <td>Avoid extraneous whitespace in the following situations:</td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
175 </tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
176 </table>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
177 <hr /><hr />
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
178 <a NAME="BaseReport" ID="BaseReport"></a>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
179 <h2>BaseReport</h2>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
180 <p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
181 Collect the results of the checks.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
182 </p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
183 <h3>Derived from</h3>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
184 object
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
185 <h3>Class Attributes</h3>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
186 <table>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
187 <tr><td>print_filename</td></tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
188 </table>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
189 <h3>Class Methods</h3>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
190 <table>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
191 <tr><td>None</td></tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
192 </table>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
193 <h3>Methods</h3>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
194 <table>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
195 <tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
196 <td><a href="#BaseReport.__init__">BaseReport</a></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
197 <td></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
198 </tr><tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
199 <td><a href="#BaseReport.error">error</a></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
200 <td>Report an error, according to options.</td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
201 </tr><tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
202 <td><a href="#BaseReport.error_args">error_args</a></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
203 <td>Report an error, according to options.</td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
204 </tr><tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
205 <td><a href="#BaseReport.get_count">get_count</a></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
206 <td>Return the total count of errors and warnings.</td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
207 </tr><tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
208 <td><a href="#BaseReport.get_file_results">get_file_results</a></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
209 <td>Return the count of errors and warnings for this file.</td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
210 </tr><tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
211 <td><a href="#BaseReport.get_statistics">get_statistics</a></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
212 <td>Get statistics for message codes that start with the prefix.</td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
213 </tr><tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
214 <td><a href="#BaseReport.increment_logical_line">increment_logical_line</a></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
215 <td>Signal a new logical line.</td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
216 </tr><tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
217 <td><a href="#BaseReport.init_file">init_file</a></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
218 <td>Signal a new file.</td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
219 </tr><tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
220 <td><a href="#BaseReport.print_benchmark">print_benchmark</a></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
221 <td>Print benchmark numbers.</td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
222 </tr><tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
223 <td><a href="#BaseReport.print_statistics">print_statistics</a></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
224 <td>Print overall statistics (number of errors and warnings).</td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
225 </tr><tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
226 <td><a href="#BaseReport.start">start</a></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
227 <td>Start the timer.</td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
228 </tr><tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
229 <td><a href="#BaseReport.stop">stop</a></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
230 <td>Stop the timer.</td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
231 </tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
232 </table>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
233 <h3>Static Methods</h3>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
234 <table>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
235 <tr><td>None</td></tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
236 </table>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
237 <a NAME="BaseReport.__init__" ID="BaseReport.__init__"></a>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
238 <h4>BaseReport (Constructor)</h4>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
239 <b>BaseReport</b>(<i>options</i>)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
240 <a NAME="BaseReport.error" ID="BaseReport.error"></a>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
241 <h4>BaseReport.error</h4>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
242 <b>error</b>(<i>line_number, offset, text, check</i>)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
243 <p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
244 Report an error, according to options.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
245 </p><a NAME="BaseReport.error_args" ID="BaseReport.error_args"></a>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
246 <h4>BaseReport.error_args</h4>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
247 <b>error_args</b>(<i>line_number, offset, code, check, *args</i>)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
248 <p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
249 Report an error, according to options.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
250 </p><a NAME="BaseReport.get_count" ID="BaseReport.get_count"></a>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
251 <h4>BaseReport.get_count</h4>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
252 <b>get_count</b>(<i>prefix=''</i>)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
253 <p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
254 Return the total count of errors and warnings.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
255 </p><a NAME="BaseReport.get_file_results" ID="BaseReport.get_file_results"></a>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
256 <h4>BaseReport.get_file_results</h4>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
257 <b>get_file_results</b>(<i></i>)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
258 <p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
259 Return the count of errors and warnings for this file.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
260 </p><a NAME="BaseReport.get_statistics" ID="BaseReport.get_statistics"></a>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
261 <h4>BaseReport.get_statistics</h4>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
262 <b>get_statistics</b>(<i>prefix=''</i>)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
263 <p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
264 Get statistics for message codes that start with the prefix.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
265 </p><p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
266 prefix='' matches all errors and warnings
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
267 prefix='E' matches all errors
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
268 prefix='W' matches all warnings
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
269 prefix='E4' matches all errors that have to do with imports
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
270 </p><a NAME="BaseReport.increment_logical_line" ID="BaseReport.increment_logical_line"></a>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
271 <h4>BaseReport.increment_logical_line</h4>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
272 <b>increment_logical_line</b>(<i></i>)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
273 <p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
274 Signal a new logical line.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
275 </p><a NAME="BaseReport.init_file" ID="BaseReport.init_file"></a>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
276 <h4>BaseReport.init_file</h4>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
277 <b>init_file</b>(<i>filename, lines, expected, line_offset</i>)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
278 <p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
279 Signal a new file.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
280 </p><a NAME="BaseReport.print_benchmark" ID="BaseReport.print_benchmark"></a>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
281 <h4>BaseReport.print_benchmark</h4>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
282 <b>print_benchmark</b>(<i></i>)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
283 <p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
284 Print benchmark numbers.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
285 </p><a NAME="BaseReport.print_statistics" ID="BaseReport.print_statistics"></a>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
286 <h4>BaseReport.print_statistics</h4>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
287 <b>print_statistics</b>(<i>prefix=''</i>)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
288 <p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
289 Print overall statistics (number of errors and warnings).
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
290 </p><a NAME="BaseReport.start" ID="BaseReport.start"></a>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
291 <h4>BaseReport.start</h4>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
292 <b>start</b>(<i></i>)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
293 <p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
294 Start the timer.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
295 </p><a NAME="BaseReport.stop" ID="BaseReport.stop"></a>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
296 <h4>BaseReport.stop</h4>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
297 <b>stop</b>(<i></i>)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
298 <p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
299 Stop the timer.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
300 </p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
301 <div align="right"><a href="#top">Up</a></div>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
302 <hr /><hr />
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
303 <a NAME="Checker" ID="Checker"></a>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
304 <h2>Checker</h2>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
305 <p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
306 Load a Python source file, tokenize it, check coding style.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
307 </p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
308 <h3>Derived from</h3>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
309 object
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
310 <h3>Class Attributes</h3>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
311 <table>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
312 <tr><td>None</td></tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
313 </table>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
314 <h3>Class Methods</h3>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
315 <table>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
316 <tr><td>None</td></tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
317 </table>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
318 <h3>Methods</h3>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
319 <table>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
320 <tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
321 <td><a href="#Checker.__init__">Checker</a></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
322 <td></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
323 </tr><tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
324 <td><a href="#Checker.build_tokens_line">build_tokens_line</a></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
325 <td>Build a logical line from tokens.</td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
326 </tr><tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
327 <td><a href="#Checker.check_all">check_all</a></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
328 <td>Run all checks on the input file.</td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
329 </tr><tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
330 <td><a href="#Checker.check_ast">check_ast</a></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
331 <td></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
332 </tr><tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
333 <td><a href="#Checker.check_logical">check_logical</a></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
334 <td>Build a line from tokens and run all logical checks on it.</td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
335 </tr><tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
336 <td><a href="#Checker.check_physical">check_physical</a></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
337 <td>Run all physical checks on a raw input line.</td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
338 </tr><tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
339 <td><a href="#Checker.generate_tokens">generate_tokens</a></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
340 <td></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
341 </tr><tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
342 <td><a href="#Checker.readline">readline</a></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
343 <td>Get the next line from the input buffer.</td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
344 </tr><tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
345 <td><a href="#Checker.readline_check_physical">readline_check_physical</a></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
346 <td>Check and return the next physical line.</td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
347 </tr><tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
348 <td><a href="#Checker.report_invalid_syntax">report_invalid_syntax</a></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
349 <td></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
350 </tr><tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
351 <td><a href="#Checker.run_check">run_check</a></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
352 <td>Run a check plugin.</td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
353 </tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
354 </table>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
355 <h3>Static Methods</h3>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
356 <table>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
357 <tr><td>None</td></tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
358 </table>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
359 <a NAME="Checker.__init__" ID="Checker.__init__"></a>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
360 <h4>Checker (Constructor)</h4>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
361 <b>Checker</b>(<i>filename=None, lines=None, options=None, report=None, **kwargs</i>)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
362 <a NAME="Checker.build_tokens_line" ID="Checker.build_tokens_line"></a>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
363 <h4>Checker.build_tokens_line</h4>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
364 <b>build_tokens_line</b>(<i></i>)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
365 <p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
366 Build a logical line from tokens.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
367 </p><a NAME="Checker.check_all" ID="Checker.check_all"></a>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
368 <h4>Checker.check_all</h4>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
369 <b>check_all</b>(<i>expected=None, line_offset=0</i>)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
370 <p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
371 Run all checks on the input file.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
372 </p><a NAME="Checker.check_ast" ID="Checker.check_ast"></a>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
373 <h4>Checker.check_ast</h4>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
374 <b>check_ast</b>(<i></i>)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
375 <a NAME="Checker.check_logical" ID="Checker.check_logical"></a>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
376 <h4>Checker.check_logical</h4>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
377 <b>check_logical</b>(<i></i>)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
378 <p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
379 Build a line from tokens and run all logical checks on it.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
380 </p><a NAME="Checker.check_physical" ID="Checker.check_physical"></a>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
381 <h4>Checker.check_physical</h4>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
382 <b>check_physical</b>(<i>line</i>)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
383 <p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
384 Run all physical checks on a raw input line.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
385 </p><a NAME="Checker.generate_tokens" ID="Checker.generate_tokens"></a>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
386 <h4>Checker.generate_tokens</h4>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
387 <b>generate_tokens</b>(<i></i>)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
388 <a NAME="Checker.readline" ID="Checker.readline"></a>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
389 <h4>Checker.readline</h4>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
390 <b>readline</b>(<i></i>)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
391 <p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
392 Get the next line from the input buffer.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
393 </p><a NAME="Checker.readline_check_physical" ID="Checker.readline_check_physical"></a>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
394 <h4>Checker.readline_check_physical</h4>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
395 <b>readline_check_physical</b>(<i></i>)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
396 <p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
397 Check and return the next physical line. This method can be
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
398 used to feed tokenize.generate_tokens.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
399 </p><a NAME="Checker.report_invalid_syntax" ID="Checker.report_invalid_syntax"></a>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
400 <h4>Checker.report_invalid_syntax</h4>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
401 <b>report_invalid_syntax</b>(<i></i>)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
402 <a NAME="Checker.run_check" ID="Checker.run_check"></a>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
403 <h4>Checker.run_check</h4>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
404 <b>run_check</b>(<i>check, argument_names</i>)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
405 <p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
406 Run a check plugin.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
407 </p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
408 <div align="right"><a href="#top">Up</a></div>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
409 <hr /><hr />
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
410 <a NAME="DiffReport" ID="DiffReport"></a>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
411 <h2>DiffReport</h2>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
412 <p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
413 Collect and print the results for the changed lines only.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
414 </p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
415 <h3>Derived from</h3>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
416 StandardReport
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
417 <h3>Class Attributes</h3>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
418 <table>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
419 <tr><td>None</td></tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
420 </table>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
421 <h3>Class Methods</h3>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
422 <table>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
423 <tr><td>None</td></tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
424 </table>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
425 <h3>Methods</h3>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
426 <table>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
427 <tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
428 <td><a href="#DiffReport.__init__">DiffReport</a></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
429 <td></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
430 </tr><tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
431 <td><a href="#DiffReport.error">error</a></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
432 <td></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
433 </tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
434 </table>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
435 <h3>Static Methods</h3>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
436 <table>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
437 <tr><td>None</td></tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
438 </table>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
439 <a NAME="DiffReport.__init__" ID="DiffReport.__init__"></a>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
440 <h4>DiffReport (Constructor)</h4>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
441 <b>DiffReport</b>(<i>options</i>)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
442 <a NAME="DiffReport.error" ID="DiffReport.error"></a>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
443 <h4>DiffReport.error</h4>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
444 <b>error</b>(<i>line_number, offset, text, check</i>)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
445
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
446 <div align="right"><a href="#top">Up</a></div>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
447 <hr /><hr />
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
448 <a NAME="FileReport" ID="FileReport"></a>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
449 <h2>FileReport</h2>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
450 <p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
451 Collect the results of the checks and print only the filenames.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
452 </p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
453 <h3>Derived from</h3>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
454 BaseReport
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
455 <h3>Class Attributes</h3>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
456 <table>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
457 <tr><td>print_filename</td></tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
458 </table>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
459 <h3>Class Methods</h3>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
460 <table>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
461 <tr><td>None</td></tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
462 </table>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
463 <h3>Methods</h3>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
464 <table>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
465 <tr><td>None</td></tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
466 </table>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
467 <h3>Static Methods</h3>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
468 <table>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
469 <tr><td>None</td></tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
470 </table>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
471
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
472 <div align="right"><a href="#top">Up</a></div>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
473 <hr /><hr />
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
474 <a NAME="StandardReport" ID="StandardReport"></a>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
475 <h2>StandardReport</h2>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
476 <p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
477 Collect and print the results of the checks.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
478 </p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
479 <h3>Derived from</h3>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
480 BaseReport
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
481 <h3>Class Attributes</h3>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
482 <table>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
483 <tr><td>None</td></tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
484 </table>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
485 <h3>Class Methods</h3>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
486 <table>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
487 <tr><td>None</td></tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
488 </table>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
489 <h3>Methods</h3>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
490 <table>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
491 <tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
492 <td><a href="#StandardReport.__init__">StandardReport</a></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
493 <td></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
494 </tr><tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
495 <td><a href="#StandardReport.error">error</a></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
496 <td>Report an error, according to options.</td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
497 </tr><tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
498 <td><a href="#StandardReport.error_args">error_args</a></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
499 <td>Report an error, according to options.</td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
500 </tr><tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
501 <td><a href="#StandardReport.get_file_results">get_file_results</a></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
502 <td>Print the result and return the overall count for this file.</td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
503 </tr><tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
504 <td><a href="#StandardReport.init_file">init_file</a></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
505 <td>Signal a new file.</td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
506 </tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
507 </table>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
508 <h3>Static Methods</h3>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
509 <table>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
510 <tr><td>None</td></tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
511 </table>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
512 <a NAME="StandardReport.__init__" ID="StandardReport.__init__"></a>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
513 <h4>StandardReport (Constructor)</h4>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
514 <b>StandardReport</b>(<i>options</i>)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
515 <a NAME="StandardReport.error" ID="StandardReport.error"></a>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
516 <h4>StandardReport.error</h4>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
517 <b>error</b>(<i>line_number, offset, text, check</i>)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
518 <p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
519 Report an error, according to options.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
520 </p><a NAME="StandardReport.error_args" ID="StandardReport.error_args"></a>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
521 <h4>StandardReport.error_args</h4>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
522 <b>error_args</b>(<i>line_number, offset, code, check, *args</i>)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
523 <p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
524 Report an error, according to options.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
525 </p><a NAME="StandardReport.get_file_results" ID="StandardReport.get_file_results"></a>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
526 <h4>StandardReport.get_file_results</h4>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
527 <b>get_file_results</b>(<i></i>)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
528 <p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
529 Print the result and return the overall count for this file.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
530 </p><a NAME="StandardReport.init_file" ID="StandardReport.init_file"></a>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
531 <h4>StandardReport.init_file</h4>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
532 <b>init_file</b>(<i>filename, lines, expected, line_offset</i>)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
533 <p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
534 Signal a new file.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
535 </p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
536 <div align="right"><a href="#top">Up</a></div>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
537 <hr /><hr />
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
538 <a NAME="StyleGuide" ID="StyleGuide"></a>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
539 <h2>StyleGuide</h2>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
540 <p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
541 Initialize a PEP-8 instance with few options.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
542 </p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
543 <h3>Derived from</h3>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
544 object
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
545 <h3>Class Attributes</h3>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
546 <table>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
547 <tr><td>None</td></tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
548 </table>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
549 <h3>Class Methods</h3>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
550 <table>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
551 <tr><td>None</td></tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
552 </table>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
553 <h3>Methods</h3>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
554 <table>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
555 <tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
556 <td><a href="#StyleGuide.__init__">StyleGuide</a></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
557 <td></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
558 </tr><tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
559 <td><a href="#StyleGuide.check_files">check_files</a></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
560 <td>Run all checks on the paths.</td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
561 </tr><tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
562 <td><a href="#StyleGuide.excluded">excluded</a></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
563 <td>Check if options.exclude contains a pattern that matches filename.</td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
564 </tr><tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
565 <td><a href="#StyleGuide.get_checks">get_checks</a></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
566 <td>Find all globally visible functions where the first argument name starts with argument_name and which contain selected tests.</td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
567 </tr><tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
568 <td><a href="#StyleGuide.ignore_code">ignore_code</a></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
569 <td>Check if the error code should be ignored.</td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
570 </tr><tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
571 <td><a href="#StyleGuide.init_report">init_report</a></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
572 <td>Initialize the report instance.</td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
573 </tr><tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
574 <td><a href="#StyleGuide.input_dir">input_dir</a></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
575 <td>Check all files in this directory and all subdirectories.</td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
576 </tr><tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
577 <td><a href="#StyleGuide.input_file">input_file</a></td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
578 <td>Run all checks on a Python source file.</td>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
579 </tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
580 </table>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
581 <h3>Static Methods</h3>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
582 <table>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
583 <tr><td>None</td></tr>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
584 </table>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
585 <a NAME="StyleGuide.__init__" ID="StyleGuide.__init__"></a>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
586 <h4>StyleGuide (Constructor)</h4>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
587 <b>StyleGuide</b>(<i>*args, **kwargs</i>)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
588 <a NAME="StyleGuide.check_files" ID="StyleGuide.check_files"></a>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
589 <h4>StyleGuide.check_files</h4>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
590 <b>check_files</b>(<i>paths=None</i>)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
591 <p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
592 Run all checks on the paths.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
593 </p><a NAME="StyleGuide.excluded" ID="StyleGuide.excluded"></a>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
594 <h4>StyleGuide.excluded</h4>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
595 <b>excluded</b>(<i>filename, parent=None</i>)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
596 <p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
597 Check if options.exclude contains a pattern that matches filename.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
598 </p><a NAME="StyleGuide.get_checks" ID="StyleGuide.get_checks"></a>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
599 <h4>StyleGuide.get_checks</h4>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
600 <b>get_checks</b>(<i>argument_name</i>)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
601 <p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
602 Find all globally visible functions where the first argument name
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
603 starts with argument_name and which contain selected tests.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
604 </p><a NAME="StyleGuide.ignore_code" ID="StyleGuide.ignore_code"></a>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
605 <h4>StyleGuide.ignore_code</h4>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
606 <b>ignore_code</b>(<i>code</i>)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
607 <p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
608 Check if the error code should be ignored.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
609 </p><p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
610 If 'options.select' contains a prefix of the error code,
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
611 return False. Else, if 'options.ignore' contains a prefix of
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
612 the error code, return True.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
613 </p><a NAME="StyleGuide.init_report" ID="StyleGuide.init_report"></a>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
614 <h4>StyleGuide.init_report</h4>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
615 <b>init_report</b>(<i>reporter=None</i>)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
616 <p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
617 Initialize the report instance.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
618 </p><a NAME="StyleGuide.input_dir" ID="StyleGuide.input_dir"></a>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
619 <h4>StyleGuide.input_dir</h4>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
620 <b>input_dir</b>(<i>dirname</i>)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
621 <p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
622 Check all files in this directory and all subdirectories.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
623 </p><a NAME="StyleGuide.input_file" ID="StyleGuide.input_file"></a>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
624 <h4>StyleGuide.input_file</h4>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
625 <b>input_file</b>(<i>filename, lines=None, expected=None, line_offset=0</i>)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
626 <p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
627 Run all checks on a Python source file.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
628 </p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
629 <div align="right"><a href="#top">Up</a></div>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
630 <hr /><hr />
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
631 <a NAME="_add_check" ID="_add_check"></a>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
632 <h2>_add_check</h2>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
633 <b>_add_check</b>(<i>check, kind, codes, args</i>)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
634
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
635 <div align="right"><a href="#top">Up</a></div>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
636 <hr /><hr />
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
637 <a NAME="_main" ID="_main"></a>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
638 <h2>_main</h2>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
639 <b>_main</b>(<i></i>)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
640 <p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
641 Parse options and run checks on Python source.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
642 </p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
643 <div align="right"><a href="#top">Up</a></div>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
644 <hr /><hr />
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
645 <a NAME="blank_lines" ID="blank_lines"></a>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
646 <h2>blank_lines</h2>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
647 <b>blank_lines</b>(<i>logical_line, blank_lines, indent_level, line_number, previous_logical, previous_indent_level</i>)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
648 <p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
649 Separate top-level function and class definitions with two blank lines.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
650 </p><p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
651 Method definitions inside a class are separated by a single blank line.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
652 </p><p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
653 Extra blank lines may be used (sparingly) to separate groups of related
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
654 functions. Blank lines may be omitted between a bunch of related
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
655 one-liners (e.g. a set of dummy implementations).
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
656 </p><p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
657 Use blank lines in functions, sparingly, to indicate logical sections.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
658 </p><p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
659 Okay: def a():\n pass\n\n\ndef b():\n pass
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
660 Okay: def a():\n pass\n\n\n# Foo\n# Bar\n\ndef b():\n pass
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
661 </p><p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
662 E301: class Foo:\n b = 0\n def bar():\n pass
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
663 E302: def a():\n pass\n\ndef b(n):\n pass
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
664 E303: def a():\n pass\n\n\n\ndef b(n):\n pass
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
665 E303: def a():\n\n\n\n pass
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
666 E304: @decorator\n\ndef a():\n pass
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
667 </p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
668 <div align="right"><a href="#top">Up</a></div>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
669 <hr /><hr />
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
670 <a NAME="comparison_to_singleton" ID="comparison_to_singleton"></a>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
671 <h2>comparison_to_singleton</h2>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
672 <b>comparison_to_singleton</b>(<i>logical_line, noqa</i>)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
673 <p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
674 Comparisons to singletons like None should always be done
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
675 with "is" or "is not", never the equality operators.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
676 </p><p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
677 Okay: if arg is not None:
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
678 E711: if arg != None:
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
679 E712: if arg == True:
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
680 </p><p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
681 Also, beware of writing if x when you really mean if x is not None --
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
682 e.g. when testing whether a variable or argument that defaults to None was
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
683 set to some other value. The other value might have a type (such as a
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
684 container) that could be false in a boolean context!
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
685 </p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
686 <div align="right"><a href="#top">Up</a></div>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
687 <hr /><hr />
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
688 <a NAME="comparison_type" ID="comparison_type"></a>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
689 <h2>comparison_type</h2>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
690 <b>comparison_type</b>(<i>logical_line</i>)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
691 <p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
692 Object type comparisons should always use isinstance() instead of
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
693 comparing types directly.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
694 </p><p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
695 Okay: if isinstance(obj, int):
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
696 E721: if type(obj) is type(1):
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
697 </p><p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
698 When checking if an object is a string, keep in mind that it might be a
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
699 unicode string too! In Python 2.3, str and unicode have a common base
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
700 class, basestring, so you can do:
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
701 </p><p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
702 Okay: if isinstance(obj, basestring):
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
703 Okay: if type(a1) is type(b1):
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
704 </p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
705 <div align="right"><a href="#top">Up</a></div>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
706 <hr /><hr />
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
707 <a NAME="compound_statements" ID="compound_statements"></a>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
708 <h2>compound_statements</h2>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
709 <b>compound_statements</b>(<i>logical_line</i>)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
710 <p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
711 Compound statements (multiple statements on the same line) are
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
712 generally discouraged.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
713 </p><p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
714 While sometimes it's okay to put an if/for/while with a small body
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
715 on the same line, never do this for multi-clause statements. Also
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
716 avoid folding such long lines!
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
717 </p><p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
718 Okay: if foo == 'blah':\n do_blah_thing()
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
719 Okay: do_one()
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
720 Okay: do_two()
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
721 Okay: do_three()
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
722 </p><p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
723 E701: if foo == 'blah': do_blah_thing()
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
724 E701: for x in lst: total += x
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
725 E701: while t < 10: t = delay()
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
726 E701: if foo == 'blah': do_blah_thing()
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
727 E701: else: do_non_blah_thing()
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
728 E701: try: something()
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
729 E701: finally: cleanup()
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
730 E701: if foo == 'blah': one(); two(); three()
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
731 </p><p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
732 E702: do_one(); do_two(); do_three()
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
733 E703: do_four(); # useless semicolon
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
734 </p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
735 <div align="right"><a href="#top">Up</a></div>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
736 <hr /><hr />
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
737 <a NAME="continued_indentation" ID="continued_indentation"></a>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
738 <h2>continued_indentation</h2>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
739 <b>continued_indentation</b>(<i>logical_line, tokens, indent_level, hang_closing, noqa, verbose</i>)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
740 <p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
741 Continuation lines should align wrapped elements either vertically using
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
742 Python's implicit line joining inside parentheses, brackets and braces, or
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
743 using a hanging indent.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
744 </p><p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
745 When using a hanging indent the following considerations should be applied:
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
746 </p><p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
747 - there should be no arguments on the first line, and
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
748 </p><p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
749 - further indentation should be used to clearly distinguish itself as a
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
750 continuation line.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
751 </p><p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
752 Okay: a = (\n)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
753 E123: a = (\n )
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
754 </p><p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
755 Okay: a = (\n 42)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
756 E121: a = (\n 42)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
757 E122: a = (\n42)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
758 E123: a = (\n 42\n )
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
759 E124: a = (24,\n 42\n)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
760 E125: if (a or\n b):\n pass
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
761 E126: a = (\n 42)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
762 E127: a = (24,\n 42)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
763 E128: a = (24,\n 42)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
764 </p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
765 <div align="right"><a href="#top">Up</a></div>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
766 <hr /><hr />
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
767 <a NAME="expand_indent" ID="expand_indent"></a>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
768 <h2>expand_indent</h2>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
769 <b>expand_indent</b>(<i>line</i>)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
770 <p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
771 Return the amount of indentation.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
772 Tabs are expanded to the next multiple of 8.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
773 </p><p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
774 >>> expand_indent(' ')
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
775 4
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
776 >>> expand_indent('\t')
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
777 8
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
778 >>> expand_indent(' \t')
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
779 8
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
780 >>> expand_indent(' \t')
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
781 8
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
782 >>> expand_indent(' \t')
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
783 16
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
784 </p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
785 <div align="right"><a href="#top">Up</a></div>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
786 <hr /><hr />
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
787 <a NAME="explicit_line_join" ID="explicit_line_join"></a>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
788 <h2>explicit_line_join</h2>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
789 <b>explicit_line_join</b>(<i>logical_line, tokens</i>)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
790 <p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
791 Avoid explicit line join between brackets.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
792 </p><p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
793 The preferred way of wrapping long lines is by using Python's implied line
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
794 continuation inside parentheses, brackets and braces. Long lines can be
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
795 broken over multiple lines by wrapping expressions in parentheses. These
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
796 should be used in preference to using a backslash for line continuation.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
797 </p><p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
798 E502: aaa = [123, \\n 123]
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
799 E502: aaa = ("bbb " \\n "ccc")
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
800 </p><p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
801 Okay: aaa = [123,\n 123]
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
802 Okay: aaa = ("bbb "\n "ccc")
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
803 Okay: aaa = "bbb " \\n "ccc"
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
804 </p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
805 <div align="right"><a href="#top">Up</a></div>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
806 <hr /><hr />
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
807 <a NAME="extraneous_whitespace" ID="extraneous_whitespace"></a>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
808 <h2>extraneous_whitespace</h2>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
809 <b>extraneous_whitespace</b>(<i>logical_line</i>)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
810 <p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
811 Avoid extraneous whitespace in the following situations:
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
812 </p><p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
813 - Immediately inside parentheses, brackets or braces.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
814 </p><p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
815 - Immediately before a comma, semicolon, or colon.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
816 </p><p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
817 Okay: spam(ham[1], {eggs: 2})
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
818 E201: spam( ham[1], {eggs: 2})
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
819 E201: spam(ham[ 1], {eggs: 2})
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
820 E201: spam(ham[1], { eggs: 2})
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
821 E202: spam(ham[1], {eggs: 2} )
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
822 E202: spam(ham[1 ], {eggs: 2})
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
823 E202: spam(ham[1], {eggs: 2 })
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
824 </p><p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
825 E203: if x == 4: print x, y; x, y = y , x
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
826 E203: if x == 4: print x, y ; x, y = y, x
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
827 E203: if x == 4 : print x, y; x, y = y, x
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
828 </p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
829 <div align="right"><a href="#top">Up</a></div>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
830 <hr /><hr />
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
831 <a NAME="filename_match" ID="filename_match"></a>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
832 <h2>filename_match</h2>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
833 <b>filename_match</b>(<i>filename, patterns, default=True</i>)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
834 <p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
835 Check if patterns contains a pattern that matches filename.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
836 If patterns is unspecified, this always returns True.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
837 </p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
838 <div align="right"><a href="#top">Up</a></div>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
839 <hr /><hr />
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
840 <a NAME="get_parser" ID="get_parser"></a>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
841 <h2>get_parser</h2>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
842 <b>get_parser</b>(<i>prog='pep8', version=__version__</i>)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
843
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
844 <div align="right"><a href="#top">Up</a></div>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
845 <hr /><hr />
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
846 <a NAME="imports_on_separate_lines" ID="imports_on_separate_lines"></a>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
847 <h2>imports_on_separate_lines</h2>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
848 <b>imports_on_separate_lines</b>(<i>logical_line</i>)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
849 <p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
850 Imports should usually be on separate lines.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
851 </p><p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
852 Okay: import os\nimport sys
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
853 E401: import sys, os
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
854 </p><p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
855 Okay: from subprocess import Popen, PIPE
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
856 Okay: from myclas import MyClass
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
857 Okay: from foo.bar.yourclass import YourClass
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
858 Okay: import myclass
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
859 Okay: import foo.bar.yourclass
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
860 </p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
861 <div align="right"><a href="#top">Up</a></div>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
862 <hr /><hr />
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
863 <a NAME="indentation" ID="indentation"></a>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
864 <h2>indentation</h2>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
865 <b>indentation</b>(<i>logical_line, previous_logical, indent_char, indent_level, previous_indent_level</i>)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
866 <p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
867 Use 4 spaces per indentation level.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
868 </p><p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
869 For really old code that you don't want to mess up, you can continue to
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
870 use 8-space tabs.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
871 </p><p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
872 Okay: a = 1
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
873 Okay: if a == 0:\n a = 1
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
874 E111: a = 1
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
875 </p><p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
876 Okay: for item in items:\n pass
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
877 E112: for item in items:\npass
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
878 </p><p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
879 Okay: a = 1\nb = 2
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
880 E113: a = 1\n b = 2
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
881 </p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
882 <div align="right"><a href="#top">Up</a></div>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
883 <hr /><hr />
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
884 <a NAME="init_checks_registry" ID="init_checks_registry"></a>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
885 <h2>init_checks_registry</h2>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
886 <b>init_checks_registry</b>(<i></i>)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
887 <p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
888 Register all globally visible functions where the first argument name
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
889 is 'physical_line' or 'logical_line'.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
890 </p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
891 <div align="right"><a href="#top">Up</a></div>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
892 <hr /><hr />
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
893 <a NAME="maximum_line_length" ID="maximum_line_length"></a>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
894 <h2>maximum_line_length</h2>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
895 <b>maximum_line_length</b>(<i>physical_line, max_line_length</i>)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
896 <p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
897 Limit all lines to a maximum of 79 characters.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
898 </p><p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
899 There are still many devices around that are limited to 80 character
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
900 lines; plus, limiting windows to 80 characters makes it possible to have
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
901 several windows side-by-side. The default wrapping on such devices looks
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
902 ugly. Therefore, please limit all lines to a maximum of 79 characters.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
903 For flowing long blocks of text (docstrings or comments), limiting the
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
904 length to 72 characters is recommended.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
905 </p><p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
906 Reports error E501.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
907 </p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
908 <div align="right"><a href="#top">Up</a></div>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
909 <hr /><hr />
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
910 <a NAME="missing_newline" ID="missing_newline"></a>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
911 <h2>missing_newline</h2>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
912 <b>missing_newline</b>(<i>physical_line</i>)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
913 <p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
914 JCR: The last line should have a newline.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
915 </p><p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
916 Reports warning W292.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
917 </p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
918 <div align="right"><a href="#top">Up</a></div>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
919 <hr /><hr />
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
920 <a NAME="missing_whitespace" ID="missing_whitespace"></a>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
921 <h2>missing_whitespace</h2>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
922 <b>missing_whitespace</b>(<i>logical_line</i>)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
923 <p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
924 JCR: Each comma, semicolon or colon should be followed by whitespace.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
925 </p><p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
926 Okay: [a, b]
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
927 Okay: (3,)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
928 Okay: a[1:4]
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
929 Okay: a[:4]
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
930 Okay: a[1:]
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
931 Okay: a[1:4:2]
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
932 E231: ['a','b']
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
933 E231: foo(bar,baz)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
934 E231: [{'a':'b'}]
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
935 </p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
936 <div align="right"><a href="#top">Up</a></div>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
937 <hr /><hr />
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
938 <a NAME="missing_whitespace_around_operator" ID="missing_whitespace_around_operator"></a>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
939 <h2>missing_whitespace_around_operator</h2>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
940 <b>missing_whitespace_around_operator</b>(<i>logical_line, tokens</i>)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
941 <p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
942 - Always surround these binary operators with a single space on
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
943 either side: assignment (=), augmented assignment (+=, -= etc.),
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
944 comparisons (==, <, >, !=, <>, <=, >=, in, not in, is, is not),
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
945 Booleans (and, or, not).
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
946 </p><p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
947 - Use spaces around arithmetic operators.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
948 </p><p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
949 Okay: i = i + 1
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
950 Okay: submitted += 1
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
951 Okay: x = x * 2 - 1
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
952 Okay: hypot2 = x * x + y * y
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
953 Okay: c = (a + b) * (a - b)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
954 Okay: foo(bar, key='word', *args, **kwargs)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
955 Okay: alpha[:-i]
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
956 </p><p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
957 E225: i=i+1
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
958 E225: submitted +=1
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
959 E225: x = x /2 - 1
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
960 E225: z = x **y
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
961 E226: c = (a+b) * (a-b)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
962 E226: hypot2 = x*x + y*y
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
963 E227: c = a|b
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
964 E228: msg = fmt%(errno, errmsg)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
965 </p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
966 <div align="right"><a href="#top">Up</a></div>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
967 <hr /><hr />
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
968 <a NAME="mute_string" ID="mute_string"></a>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
969 <h2>mute_string</h2>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
970 <b>mute_string</b>(<i>text</i>)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
971 <p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
972 Replace contents with 'xxx' to prevent syntax matching.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
973 </p><p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
974 >>> mute_string('"abc"')
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
975 '"xxx"'
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
976 >>> mute_string("'''abc'''")
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
977 "'''xxx'''"
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
978 >>> mute_string("r'abc'")
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
979 "r'xxx'"
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
980 </p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
981 <div align="right"><a href="#top">Up</a></div>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
982 <hr /><hr />
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
983 <a NAME="parse_udiff" ID="parse_udiff"></a>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
984 <h2>parse_udiff</h2>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
985 <b>parse_udiff</b>(<i>diff, patterns=None, parent='.'</i>)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
986 <p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
987 Return a dictionary of matching lines.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
988 </p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
989 <div align="right"><a href="#top">Up</a></div>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
990 <hr /><hr />
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
991 <a NAME="process_options" ID="process_options"></a>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
992 <h2>process_options</h2>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
993 <b>process_options</b>(<i>arglist=None, parse_argv=False, config_file=None, parser=None</i>)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
994 <p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
995 Process options passed either via arglist or via command line args.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
996 </p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
997 <div align="right"><a href="#top">Up</a></div>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
998 <hr /><hr />
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
999 <a NAME="python_3000_backticks" ID="python_3000_backticks"></a>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1000 <h2>python_3000_backticks</h2>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1001 <b>python_3000_backticks</b>(<i>logical_line</i>)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1002 <p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1003 Backticks are removed in Python 3.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1004 Use repr() instead.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1005 </p><p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1006 Okay: val = repr(1 + 2)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1007 W604: val = `1 + 2`
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1008 </p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1009 <div align="right"><a href="#top">Up</a></div>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1010 <hr /><hr />
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1011 <a NAME="python_3000_has_key" ID="python_3000_has_key"></a>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1012 <h2>python_3000_has_key</h2>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1013 <b>python_3000_has_key</b>(<i>logical_line</i>)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1014 <p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1015 The {}.has_key() method is removed in the Python 3.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1016 Use the 'in' operation instead.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1017 </p><p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1018 Okay: if "alph" in d:\n print d["alph"]
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1019 W601: assert d.has_key('alph')
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1020 </p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1021 <div align="right"><a href="#top">Up</a></div>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1022 <hr /><hr />
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1023 <a NAME="python_3000_not_equal" ID="python_3000_not_equal"></a>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1024 <h2>python_3000_not_equal</h2>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1025 <b>python_3000_not_equal</b>(<i>logical_line</i>)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1026 <p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1027 != can also be written <>, but this is an obsolete usage kept for
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1028 backwards compatibility only. New code should always use !=.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1029 The older syntax is removed in Python 3.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1030 </p><p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1031 Okay: if a != 'no':
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1032 W603: if a <> 'no':
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1033 </p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1034 <div align="right"><a href="#top">Up</a></div>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1035 <hr /><hr />
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1036 <a NAME="python_3000_raise_comma" ID="python_3000_raise_comma"></a>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1037 <h2>python_3000_raise_comma</h2>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1038 <b>python_3000_raise_comma</b>(<i>logical_line</i>)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1039 <p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1040 When raising an exception, use "raise ValueError('message')"
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1041 instead of the older form "raise ValueError, 'message'".
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1042 </p><p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1043 The paren-using form is preferred because when the exception arguments
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1044 are long or include string formatting, you don't need to use line
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1045 continuation characters thanks to the containing parentheses. The older
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1046 form is removed in Python 3.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1047 </p><p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1048 Okay: raise DummyError("Message")
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1049 W602: raise DummyError, "Message"
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1050 </p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1051 <div align="right"><a href="#top">Up</a></div>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1052 <hr /><hr />
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1053 <a NAME="read_config" ID="read_config"></a>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1054 <h2>read_config</h2>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1055 <b>read_config</b>(<i>options, args, arglist, parser</i>)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1056 <p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1057 Read both user configuration and local configuration.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1058 </p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1059 <div align="right"><a href="#top">Up</a></div>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1060 <hr /><hr />
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1061 <a NAME="readlines" ID="readlines"></a>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1062 <h2>readlines</h2>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1063 <b>readlines</b>(<i>filename</i>)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1064
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1065 <div align="right"><a href="#top">Up</a></div>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1066 <hr /><hr />
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1067 <a NAME="readlines_1" ID="readlines_1"></a>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1068 <h2>readlines</h2>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1069 <b>readlines</b>(<i>filename</i>)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1070
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1071 <div align="right"><a href="#top">Up</a></div>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1072 <hr /><hr />
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1073 <a NAME="register_check" ID="register_check"></a>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1074 <h2>register_check</h2>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1075 <b>register_check</b>(<i>check, codes=None</i>)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1076 <p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1077 Register a new check object.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1078 </p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1079 <div align="right"><a href="#top">Up</a></div>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1080 <hr /><hr />
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1081 <a NAME="stdin_get_value" ID="stdin_get_value"></a>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1082 <h2>stdin_get_value</h2>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1083 <b>stdin_get_value</b>(<i></i>)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1084
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1085 <div align="right"><a href="#top">Up</a></div>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1086 <hr /><hr />
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1087 <a NAME="tabs_obsolete" ID="tabs_obsolete"></a>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1088 <h2>tabs_obsolete</h2>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1089 <b>tabs_obsolete</b>(<i>physical_line</i>)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1090 <p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1091 For new projects, spaces-only are strongly recommended over tabs. Most
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1092 editors have features that make this easy to do.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1093 </p><p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1094 Okay: if True:\n return
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1095 W191: if True:\n\treturn
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1096 </p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1097 <div align="right"><a href="#top">Up</a></div>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1098 <hr /><hr />
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1099 <a NAME="tabs_or_spaces" ID="tabs_or_spaces"></a>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1100 <h2>tabs_or_spaces</h2>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1101 <b>tabs_or_spaces</b>(<i>physical_line, indent_char</i>)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1102 <p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1103 Never mix tabs and spaces.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1104 </p><p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1105 The most popular way of indenting Python is with spaces only. The
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1106 second-most popular way is with tabs only. Code indented with a mixture
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1107 of tabs and spaces should be converted to using spaces exclusively. When
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1108 invoking the Python command line interpreter with the -t option, it issues
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1109 warnings about code that illegally mixes tabs and spaces. When using -tt
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1110 these warnings become errors. These options are highly recommended!
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1111 </p><p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1112 Okay: if a == 0:\n a = 1\n b = 1
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1113 E101: if a == 0:\n a = 1\n\tb = 1
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1114 </p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1115 <div align="right"><a href="#top">Up</a></div>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1116 <hr /><hr />
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1117 <a NAME="trailing_blank_lines" ID="trailing_blank_lines"></a>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1118 <h2>trailing_blank_lines</h2>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1119 <b>trailing_blank_lines</b>(<i>physical_line, lines, line_number</i>)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1120 <p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1121 JCR: Trailing blank lines are superfluous.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1122 </p><p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1123 Okay: spam(1)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1124 W391: spam(1)\n
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1125 </p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1126 <div align="right"><a href="#top">Up</a></div>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1127 <hr /><hr />
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1128 <a NAME="trailing_whitespace" ID="trailing_whitespace"></a>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1129 <h2>trailing_whitespace</h2>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1130 <b>trailing_whitespace</b>(<i>physical_line</i>)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1131 <p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1132 JCR: Trailing whitespace is superfluous.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1133 FBM: Except when it occurs as part of a blank line (i.e. the line is
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1134 nothing but whitespace). According to Python docs[1] a line with only
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1135 whitespace is considered a blank line, and is to be ignored. However,
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1136 matching a blank line to its indentation level avoids mistakenly
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1137 terminating a multi-line statement (e.g. class declaration) when
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1138 pasting code into the standard Python interpreter.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1139 </p><p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1140 [1] http://docs.python.org/reference/lexical_analysis.html#blank-lines
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1141 </p><p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1142 The warning returned varies on whether the line itself is blank, for easier
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1143 filtering for those who want to indent their blank lines.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1144 </p><p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1145 Okay: spam(1)\n#
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1146 W291: spam(1) \n#
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1147 W293: class Foo(object):\n \n bang = 12
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1148 </p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1149 <div align="right"><a href="#top">Up</a></div>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1150 <hr /><hr />
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1151 <a NAME="whitespace_around_comma" ID="whitespace_around_comma"></a>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1152 <h2>whitespace_around_comma</h2>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1153 <b>whitespace_around_comma</b>(<i>logical_line</i>)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1154 <p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1155 Avoid extraneous whitespace in the following situations:
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1156 </p><p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1157 - More than one space around an assignment (or other) operator to
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1158 align it with another.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1159 </p><p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1160 JCR: This should also be applied around comma etc.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1161 Note: these checks are disabled by default
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1162 </p><p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1163 Okay: a = (1, 2)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1164 E241: a = (1, 2)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1165 E242: a = (1,\t2)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1166 </p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1167 <div align="right"><a href="#top">Up</a></div>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1168 <hr /><hr />
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1169 <a NAME="whitespace_around_keywords" ID="whitespace_around_keywords"></a>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1170 <h2>whitespace_around_keywords</h2>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1171 <b>whitespace_around_keywords</b>(<i>logical_line</i>)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1172 <p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1173 Avoid extraneous whitespace around keywords.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1174 </p><p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1175 Okay: True and False
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1176 E271: True and False
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1177 E272: True and False
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1178 E273: True and\tFalse
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1179 E274: True\tand False
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1180 </p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1181 <div align="right"><a href="#top">Up</a></div>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1182 <hr /><hr />
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1183 <a NAME="whitespace_around_named_parameter_equals" ID="whitespace_around_named_parameter_equals"></a>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1184 <h2>whitespace_around_named_parameter_equals</h2>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1185 <b>whitespace_around_named_parameter_equals</b>(<i>logical_line, tokens</i>)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1186 <p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1187 Don't use spaces around the '=' sign when used to indicate a
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1188 keyword argument or a default parameter value.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1189 </p><p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1190 Okay: def complex(real, imag=0.0):
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1191 Okay: return magic(r=real, i=imag)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1192 Okay: boolean(a == b)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1193 Okay: boolean(a != b)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1194 Okay: boolean(a <= b)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1195 Okay: boolean(a >= b)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1196 </p><p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1197 E251: def complex(real, imag = 0.0):
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1198 E251: return magic(r = real, i = imag)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1199 </p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1200 <div align="right"><a href="#top">Up</a></div>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1201 <hr /><hr />
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1202 <a NAME="whitespace_around_operator" ID="whitespace_around_operator"></a>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1203 <h2>whitespace_around_operator</h2>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1204 <b>whitespace_around_operator</b>(<i>logical_line</i>)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1205 <p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1206 Avoid extraneous whitespace in the following situations:
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1207 </p><p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1208 - More than one space around an assignment (or other) operator to
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1209 align it with another.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1210 </p><p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1211 Okay: a = 12 + 3
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1212 E221: a = 4 + 5
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1213 E222: a = 4 + 5
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1214 E223: a = 4\t+ 5
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1215 E224: a = 4 +\t5
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1216 </p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1217 <div align="right"><a href="#top">Up</a></div>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1218 <hr /><hr />
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1219 <a NAME="whitespace_before_inline_comment" ID="whitespace_before_inline_comment"></a>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1220 <h2>whitespace_before_inline_comment</h2>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1221 <b>whitespace_before_inline_comment</b>(<i>logical_line, tokens</i>)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1222 <p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1223 Separate inline comments by at least two spaces.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1224 </p><p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1225 An inline comment is a comment on the same line as a statement. Inline
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1226 comments should be separated by at least two spaces from the statement.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1227 They should start with a # and a single space.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1228 </p><p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1229 Okay: x = x + 1 # Increment x
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1230 Okay: x = x + 1 # Increment x
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1231 E261: x = x + 1 # Increment x
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1232 E262: x = x + 1 #Increment x
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1233 E262: x = x + 1 # Increment x
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1234 </p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1235 <div align="right"><a href="#top">Up</a></div>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1236 <hr /><hr />
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1237 <a NAME="whitespace_before_parameters" ID="whitespace_before_parameters"></a>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1238 <h2>whitespace_before_parameters</h2>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1239 <b>whitespace_before_parameters</b>(<i>logical_line, tokens</i>)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1240 <p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1241 Avoid extraneous whitespace in the following situations:
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1242 </p><p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1243 - Immediately before the open parenthesis that starts the argument
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1244 list of a function call.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1245 </p><p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1246 - Immediately before the open parenthesis that starts an indexing or
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1247 slicing.
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1248 </p><p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1249 Okay: spam(1)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1250 E211: spam (1)
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1251 </p><p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1252 Okay: dict['key'] = list[index]
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1253 E211: dict ['key'] = list[index]
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1254 E211: dict['key'] = list [index]
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1255 </p>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1256 <div align="right"><a href="#top">Up</a></div>
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1257 <hr />
177b1858245f Finished changing the names of the various code style checkers to make them more appropriate to the broadened scope.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1258 </body></html>

eric ide

mercurial