You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues-all@impala.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2022/07/02 03:27:00 UTC

[jira] [Commented] (IMPALA-11398) Upgrade flake8 for indent-size support

    [ https://issues.apache.org/jira/browse/IMPALA-11398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17561667#comment-17561667 ] 

ASF subversion and git services commented on IMPALA-11398:
----------------------------------------------------------

Commit fefb9f24be1f99ac0077a8d6ef00834d8e90ef45 in impala's branch refs/heads/master from Michael Smith
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=fefb9f24b ]

IMPALA-11398: Update flake8 in Gerrit review (part 2)

Updates the flake8 version used in critique-gerrit-review.py to 3.9.2 so
it recognizes the indent-size property.

Change-Id: Iae62749117ce1bf3d895b4ee4d024ffa8126ce04
Reviewed-on: http://gerrit.cloudera.org:8080/18685
Reviewed-by: Impala Public Jenkins <im...@cloudera.com>
Tested-by: Impala Public Jenkins <im...@cloudera.com>


> 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
>            Assignee: Michael Smith
>            Priority: Minor
>             Fix For: Impala 4.2.0
>
>
> 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.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org