Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Consider linting the contrib directory #7910

Closed
anoadragon453 opened this issue Jul 20, 2020 · 0 comments · Fixed by #7914
Closed

Consider linting the contrib directory #7910

anoadragon453 opened this issue Jul 20, 2020 · 0 comments · Fixed by #7914

Comments

@anoadragon453
Copy link
Member

There's currently a few issues that could be solved by running flake8 and other tools on it:

❯ ./scripts-dev/lint.sh contrib                                                                                            4s 🐍 synapse 11:48:47
Linting these locations: contrib
WARNING: Unable to parse file contrib due to [Errno 21] Is a directory: '/home/user/code/synapse/contrib'
All done! ✨ 🍰 ✨
9 files left unchanged.
contrib/cmdclient/console.py:496:12: E713 test for membership should be 'not in'
contrib/cmdclient/console.py:511:17: E722 do not use bare 'except'
contrib/cmdclient/console.py:588:13: E722 do not use bare 'except'
contrib/cmdclient/console.py:775:13: E722 do not use bare 'except'
contrib/cmdclient/console.py:778:5: E722 do not use bare 'except'
contrib/jitsimeetbridge/jitsimeetbridge.py:19:1: F401 'urllib' imported but unused
contrib/jitsimeetbridge/jitsimeetbridge.py:298:33: F821 undefined name 'ACCESS_TOKEN'
contrib/graph/graph3.py:109:13: E722 do not use bare 'except'
contrib/graph/graph.py:18:1: F401 'sqlite3' imported but unused
contrib/graph/graph.py:52:9: E722 do not use bare 'except'
contrib/graph/graph2.py:101:13: E722 do not use bare 'except'
contrib/experiments/test_messaging.py:78:34: W605 invalid escape sequence '\S'
contrib/experiments/test_messaging.py:87:36: W605 invalid escape sequence '\S'
contrib/experiments/test_messaging.py:87:42: W605 invalid escape sequence '\S'
contrib/experiments/test_messaging.py:96:34: W605 invalid escape sequence '\S'
contrib/experiments/test_messaging.py:105:38: W605 invalid escape sequence '\S'
contrib/experiments/test_messaging.py:205:5: E265 block comment should start with '# '
contrib/experiments/test_messaging.py:206:5: E265 block comment should start with '# '
contrib/experiments/test_messaging.py:207:5: E265 block comment should start with '# '
contrib/experiments/test_messaging.py:337:5: E266 too many leading '#' for block comment
contrib/experiments/test_messaging.py:357:5: E266 too many leading '#' for block comment
contrib/experiments/test_messaging.py:371:5: E266 too many leading '#' for block comment
contrib/experiments/test_messaging.py:376:5: E266 too many leading '#' for block comment
contrib/experiments/test_messaging.py:380:5: E722 do not use bare 'except'
anoadragon453 added a commit that referenced this issue Jul 20, 2020
…linting script (#7914)

Run `isort`, `flake8` and `black` over the `contrib/` directory and `synctl` script. The latter was already being done in CI, but now the linting script does it too.

Fixes #7910
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
1 participant