--- a/src/eric7/Documentation/Source/eric7.Plugins.CheckerPlugins.CodeStyleChecker.pycodestyle.html Thu Jan 04 17:16:15 2024 +0100 +++ b/src/eric7/Documentation/Source/eric7.Plugins.CheckerPlugins.CodeStyleChecker.pycodestyle.html Thu Jan 04 18:02:25 2024 +0100 @@ -9,14 +9,56 @@ <h1>eric7.Plugins.CheckerPlugins.CodeStyleChecker.pycodestyle</h1> <h3>Global Attributes</h3> - <table> -<tr><td>ARITHMETIC_OP</td></tr><tr><td>BENCHMARK_KEYS</td></tr><tr><td>BLANK_EXCEPT_REGEX</td></tr><tr><td>BLANK_LINES_CONFIG</td></tr><tr><td>COMPARE_NEGATIVE_REGEX</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>DUNDER_REGEX</td></tr><tr><td>ERRORCODE_REGEX</td></tr><tr><td>EXTRANEOUS_WHITESPACE_REGEX</td></tr><tr><td>FSTRING_END</td></tr><tr><td>FSTRING_MIDDLE</td></tr><tr><td>FSTRING_START</td></tr><tr><td>HUNK_REGEX</td></tr><tr><td>INDENT_REGEX</td></tr><tr><td>INDENT_SIZE</td></tr><tr><td>KEYWORDS</td></tr><tr><td>KEYWORD_REGEX</td></tr><tr><td>LAMBDA_REGEX</td></tr><tr><td>MAX_DOC_LENGTH</td></tr><tr><td>MAX_LINE_LENGTH</td></tr><tr><td>NEWLINE</td></tr><tr><td>OPERATOR_REGEX</td></tr><tr><td>PROJECT_CONFIG</td></tr><tr><td>PyCF_ONLY_AST</td></tr><tr><td>REPORT_FORMAT</td></tr><tr><td>SINGLETONS</td></tr><tr><td>SKIP_COMMENTS</td></tr><tr><td>SKIP_TOKENS</td></tr><tr><td>STARTSWITH_DEF_REGEX</td></tr><tr><td>STARTSWITH_INDENT_STATEMENT_REGEX</td></tr><tr><td>STARTSWITH_TOP_LEVEL_REGEX</td></tr><tr><td>UNARY_OPERATORS</td></tr><tr><td>USER_CONFIG</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>_SYMBOLIC_OPS</td></tr><tr><td>__version__</td></tr><tr><td>_checks</td></tr><tr><td>noqa</td></tr> +<tr><td>ARITHMETIC_OP</td></tr> +<tr><td>BENCHMARK_KEYS</td></tr> +<tr><td>BLANK_EXCEPT_REGEX</td></tr> +<tr><td>BLANK_LINES_CONFIG</td></tr> +<tr><td>COMPARE_NEGATIVE_REGEX</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>DUNDER_REGEX</td></tr> +<tr><td>ERRORCODE_REGEX</td></tr> +<tr><td>EXTRANEOUS_WHITESPACE_REGEX</td></tr> +<tr><td>FSTRING_END</td></tr> +<tr><td>FSTRING_MIDDLE</td></tr> +<tr><td>FSTRING_START</td></tr> +<tr><td>HUNK_REGEX</td></tr> +<tr><td>INDENT_REGEX</td></tr> +<tr><td>INDENT_SIZE</td></tr> +<tr><td>KEYWORDS</td></tr> +<tr><td>KEYWORD_REGEX</td></tr> +<tr><td>LAMBDA_REGEX</td></tr> +<tr><td>MAX_DOC_LENGTH</td></tr> +<tr><td>MAX_LINE_LENGTH</td></tr> +<tr><td>NEWLINE</td></tr> +<tr><td>OPERATOR_REGEX</td></tr> +<tr><td>PROJECT_CONFIG</td></tr> +<tr><td>PyCF_ONLY_AST</td></tr> +<tr><td>REPORT_FORMAT</td></tr> +<tr><td>SINGLETONS</td></tr> +<tr><td>SKIP_COMMENTS</td></tr> +<tr><td>SKIP_TOKENS</td></tr> +<tr><td>STARTSWITH_DEF_REGEX</td></tr> +<tr><td>STARTSWITH_INDENT_STATEMENT_REGEX</td></tr> +<tr><td>STARTSWITH_TOP_LEVEL_REGEX</td></tr> +<tr><td>UNARY_OPERATORS</td></tr> +<tr><td>USER_CONFIG</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>_SYMBOLIC_OPS</td></tr> +<tr><td>__version__</td></tr> +<tr><td>_checks</td></tr> +<tr><td>noqa</td></tr> </table> + <h3>Classes</h3> - <table> - <tr> <td><a href="#BaseReport">BaseReport</a></td> <td>Collect the results of the checks.</td> @@ -42,10 +84,9 @@ <td>Initialize a PEP-8 instance with few options.</td> </tr> </table> + <h3>Functions</h3> - <table> - <tr> <td><a href="#_add_check">_add_check</a></td> <td></td> @@ -251,30 +292,29 @@ <td>Avoid extraneous whitespace.</td> </tr> </table> + <hr /> <hr /> <a NAME="BaseReport" ID="BaseReport"></a> <h2>BaseReport</h2> - <p> Collect the results of the checks. </p> + <h3>Derived from</h3> None <h3>Class Attributes</h3> - <table> <tr><td>print_filename</td></tr> </table> + <h3>Class Methods</h3> - <table> <tr><td>None</td></tr> </table> + <h3>Methods</h3> - <table> - <tr> <td><a href="#BaseReport.__init__">BaseReport</a></td> <td></td> @@ -324,12 +364,13 @@ <td>Stop the timer.</td> </tr> </table> + <h3>Static Methods</h3> - <table> <tr><td>None</td></tr> </table> + <a NAME="BaseReport.__init__" ID="BaseReport.__init__"></a> <h4>BaseReport (Constructor)</h4> <b>BaseReport</b>(<i>options</i>) @@ -337,35 +378,34 @@ <a NAME="BaseReport.error" ID="BaseReport.error"></a> <h4>BaseReport.error</h4> <b>error</b>(<i>line_number, offset, text, check</i>) - <p> Report an error, according to options. </p> + <a NAME="BaseReport.error_args" ID="BaseReport.error_args"></a> <h4>BaseReport.error_args</h4> <b>error_args</b>(<i>line_number, offset, text, check, *args</i>) - <p> Report an error, according to options. </p> + <a NAME="BaseReport.get_count" ID="BaseReport.get_count"></a> <h4>BaseReport.get_count</h4> <b>get_count</b>(<i>prefix=''</i>) - <p> Return the total count of errors and warnings. </p> + <a NAME="BaseReport.get_file_results" ID="BaseReport.get_file_results"></a> <h4>BaseReport.get_file_results</h4> <b>get_file_results</b>(<i></i>) - <p> Return the count of errors and warnings for this file. </p> + <a NAME="BaseReport.get_statistics" ID="BaseReport.get_statistics"></a> <h4>BaseReport.get_statistics</h4> <b>get_statistics</b>(<i>prefix=''</i>) - <p> Get statistics for message codes that start with the prefix. </p> @@ -375,73 +415,72 @@ prefix='W' matches all warnings prefix='E4' matches all errors that have to do with imports </p> + <a NAME="BaseReport.increment_logical_line" ID="BaseReport.increment_logical_line"></a> <h4>BaseReport.increment_logical_line</h4> <b>increment_logical_line</b>(<i></i>) - <p> Signal a new logical line. </p> + <a NAME="BaseReport.init_file" ID="BaseReport.init_file"></a> <h4>BaseReport.init_file</h4> <b>init_file</b>(<i>filename, lines, expected, line_offset</i>) - <p> Signal a new file. </p> + <a NAME="BaseReport.print_benchmark" ID="BaseReport.print_benchmark"></a> <h4>BaseReport.print_benchmark</h4> <b>print_benchmark</b>(<i></i>) - <p> Print benchmark numbers. </p> + <a NAME="BaseReport.print_statistics" ID="BaseReport.print_statistics"></a> <h4>BaseReport.print_statistics</h4> <b>print_statistics</b>(<i>prefix=''</i>) - <p> Print overall statistics (number of errors and warnings). </p> + <a NAME="BaseReport.start" ID="BaseReport.start"></a> <h4>BaseReport.start</h4> <b>start</b>(<i></i>) - <p> Start the timer. </p> + <a NAME="BaseReport.stop" ID="BaseReport.stop"></a> <h4>BaseReport.stop</h4> <b>stop</b>(<i></i>) - <p> Stop the timer. </p> + <div align="right"><a href="#top">Up</a></div> <hr /> <hr /> <a NAME="Checker" ID="Checker"></a> <h2>Checker</h2> - <p> Load a Python source file, tokenize it, check coding style. </p> + <h3>Derived from</h3> None <h3>Class Attributes</h3> - <table> <tr><td>None</td></tr> </table> + <h3>Class Methods</h3> - <table> <tr><td>None</td></tr> </table> + <h3>Methods</h3> - <table> - <tr> <td><a href="#Checker.__init__">Checker</a></td> <td></td> @@ -491,12 +530,13 @@ <td>Run a check plugin.</td> </tr> </table> + <h3>Static Methods</h3> - <table> <tr><td>None</td></tr> </table> + <a NAME="Checker.__init__" ID="Checker.__init__"></a> <h4>Checker (Constructor)</h4> <b>Checker</b>(<i>filename=None, lines=None, options=None, report=None, **kwargs</i>) @@ -504,105 +544,103 @@ <a NAME="Checker.build_tokens_line" ID="Checker.build_tokens_line"></a> <h4>Checker.build_tokens_line</h4> <b>build_tokens_line</b>(<i></i>) - <p> Build a logical line from tokens. </p> + <a NAME="Checker.check_all" ID="Checker.check_all"></a> <h4>Checker.check_all</h4> <b>check_all</b>(<i>expected=None, line_offset=0</i>) - <p> Run all checks on the input file. </p> + <a NAME="Checker.check_ast" ID="Checker.check_ast"></a> <h4>Checker.check_ast</h4> <b>check_ast</b>(<i></i>) - <p> Build the file's AST and run all AST checks. </p> + <a NAME="Checker.check_logical" ID="Checker.check_logical"></a> <h4>Checker.check_logical</h4> <b>check_logical</b>(<i></i>) - <p> Build a line from tokens and run all logical checks on it. </p> + <a NAME="Checker.check_physical" ID="Checker.check_physical"></a> <h4>Checker.check_physical</h4> <b>check_physical</b>(<i>line</i>) - <p> Run all physical checks on a raw input line. </p> + <a NAME="Checker.generate_tokens" ID="Checker.generate_tokens"></a> <h4>Checker.generate_tokens</h4> <b>generate_tokens</b>(<i></i>) - <p> Tokenize file, run physical line checks and yield tokens. </p> + <a NAME="Checker.init_checker_state" ID="Checker.init_checker_state"></a> <h4>Checker.init_checker_state</h4> <b>init_checker_state</b>(<i>name, argument_names</i>) - <p> Prepare custom state for the specific checker plugin. </p> + <a NAME="Checker.maybe_check_physical" ID="Checker.maybe_check_physical"></a> <h4>Checker.maybe_check_physical</h4> <b>maybe_check_physical</b>(<i>token, prev_physical</i>) - <p> If appropriate for token, check current physical line(s). </p> + <a NAME="Checker.readline" ID="Checker.readline"></a> <h4>Checker.readline</h4> <b>readline</b>(<i></i>) - <p> Get the next line from the input buffer. </p> + <a NAME="Checker.report_invalid_syntax" ID="Checker.report_invalid_syntax"></a> <h4>Checker.report_invalid_syntax</h4> <b>report_invalid_syntax</b>(<i></i>) - <p> Check if the syntax is valid. </p> + <a NAME="Checker.run_check" ID="Checker.run_check"></a> <h4>Checker.run_check</h4> <b>run_check</b>(<i>check, argument_names</i>) - <p> Run a check plugin. </p> + <div align="right"><a href="#top">Up</a></div> <hr /> <hr /> <a NAME="DiffReport" ID="DiffReport"></a> <h2>DiffReport</h2> - <p> Collect and print the results for the changed lines only. </p> + <h3>Derived from</h3> StandardReport <h3>Class Attributes</h3> - <table> <tr><td>None</td></tr> </table> + <h3>Class Methods</h3> - <table> <tr><td>None</td></tr> </table> + <h3>Methods</h3> - <table> - <tr> <td><a href="#DiffReport.__init__">DiffReport</a></td> <td></td> @@ -612,12 +650,13 @@ <td></td> </tr> </table> + <h3>Static Methods</h3> - <table> <tr><td>None</td></tr> </table> + <a NAME="DiffReport.__init__" ID="DiffReport.__init__"></a> <h4>DiffReport (Constructor)</h4> <b>DiffReport</b>(<i>options</i>) @@ -631,58 +670,56 @@ <hr /> <a NAME="FileReport" ID="FileReport"></a> <h2>FileReport</h2> - <p> Collect the results of the checks and print the filenames. </p> + <h3>Derived from</h3> BaseReport <h3>Class Attributes</h3> - <table> <tr><td>print_filename</td></tr> </table> + <h3>Class Methods</h3> - <table> <tr><td>None</td></tr> </table> + <h3>Methods</h3> - <table> <tr><td>None</td></tr> </table> + <h3>Static Methods</h3> - <table> <tr><td>None</td></tr> </table> + <div align="right"><a href="#top">Up</a></div> <hr /> <hr /> <a NAME="StandardReport" ID="StandardReport"></a> <h2>StandardReport</h2> - <p> Collect and print the results of the checks. </p> + <h3>Derived from</h3> BaseReport <h3>Class Attributes</h3> - <table> <tr><td>None</td></tr> </table> + <h3>Class Methods</h3> - <table> <tr><td>None</td></tr> </table> + <h3>Methods</h3> - <table> - <tr> <td><a href="#StandardReport.__init__">StandardReport</a></td> <td></td> @@ -704,12 +741,13 @@ <td>Signal a new file.</td> </tr> </table> + <h3>Static Methods</h3> - <table> <tr><td>None</td></tr> </table> + <a NAME="StandardReport.__init__" ID="StandardReport.__init__"></a> <h4>StandardReport (Constructor)</h4> <b>StandardReport</b>(<i>options</i>) @@ -717,56 +755,54 @@ <a NAME="StandardReport.error" ID="StandardReport.error"></a> <h4>StandardReport.error</h4> <b>error</b>(<i>line_number, offset, text, check</i>) - <p> Report an error, according to options. </p> + <a NAME="StandardReport.error_args" ID="StandardReport.error_args"></a> <h4>StandardReport.error_args</h4> <b>error_args</b>(<i>line_number, offset, code, check, *args</i>) - <p> Report an error, according to options. </p> + <a NAME="StandardReport.get_file_results" ID="StandardReport.get_file_results"></a> <h4>StandardReport.get_file_results</h4> <b>get_file_results</b>(<i></i>) - <p> Print results and return the overall count for this file. </p> + <a NAME="StandardReport.init_file" ID="StandardReport.init_file"></a> <h4>StandardReport.init_file</h4> <b>init_file</b>(<i>filename, lines, expected, line_offset</i>) - <p> Signal a new file. </p> + <div align="right"><a href="#top">Up</a></div> <hr /> <hr /> <a NAME="StyleGuide" ID="StyleGuide"></a> <h2>StyleGuide</h2> - <p> Initialize a PEP-8 instance with few options. </p> + <h3>Derived from</h3> None <h3>Class Attributes</h3> - <table> <tr><td>None</td></tr> </table> + <h3>Class Methods</h3> - <table> <tr><td>None</td></tr> </table> + <h3>Methods</h3> - <table> - <tr> <td><a href="#StyleGuide.__init__">StyleGuide</a></td> <td></td> @@ -800,12 +836,13 @@ <td>Run all checks on a Python source file.</td> </tr> </table> + <h3>Static Methods</h3> - <table> <tr><td>None</td></tr> </table> + <a NAME="StyleGuide.__init__" ID="StyleGuide.__init__"></a> <h4>StyleGuide (Constructor)</h4> <b>StyleGuide</b>(<i>*args, **kwargs</i>) @@ -813,24 +850,23 @@ <a NAME="StyleGuide.check_files" ID="StyleGuide.check_files"></a> <h4>StyleGuide.check_files</h4> <b>check_files</b>(<i>paths=None</i>) - <p> Run all checks on the paths. </p> + <a NAME="StyleGuide.excluded" ID="StyleGuide.excluded"></a> <h4>StyleGuide.excluded</h4> <b>excluded</b>(<i>filename, parent=None</i>) - <p> Check if the file should be excluded. </p> <p> Check if 'options.exclude' contains a pattern matching filename. </p> + <a NAME="StyleGuide.get_checks" ID="StyleGuide.get_checks"></a> <h4>StyleGuide.get_checks</h4> <b>get_checks</b>(<i>argument_name</i>) - <p> Get all the checks for this category. </p> @@ -838,10 +874,10 @@ Find all globally visible functions where the first argument name starts with argument_name and which contain selected tests. </p> + <a NAME="StyleGuide.ignore_code" ID="StyleGuide.ignore_code"></a> <h4>StyleGuide.ignore_code</h4> <b>ignore_code</b>(<i>code</i>) - <p> Check if the error code should be ignored. </p> @@ -850,27 +886,28 @@ return False. Else, if 'options.ignore' contains a prefix of the error code, return True. </p> + <a NAME="StyleGuide.init_report" ID="StyleGuide.init_report"></a> <h4>StyleGuide.init_report</h4> <b>init_report</b>(<i>reporter=None</i>) - <p> Initialize the report instance. </p> + <a NAME="StyleGuide.input_dir" ID="StyleGuide.input_dir"></a> <h4>StyleGuide.input_dir</h4> <b>input_dir</b>(<i>dirname</i>) - <p> Check all files in this directory and all subdirectories. </p> + <a NAME="StyleGuide.input_file" ID="StyleGuide.input_file"></a> <h4>StyleGuide.input_file</h4> <b>input_file</b>(<i>filename, lines=None, expected=None, line_offset=0</i>) - <p> Run all checks on a Python source file. </p> + <div align="right"><a href="#top">Up</a></div> <hr /> <hr /> @@ -884,7 +921,6 @@ <a NAME="_break_around_binary_operators" ID="_break_around_binary_operators"></a> <h2>_break_around_binary_operators</h2> <b>_break_around_binary_operators</b>(<i>tokens</i>) - <p> Private function to reduce duplication. </p> @@ -893,6 +929,7 @@ :func:`break_before_binary_operator` and :func:`break_after_binary_operator`. </p> + <div align="right"><a href="#top">Up</a></div> <hr /> <hr /> @@ -927,17 +964,16 @@ <a NAME="_main" ID="_main"></a> <h2>_main</h2> <b>_main</b>(<i></i>) - <p> Parse options and run checks on Python source. </p> + <div align="right"><a href="#top">Up</a></div> <hr /> <hr /> <a NAME="_parse_multi_options" ID="_parse_multi_options"></a> <h2>_parse_multi_options</h2> <b>_parse_multi_options</b>(<i>options, split_token=', '</i>) - <p> Split and strip and discard empties. </p> @@ -951,13 +987,13 @@ <p> into ["A", "B"] </p> + <div align="right"><a href="#top">Up</a></div> <hr /> <hr /> <a NAME="ambiguous_identifier" ID="ambiguous_identifier"></a> <h2>ambiguous_identifier</h2> <b>ambiguous_identifier</b>(<i>logical_line, tokens</i>) - <p> Never use the characters 'l', 'O', or 'I' as variable names. </p> @@ -1005,13 +1041,13 @@ E742: class I(object): E743: def l(x): </p> + <div align="right"><a href="#top">Up</a></div> <hr /> <hr /> <a NAME="bare_except" ID="bare_except"></a> <h2>bare_except</h2> <b>bare_except</b>(<i>logical_line, noqa</i>) - <p> When catching exceptions, mention specific exceptions when possible. @@ -1021,13 +1057,13 @@ Okay: except BaseException: E722: except: </p> + <div align="right"><a href="#top">Up</a></div> <hr /> <hr /> <a NAME="blank_lines" ID="blank_lines"></a> <h2>blank_lines</h2> <b>blank_lines</b>(<i>logical_line, blank_lines, indent_level, line_number, blank_before, previous_logical, previous_unindented_logical_line, previous_indent_level, lines</i>) - <p> Separate top-level function and class definitions with two blank lines. @@ -1064,13 +1100,13 @@ E307: def a():\n def b():\n pass\n\n\n def c():\n pass E308: def a():\n\n\n\n pass </p> + <div align="right"><a href="#top">Up</a></div> <hr /> <hr /> <a NAME="break_after_binary_operator" ID="break_after_binary_operator"></a> <h2>break_after_binary_operator</h2> <b>break_after_binary_operator</b>(<i>logical_line, tokens</i>) - <p> Avoid breaks after binary operators. </p> @@ -1096,13 +1132,13 @@ Okay: var = (1 /\n -2) Okay: var = (1 +\n -1 +\n -2) </p> + <div align="right"><a href="#top">Up</a></div> <hr /> <hr /> <a NAME="break_before_binary_operator" ID="break_before_binary_operator"></a> <h2>break_before_binary_operator</h2> <b>break_before_binary_operator</b>(<i>logical_line, tokens</i>) - <p> Avoid breaks before binary operators. </p> @@ -1124,13 +1160,13 @@ Okay: foo(x,\n -y) Okay: foo(x, # comment\n -y) </p> + <div align="right"><a href="#top">Up</a></div> <hr /> <hr /> <a NAME="comparison_negative" ID="comparison_negative"></a> <h2>comparison_negative</h2> <b>comparison_negative</b>(<i>logical_line</i>) - <p> Negative comparison should be done using "not in" and "is not". </p> @@ -1144,13 +1180,13 @@ E714: if not X is Y:\n pass E714: Z = not X.B is Y </p> + <div align="right"><a href="#top">Up</a></div> <hr /> <hr /> <a NAME="comparison_to_singleton" ID="comparison_to_singleton"></a> <h2>comparison_to_singleton</h2> <b>comparison_to_singleton</b>(<i>logical_line, noqa</i>) - <p> Comparison to singletons should use "is" or "is not". </p> @@ -1171,13 +1207,13 @@ None was set to some other value. The other value might have a type (such as a container) that could be false in a boolean context! </p> + <div align="right"><a href="#top">Up</a></div> <hr /> <hr /> <a NAME="comparison_type" ID="comparison_type"></a> <h2>comparison_type</h2> <b>comparison_type</b>(<i>logical_line, noqa</i>) - <p> Object type comparisons should always use isinstance(). </p> @@ -1189,13 +1225,13 @@ Okay: if type(obj) is int: E721: if type(obj) == type(1): </p> + <div align="right"><a href="#top">Up</a></div> <hr /> <hr /> <a NAME="compound_statements" ID="compound_statements"></a> <h2>compound_statements</h2> <b>compound_statements</b>(<i>logical_line</i>) - <p> Compound statements (on the same line) are generally discouraged. @@ -1229,13 +1265,13 @@ E704: def f(x): return 2*x E731: f = lambda x: 2*x </p> + <div align="right"><a href="#top">Up</a></div> <hr /> <hr /> <a NAME="continued_indentation" ID="continued_indentation"></a> <h2>continued_indentation</h2> <b>continued_indentation</b>(<i>logical_line, tokens, indent_level, hang_closing, indent_char, indent_size, noqa, verbose</i>) - <p> Continuation lines indentation. </p> @@ -1267,26 +1303,26 @@ E129: if (a or\n b):\n pass E131: a = (\n 42\n 24) </p> + <div align="right"><a href="#top">Up</a></div> <hr /> <hr /> <a NAME="expand_indent" ID="expand_indent"></a> <h2>expand_indent</h2> <b>expand_indent</b>(<i>line</i>) - <p> Return the amount of indentation. </p> <p> Tabs are expanded to the next multiple of 8. </p> + <div align="right"><a href="#top">Up</a></div> <hr /> <hr /> <a NAME="explicit_line_join" ID="explicit_line_join"></a> <h2>explicit_line_join</h2> <b>explicit_line_join</b>(<i>logical_line, tokens</i>) - <p> Avoid explicit line join between brackets. </p> @@ -1307,13 +1343,13 @@ Okay: aaa = "bbb " \\n "ccc" Okay: aaa = 123 # \\ </p> + <div align="right"><a href="#top">Up</a></div> <hr /> <hr /> <a NAME="extraneous_whitespace" ID="extraneous_whitespace"></a> <h2>extraneous_whitespace</h2> <b>extraneous_whitespace</b>(<i>logical_line</i>) - <p> Avoid extraneous whitespace. </p> @@ -1336,36 +1372,36 @@ E203: if x == 4: print x, y ; x, y = y, x E203: if x == 4 : print x, y; x, y = y, x </p> + <div align="right"><a href="#top">Up</a></div> <hr /> <hr /> <a NAME="filename_match" ID="filename_match"></a> <h2>filename_match</h2> <b>filename_match</b>(<i>filename, patterns, default=True</i>) - <p> Check if patterns contains a pattern that matches filename. </p> <p> If patterns is unspecified, this always returns True. </p> + <div align="right"><a href="#top">Up</a></div> <hr /> <hr /> <a NAME="get_parser" ID="get_parser"></a> <h2>get_parser</h2> <b>get_parser</b>(<i>prog='pycodestyle', version=__version__</i>) - <p> Create the parser for the program. </p> + <div align="right"><a href="#top">Up</a></div> <hr /> <hr /> <a NAME="imports_on_separate_lines" ID="imports_on_separate_lines"></a> <h2>imports_on_separate_lines</h2> <b>imports_on_separate_lines</b>(<i>logical_line</i>) - <p> Place imports on separate lines. </p> @@ -1380,13 +1416,13 @@ Okay: import myclass Okay: import foo.bar.yourclass </p> + <div align="right"><a href="#top">Up</a></div> <hr /> <hr /> <a NAME="indentation" ID="indentation"></a> <h2>indentation</h2> <b>indentation</b>(<i>logical_line, previous_logical, indent_char, indent_level, previous_indent_level, indent_size</i>) - <p> Use indent_size (PEP8 says 4) spaces per indentation level. </p> @@ -1410,6 +1446,7 @@ E113: a = 1\n b = 2 E116: a = 1\n # b = 2 </p> + <div align="right"><a href="#top">Up</a></div> <hr /> <hr /> @@ -1423,7 +1460,6 @@ <a NAME="maximum_doc_length" ID="maximum_doc_length"></a> <h2>maximum_doc_length</h2> <b>maximum_doc_length</b>(<i>logical_line, max_doc_length, noqa, tokens</i>) - <p> Limit all doc lines to a maximum of 72 characters. </p> @@ -1434,13 +1470,13 @@ <p> Reports warning W505 </p> + <div align="right"><a href="#top">Up</a></div> <hr /> <hr /> <a NAME="maximum_line_length" ID="maximum_line_length"></a> <h2>maximum_line_length</h2> <b>maximum_line_length</b>(<i>physical_line, max_line_length, multiline, line_number, noqa</i>) - <p> Limit all lines to a maximum of 79 characters. </p> @@ -1455,13 +1491,13 @@ <p> Reports error E501. </p> + <div align="right"><a href="#top">Up</a></div> <hr /> <hr /> <a NAME="missing_whitespace" ID="missing_whitespace"></a> <h2>missing_whitespace</h2> <b>missing_whitespace</b>(<i>logical_line, tokens</i>) - <p> Surround operators with the correct amount of whitespace. </p> @@ -1508,13 +1544,13 @@ E231: foo(bar,baz) E231: [{'a':'b'}] </p> + <div align="right"><a href="#top">Up</a></div> <hr /> <hr /> <a NAME="missing_whitespace_after_keyword" ID="missing_whitespace_after_keyword"></a> <h2>missing_whitespace_after_keyword</h2> <b>missing_whitespace_after_keyword</b>(<i>logical_line, tokens</i>) - <p> Keywords should be followed by whitespace. </p> @@ -1524,13 +1560,13 @@ E275: from importable.module import(bar, baz) E275: if(foo): bar </p> + <div align="right"><a href="#top">Up</a></div> <hr /> <hr /> <a NAME="module_imports_on_top_of_file" ID="module_imports_on_top_of_file"></a> <h2>module_imports_on_top_of_file</h2> <b>module_imports_on_top_of_file</b>(<i>logical_line, indent_level, checker_state, noqa</i>) - <p> Place imports at the top of the file. </p> @@ -1550,46 +1586,46 @@ <p> Okay: if x:\n import os </p> + <div align="right"><a href="#top">Up</a></div> <hr /> <hr /> <a NAME="mute_string" ID="mute_string"></a> <h2>mute_string</h2> <b>mute_string</b>(<i>text</i>) - <p> Replace contents with 'xxx' to prevent syntax matching. </p> + <div align="right"><a href="#top">Up</a></div> <hr /> <hr /> <a NAME="normalize_paths" ID="normalize_paths"></a> <h2>normalize_paths</h2> <b>normalize_paths</b>(<i>value, parent=os.curdir</i>) - <p> Parse a comma-separated list of paths. </p> <p> Return a list of absolute paths. </p> + <div align="right"><a href="#top">Up</a></div> <hr /> <hr /> <a NAME="parse_udiff" ID="parse_udiff"></a> <h2>parse_udiff</h2> <b>parse_udiff</b>(<i>diff, patterns=None, parent='.'</i>) - <p> Return a dictionary of matching lines. </p> + <div align="right"><a href="#top">Up</a></div> <hr /> <hr /> <a NAME="process_options" ID="process_options"></a> <h2>process_options</h2> <b>process_options</b>(<i>arglist=None, parse_argv=False, config_file=None, parser=None, verbose=None</i>) - <p> Process options passed either via arglist or command line args. </p> @@ -1597,13 +1633,13 @@ Passing in the ``config_file`` parameter allows other tools, such as flake8 to specify their own options to be processed in pycodestyle. </p> + <div align="right"><a href="#top">Up</a></div> <hr /> <hr /> <a NAME="python_3000_invalid_escape_sequence" ID="python_3000_invalid_escape_sequence"></a> <h2>python_3000_invalid_escape_sequence</h2> <b>python_3000_invalid_escape_sequence</b>(<i>logical_line, tokens, noqa</i>) - <p> Invalid escape sequences are deprecated in Python 3.6. </p> @@ -1611,13 +1647,13 @@ Okay: regex = r'\.png$' W605: regex = '\.png$' </p> + <div align="right"><a href="#top">Up</a></div> <hr /> <hr /> <a NAME="read_config" ID="read_config"></a> <h2>read_config</h2> <b>read_config</b>(<i>options, args, arglist, parser</i>) - <p> Read and parse configurations. </p> @@ -1631,43 +1667,43 @@ merged together (in that order) using the read method of ConfigParser. </p> + <div align="right"><a href="#top">Up</a></div> <hr /> <hr /> <a NAME="readlines" ID="readlines"></a> <h2>readlines</h2> <b>readlines</b>(<i>filename</i>) - <p> Read the source code. </p> + <div align="right"><a href="#top">Up</a></div> <hr /> <hr /> <a NAME="register_check" ID="register_check"></a> <h2>register_check</h2> <b>register_check</b>(<i>check, codes=None</i>) - <p> Register a new check object. </p> + <div align="right"><a href="#top">Up</a></div> <hr /> <hr /> <a NAME="stdin_get_value" ID="stdin_get_value"></a> <h2>stdin_get_value</h2> <b>stdin_get_value</b>(<i></i>) - <p> Read the value from stdin. </p> + <div align="right"><a href="#top">Up</a></div> <hr /> <hr /> <a NAME="tabs_obsolete" ID="tabs_obsolete"></a> <h2>tabs_obsolete</h2> <b>tabs_obsolete</b>(<i>physical_line</i>) - <p> On new projects, spaces-only are strongly recommended over tabs. </p> @@ -1675,13 +1711,13 @@ Okay: if True:\n return W191: if True:\n\treturn </p> + <div align="right"><a href="#top">Up</a></div> <hr /> <hr /> <a NAME="tabs_or_spaces" ID="tabs_or_spaces"></a> <h2>tabs_or_spaces</h2> <b>tabs_or_spaces</b>(<i>physical_line, indent_char</i>) - <p> Never mix tabs and spaces. </p> @@ -1697,13 +1733,13 @@ <p> Okay: if a == 0:\n a = 1\n b = 1 </p> + <div align="right"><a href="#top">Up</a></div> <hr /> <hr /> <a NAME="trailing_blank_lines" ID="trailing_blank_lines"></a> <h2>trailing_blank_lines</h2> <b>trailing_blank_lines</b>(<i>physical_line, lines, line_number, total_lines</i>) - <p> Trailing blank lines are superfluous. </p> @@ -1714,13 +1750,13 @@ <p> However the last line should end with a new line (warning W292). </p> + <div align="right"><a href="#top">Up</a></div> <hr /> <hr /> <a NAME="trailing_whitespace" ID="trailing_whitespace"></a> <h2>trailing_whitespace</h2> <b>trailing_whitespace</b>(<i>physical_line</i>) - <p> Trailing whitespace is superfluous. </p> @@ -1733,24 +1769,24 @@ W291: spam(1) \n# W293: class Foo(object):\n \n bang = 12 </p> + <div align="right"><a href="#top">Up</a></div> <hr /> <hr /> <a NAME="update_counts" ID="update_counts"></a> <h2>update_counts</h2> <b>update_counts</b>(<i>s, counts</i>) - <p> Adds one to the counts of each appearance of characters in s, for characters in counts </p> + <div align="right"><a href="#top">Up</a></div> <hr /> <hr /> <a NAME="whitespace_around_comma" ID="whitespace_around_comma"></a> <h2>whitespace_around_comma</h2> <b>whitespace_around_comma</b>(<i>logical_line</i>) - <p> Avoid extraneous whitespace after a comma or a colon. </p> @@ -1762,13 +1798,13 @@ E241: a = (1, 2) E242: a = (1,\t2) </p> + <div align="right"><a href="#top">Up</a></div> <hr /> <hr /> <a NAME="whitespace_around_keywords" ID="whitespace_around_keywords"></a> <h2>whitespace_around_keywords</h2> <b>whitespace_around_keywords</b>(<i>logical_line</i>) - <p> Avoid extraneous whitespace around keywords. </p> @@ -1779,13 +1815,13 @@ E273: True and\tFalse E274: True\tand False </p> + <div align="right"><a href="#top">Up</a></div> <hr /> <hr /> <a NAME="whitespace_around_named_parameter_equals" ID="whitespace_around_named_parameter_equals"></a> <h2>whitespace_around_named_parameter_equals</h2> <b>whitespace_around_named_parameter_equals</b>(<i>logical_line, tokens</i>) - <p> Don't use spaces around the '=' sign in function arguments. </p> @@ -1809,13 +1845,13 @@ E251: return magic(r = real, i = imag) E252: def complex(real, image: float=0.0): </p> + <div align="right"><a href="#top">Up</a></div> <hr /> <hr /> <a NAME="whitespace_around_operator" ID="whitespace_around_operator"></a> <h2>whitespace_around_operator</h2> <b>whitespace_around_operator</b>(<i>logical_line</i>) - <p> Avoid extraneous whitespace around an operator. </p> @@ -1826,13 +1862,13 @@ E223: a = 4\t+ 5 E224: a = 4 +\t5 </p> + <div align="right"><a href="#top">Up</a></div> <hr /> <hr /> <a NAME="whitespace_before_comment" ID="whitespace_before_comment"></a> <h2>whitespace_before_comment</h2> <b>whitespace_before_comment</b>(<i>logical_line, tokens</i>) - <p> Separate inline comments by at least two spaces. </p> @@ -1858,13 +1894,13 @@ E265: #Block comment E266: ### Block comment </p> + <div align="right"><a href="#top">Up</a></div> <hr /> <hr /> <a NAME="whitespace_before_parameters" ID="whitespace_before_parameters"></a> <h2>whitespace_before_parameters</h2> <b>whitespace_before_parameters</b>(<i>logical_line, tokens</i>) - <p> Avoid extraneous whitespace. </p> @@ -1883,6 +1919,7 @@ E211: dict ['key'] = list[index] E211: dict['key'] = list [index] </p> + <div align="right"><a href="#top">Up</a></div> <hr /> -</body></html> \ No newline at end of file +</body></html>