flake8 updates and cleanups (#3940)

* flake8 updates and cleanups

* Update to flake8 3.7.9.
* Update to flake8-bugbear 20.1.4.
* Only ignore errors in stub files.
* Remove obsolete error counts.
* Sort error codes alphabetically.
* Don't ignore the following errors (unneeded):
    * E704 Multiple statements on one line (def)
    * W504 Line break occurred after a binary operator
    * B303 __metaclass__ used

* Remove obsolete comment

* Ignore F822 undefined name in __all__
This commit is contained in:
Sebastian Rittau
2020-04-24 04:38:47 +02:00
committed by GitHub
parent aa84ff750e
commit 92f52a2615
3 changed files with 18 additions and 16 deletions

View File

@@ -31,6 +31,7 @@ consistent_files = [
{'stdlib/2and3/threading.pyi', 'stdlib/2and3/_dummy_threading.pyi'}
]
def main():
files = [os.path.join(root, file) for root, dir, files in os.walk('.') for file in files]
no_symlink = 'You cannot use symlinks in typeshed, please copy {} to its link.'
@@ -45,5 +46,6 @@ def main():
if not filecmp.cmp(f1, f2):
raise ValueError('File {f1} does not match file {f2}. Please copy it to {f2}'.format(f1=file1, f2=file2))
if __name__ == '__main__':
main()