Ruslan Fomkin created CASSANDRA-16849: -----------------------------------------
Summary: Following documentation for setting flake8 hook in dtests breaks environment Key: CASSANDRA-16849 URL: https://issues.apache.org/jira/browse/CASSANDRA-16849 Project: Cassandra Issue Type: Improvement Components: Test/dtest/python Reporter: Ruslan Fomkin The [contributing page of cassandra-test|https://github.com/apache/cassandra-dtest/blob/trunk/CONTRIBUTING.md] contains instructions to setup git hook to run flake8 on commit: {code:java} flake8 --install-hook git config flake8.strict true git config flake8.ignore E501,F811,F812,F821,F822,F823,F831,F841,N8,C9 {code} I insulted flake8 and followed the instruction and after I committed changes to {{conftest.py}}, I've got many E501 errors: {code:java} conftest.py:21:80: E501 line too long (85 > 79 characters) conftest.py:31:80: E501 line too long (98 > 79 characters) conftest.py:32:80: E501 line too long (96 > 79 characters) conftest.py:33:80: E501 line too long (96 > 79 characters) conftest.py:34:80: E501 line too long (96 > 79 characters) conftest.py:35:80: E501 line too long (90 > 79 characters) conftest.py:39:80: E501 line too long (85 > 79 characters) ...{code} This means that the ignore configuration is not used, and I don't see if there is any workaround except removing the commit hook manually. According to flake8 documentation the instructions are applicable to an old version of flake8, e.g, [2.6.0|https://flake8.pycqa.org/en/2.6.0/vcs.html]. This page doesn't exist in the latest version of flake8. The latest documentation has [instructions|https://flake8.pycqa.org/en/3.9.2/user/using-hooks.html?highlight=hooks] to use [pre-commit package|https://pre-commit.com/]. It will be great to fix the documentation and be specific about flake8 version or update instructions according the current version or both. -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org