IMPALA-11398: Update flake8 for indent-size=2

Updates flake8 to the latest Python 2-compatible version so we can use
indent-size=2. Our code uses 2-space indents and we have previously
worked around or disabled flake8 checks that rely on 4-space indenting.

Change-Id: Ia701f6e3d86be451ae86d041b799c8a10aee2d93
Reviewed-on: http://gerrit.cloudera.org:8080/18669
Reviewed-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
This commit is contained in:
Michael Smith
2022-06-24 10:41:31 -07:00
committed by Impala Public Jenkins
parent bb610dee09
commit 8b1002aa6a
2 changed files with 19 additions and 11 deletions

View File

@@ -25,10 +25,18 @@ argparse == 1.4.0
cm-api == 10.0.0
# Already available as part of python on Linux.
readline == 6.2.4.1; sys_platform == 'darwin'
flake8 == 2.6.2
mccabe == 0.3.1
pycodestyle == 2.0.0
pyflakes == 1.2.3
flake8 == 3.9.2
mccabe == 0.6.1
pycodestyle == 2.7.0
pyflakes == 2.3.1
enum34 == 1.1.10
typing == 3.10.0.0
configparser == 4.0.2
functools32 == 3.2.3-2
importlib-metadata == 2.1.3
contextlib2 == 0.6.0
pathlib2 == 2.3.7.post1
zipp == 1.2.0
gcovr == 3.4
hdfs == 2.0.2
docopt == 0.6.2
@@ -57,10 +65,10 @@ python-magic == 0.4.11
pywebhdfs == 0.3.2
pbr == 3.1.1
requests == 2.20.0
chardet == 3.0.4
idna == 2.8
urllib3 == 1.24.2
certifi == 2020.12.5
chardet == 3.0.4
idna == 2.8
urllib3 == 1.24.2
certifi == 2020.12.5
sasl == 0.2.1
sh == 1.11
six == 1.14.0
@@ -72,4 +80,3 @@ avro==1.10.2
# Required for Kudu:
Cython == 0.29.14
pytz == 2020.1

View File

@@ -15,13 +15,14 @@
# specific language governing permissions and limitations
# under the License.
[flake8]
# E111,E114: These are ignored in order to support 2-space indents.
# E121,E125,E127,E128: ignored to allow some of the more common idioms for multi-line
# statement indentation used in the Impala code.
# W503: ignored to allow line breaks before binary operators, as is becoming standard:
# https://github.com/python/peps/commit/7690a00d478866
# E701: ignored to allow if statement body on same line as conditional
# https://pycodestyle.readthedocs.io/en/latest/intro.html#error-codes
ignore = E111,E114,E121,E125,E127,E128,W503,E701
ignore = E121,E125,E127,E128,W503,E701
# Change from default to conform to Apache Impala line length.
max-line-length = 90
# Impala style guide uses 2-space indents.
indent-size = 2