You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by ta...@apache.org on 2018/08/01 23:44:42 UTC
impala git commit: IMPALA-7317: loosen flake8 rules
Repository: impala
Updated Branches:
refs/heads/master 55083f38c -> 87b02e733
IMPALA-7317: loosen flake8 rules
I got feedback that the flake8 rules are a little too strict, so based
on the dev@impala.apache.org discussion am disabling some of them.
I left E302 "expected 2 blank lines, found 1" enabled since I think it
would force our formatting to be more consistent, but I'm open to
changing that.
I used the following command to get a sense of the number of existing
violations:
EXCLUDES=ext-py,shell/build,gerrit_critic_venv,infra/python/env
EXCLUDES+=,shell/pkg_resources.py,shell/thrift_sasl.py,gen-py
EXCLUDES+=,TPC-DS-master,toolchain
./bin/impala-flake8 --exclude=${EXCLUDES}
Change-Id: Iaaa8377025e732231ac0f1f1f2db67298a171997
Reviewed-on: http://gerrit.cloudera.org:8080/11102
Reviewed-by: Tim Armstrong <ta...@cloudera.com>
Tested-by: Tim Armstrong <ta...@cloudera.com>
Project: http://git-wip-us.apache.org/repos/asf/impala/repo
Commit: http://git-wip-us.apache.org/repos/asf/impala/commit/87b02e73
Tree: http://git-wip-us.apache.org/repos/asf/impala/tree/87b02e73
Diff: http://git-wip-us.apache.org/repos/asf/impala/diff/87b02e73
Branch: refs/heads/master
Commit: 87b02e7332fd4d74ec09aa7270f242afb92ed36c
Parents: 55083f3
Author: Tim Armstrong <ta...@cloudera.com>
Authored: Tue Jul 31 00:10:36 2018 -0700
Committer: Tim Armstrong <ta...@cloudera.com>
Committed: Wed Aug 1 23:44:26 2018 +0000
----------------------------------------------------------------------
bin/jenkins/critique-gerrit-review.py | 3 ++-
setup.cfg | 7 +++++--
2 files changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/impala/blob/87b02e73/bin/jenkins/critique-gerrit-review.py
----------------------------------------------------------------------
diff --git a/bin/jenkins/critique-gerrit-review.py b/bin/jenkins/critique-gerrit-review.py
index 409fef4..e3873ab 100755
--- a/bin/jenkins/critique-gerrit-review.py
+++ b/bin/jenkins/critique-gerrit-review.py
@@ -65,7 +65,8 @@ SOURCE_EXTENSIONS = set([".cc", ".h", ".java", ".py", ".sh", ".thrift"])
EXCLUDE_FILE_PATTERNS = [
re.compile(r".*be/src/kudu.*"), # Kudu source code may have different rules.
re.compile(r".*-benchmark.cc"), # Benchmark files tend to have long lines.
- re.compile(r".*/function-registry/impala_functions.py") # Many long strings.
+ re.compile(r".*/function-registry/impala_functions.py"), # Many long strings.
+ re.compile(r".*/shell/ext-py/*") # Third-party code.
]
http://git-wip-us.apache.org/repos/asf/impala/blob/87b02e73/setup.cfg
----------------------------------------------------------------------
diff --git a/setup.cfg b/setup.cfg
index a3178ba..4352c6d 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -15,8 +15,11 @@
# specific language governing permissions and limitations
# under the License.
[flake8]
-# These are ignored in order to support 2-space indents.
+# 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.
+# 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
+ignore = E111,E114,E121,E125,E127,E128,E701
# Change from default to conform to Apache Impala line length.
max-line-length = 90