我希望将我的python文件中一行允许的最大字符数从80个扩展到120个(或者干脆忽略E501中的flake8 )。我有一个flake8配置文件~/.config8/flake8,它包含
[flake8]
ignore = E501
max-line-length = 120然而,无论是在vim内部还是在航站楼,这些线路似乎都没有被拾取。在这个建议之后,我还在~/.vimrc中添加了以下行
let g:syntastic_python_flake8_args='--ignore=E501'但是,E501仍然像以前一样显示( ~/.vimrc中的所有其他命令都被vim正确读取)。
我的flake8 --version返回终端中的4.0.1 (mccabe: 0.6.1, pycodestyle: 2.8.0, pyflakes: 2.4.0) CPython 3.7.10 on Linux和flake8 --version,返回以下行:
flake8.plugins.manager MainProcess 61 INFO Loading entry-points for "flake8.extension".
flake8.plugins.manager MainProcess 109 INFO Loading entry-points for "flake8.report".
flake8.plugins.manager MainProcess 140 INFO Loading plugin "C90" from entry-point.
flake8.plugins.manager MainProcess 141 INFO Loading plugin "F" from entry-point.
flake8.plugins.manager MainProcess 153 INFO Loading plugin "pycodestyle.ambiguous_identifier" from entry-point.
flake8.plugins.manager MainProcess 157 INFO Loading plugin "pycodestyle.bare_except" from entry-point.
flake8.plugins.manager MainProcess 157 INFO Loading plugin "pycodestyle.blank_lines" from entry-point.
flake8.plugins.manager MainProcess 157 INFO Loading plugin "pycodestyle.break_after_binary_operator" from entry-point.
flake8.plugins.manager MainProcess 157 INFO Loading plugin "pycodestyle.break_before_binary_operator" from entry-point.
flake8.plugins.manager MainProcess 157 INFO Loading plugin "pycodestyle.comparison_negative" from entry-point.
flake8.plugins.manager MainProcess 157 INFO Loading plugin "pycodestyle.comparison_to_singleton" from entry-point.
flake8.plugins.manager MainProcess 157 INFO Loading plugin "pycodestyle.comparison_type" from entry-point.
flake8.plugins.manager MainProcess 157 INFO Loading plugin "pycodestyle.compound_statements" from entry-point.
flake8.plugins.manager MainProcess 157 INFO Loading plugin "pycodestyle.continued_indentation" from entry-point.
flake8.plugins.manager MainProcess 157 INFO Loading plugin "pycodestyle.explicit_line_join" from entry-point.
flake8.plugins.manager MainProcess 157 INFO Loading plugin "pycodestyle.extraneous_whitespace" from entry-point.
flake8.plugins.manager MainProcess 157 INFO Loading plugin "pycodestyle.imports_on_separate_lines" from entry-point.
flake8.plugins.manager MainProcess 157 INFO Loading plugin "pycodestyle.indentation" from entry-point.
flake8.plugins.manager MainProcess 157 INFO Loading plugin "pycodestyle.maximum_doc_length" from entry-point.
flake8.plugins.manager MainProcess 157 INFO Loading plugin "pycodestyle.maximum_line_length" from entry-point.
flake8.plugins.manager MainProcess 157 INFO Loading plugin "pycodestyle.missing_whitespace" from entry-point.
flake8.plugins.manager MainProcess 157 INFO Loading plugin "pycodestyle.missing_whitespace_after_import_keyword" from entry-point.
flake8.plugins.manager MainProcess 157 INFO Loading plugin "pycodestyle.missing_whitespace_around_operator" from entry-point.
flake8.plugins.manager MainProcess 157 INFO Loading plugin "pycodestyle.module_imports_on_top_of_file" from entry-point.
flake8.plugins.manager MainProcess 157 INFO Loading plugin "pycodestyle.python_3000_async_await_keywords" from entry-point.
flake8.plugins.manager MainProcess 157 INFO Loading plugin "pycodestyle.python_3000_backticks" from entry-point.
flake8.plugins.manager MainProcess 157 INFO Loading plugin "pycodestyle.python_3000_has_key" from entry-point.
flake8.plugins.manager MainProcess 157 INFO Loading plugin "pycodestyle.python_3000_invalid_escape_sequence" from entry-point.
flake8.plugins.manager MainProcess 157 INFO Loading plugin "pycodestyle.python_3000_not_equal" from entry-point.
flake8.plugins.manager MainProcess 157 INFO Loading plugin "pycodestyle.python_3000_raise_comma" from entry-point.
flake8.plugins.manager MainProcess 157 INFO Loading plugin "pycodestyle.tabs_obsolete" from entry-point.
flake8.plugins.manager MainProcess 157 INFO Loading plugin "pycodestyle.tabs_or_spaces" from entry-point.
flake8.plugins.manager MainProcess 158 INFO Loading plugin "pycodestyle.trailing_blank_lines" from entry-point.
flake8.plugins.manager MainProcess 158 INFO Loading plugin "pycodestyle.trailing_whitespace" from entry-point.
flake8.plugins.manager MainProcess 158 INFO Loading plugin "pycodestyle.whitespace_around_comma" from entry-point.
flake8.plugins.manager MainProcess 158 INFO Loading plugin "pycodestyle.whitespace_around_keywords" from entry-point.
flake8.plugins.manager MainProcess 158 INFO Loading plugin "pycodestyle.whitespace_around_named_parameter_equals" from entry-point.
flake8.plugins.manager MainProcess 158 INFO Loading plugin "pycodestyle.whitespace_around_operator" from entry-point.
flake8.plugins.manager MainProcess 158 INFO Loading plugin "pycodestyle.whitespace_before_comment" from entry-point.
flake8.plugins.manager MainProcess 158 INFO Loading plugin "pycodestyle.whitespace_before_parameters" from entry-point.
flake8.plugins.manager MainProcess 158 INFO Loading plugin "default" from entry-point.
flake8.plugins.manager MainProcess 158 INFO Loading plugin "pylint" from entry-point.
flake8.plugins.manager MainProcess 158 INFO Loading plugin "quiet-filename" from entry-point.
flake8.plugins.manager MainProcess 158 INFO Loading plugin "quiet-nothing" from entry-point.
flake8.options.manager MainProcess 158 WARNING option --max-complexity: please update from optparse string `type=` to argparse callable `type=` -- this will be an error in the future
flake8.checker MainProcess 165 INFO Making checkers
flake8.checker MainProcess 167 INFO Checking 1 files
flake8.main.application MainProcess 226 INFO Finished running
flake8.main.application MainProcess 226 INFO Reporting errors发布于 2021-10-19 13:16:46
由于用户经常混淆,用户级别的Flake8配置文件不再受支持.不会在用户的主目录(例如,~/.flake8)或XDG配置目录(例如,~/. config /flake8)中搜索文件
如果需要显式恢复以前的行为,当然可以使用--config ~/.config/flake8
免责声明:我是flake8目前的主要维护者
https://stackoverflow.com/questions/69626047
复制相似问题