Michael Smith created IMPALA-11398: -------------------------------------- Summary: Upgrade flake8 for indent-size support Key: IMPALA-11398 URL: https://issues.apache.org/jira/browse/IMPALA-11398 Project: IMPALA Issue Type: Improvement Reporter: Michael Smith
Impala's Python style guide recommends using 2-space indents. Traditional Python style is 4-space indents, which our current flake8 version expects and some rules trigger off. For example {code} if (file_name.endswith('-{0}.tar.gz'.format(pkg_version)) or file_name.endswith('-{0}.tar.bz2'.format(pkg_version)) or file_name.endswith('-{0}.zip'.format(pkg_version))): candidates.append((file_name, path, hash_algorithm, digest)) {code} triggered https://www.flake8rules.com/rules/E129.html because it expects the conditional body to have 4-space indents. Several other rules (E111,E114,E121,E125,E127,E128) are excluded because they depend on 2-space indents. flake8 3.x adds support for specifying indent-size while still supporting Python 2.6. Let's upgrade to the latest flake8 3.x version. -- This message was sent by Atlassian Jira (v8.20.7#820007) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-all-unsubscr...@impala.apache.org For additional commands, e-mail: issues-all-h...@impala.apache.org