weixin_39636057 2020-11-29 13:25
浏览 0

Properly ignore flake8 F811 redefinition errors

I realized that we were actually already ignoring redefinition errors, but we were doing it incorrectly. I think flake8's API must have changed recently because this previously worked on my laptop until I updated flake8. Before, things like # noqa: ignore=501 worked, but then the syntax changed to # noqa: E501. fixed this in #3651, but didn't realize that 811 was actually F811, not E811. This PR fixes that.

Features

  • Properly ignore flake8 F811 redefinition errors
  • Fix bug causing trailing whitespace characters to be ignored
  • They should now properly raise "W291: trailing whitespace"
  • Don't use git features unavailable in older versions
  • Fixes #3199
  • Previously, spack flake8 didn't work with git 1.7.1, the default on CentOS 6
  • Ignore more directives
  • list_url
  • provides()
  • conflicts()
  • resource()
  • Add unit tests

该提问来源于开源项目:spack/spack

  • 写回答

5条回答 默认 最新

  • weixin_39636057 2020-11-29 13:25
    关注

    While I'm here I might as well fix #3199. Shouldn't be difficult to get spack flake8 working with older versions of git.

    评论

报告相同问题?