You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by we...@apache.org on 2019/02/12 02:05:45 UTC

[arrow] branch master updated: ARROW-4499: [CI] Unpin flake8 in lint script, fix warnings in dev/

This is an automated email from the ASF dual-hosted git repository.

wesm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/master by this push:
     new 9db7a61  ARROW-4499: [CI] Unpin flake8 in lint script, fix warnings in dev/
9db7a61 is described below

commit 9db7a6144976cc618b085acbb633d9634a58e46e
Author: Wes McKinney <we...@apache.org>
AuthorDate: Mon Feb 11 20:05:37 2019 -0600

    ARROW-4499: [CI] Unpin flake8 in lint script, fix warnings in dev/
    
    Keeping things clean.
    
    Author: Wes McKinney <we...@apache.org>
    
    Closes #3616 from wesm/ARROW-4499 and squashes the following commits:
    
    9da9facc <Wes McKinney> Unpin flake8 in lint script, fix warnings in dev/
---
 ci/travis_env_common.sh  | 1 +
 ci/travis_lint.sh        | 4 ++--
 dev/merge_arrow_pr.py    | 8 +++++---
 dev/release/changelog.py | 6 +++---
 4 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/ci/travis_env_common.sh b/ci/travis_env_common.sh
index 0af1dc3..8da83bb 100755
--- a/ci/travis_env_common.sh
+++ b/ci/travis_env_common.sh
@@ -35,6 +35,7 @@ export ARROW_C_GLIB_DIR=$TRAVIS_BUILD_DIR/c_glib
 export ARROW_JAVA_DIR=${TRAVIS_BUILD_DIR}/java
 export ARROW_JS_DIR=${TRAVIS_BUILD_DIR}/js
 export ARROW_INTEGRATION_DIR=$TRAVIS_BUILD_DIR/integration
+export ARROW_DEV_DIR=$TRAVIS_BUILD_DIR/dev
 export ARROW_CROSSBOW_DIR=$TRAVIS_BUILD_DIR/dev/tasks
 export ARROW_RUBY_DIR=$TRAVIS_BUILD_DIR/ruby
 export ARROW_RUST_DIR=${TRAVIS_BUILD_DIR}/rust
diff --git a/ci/travis_lint.sh b/ci/travis_lint.sh
index b6576e2..f99a7f2 100755
--- a/ci/travis_lint.sh
+++ b/ci/travis_lint.sh
@@ -44,10 +44,10 @@ fi
 # Python style checks
 # (need Python 3 for crossbow)
 FLAKE8="python3 -m flake8"
-python3 -m pip install -q flake8==3.5
+python3 -m pip install -q flake8
 
 if [ "$ARROW_CI_DEV_AFFECTED" != "0" ]; then
-  $FLAKE8 --count $ARROW_CROSSBOW_DIR
+  $FLAKE8 --count $ARROW_DEV_DIR
 fi
 
 if [ "$ARROW_CI_INTEGRATION_AFFECTED" != "0" ]; then
diff --git a/dev/merge_arrow_pr.py b/dev/merge_arrow_pr.py
index 5a926f5..6c7e853 100755
--- a/dev/merge_arrow_pr.py
+++ b/dev/merge_arrow_pr.py
@@ -57,10 +57,12 @@ except ImportError:
 BRANCH_PREFIX = "PR_TOOL"
 JIRA_API_BASE = "https://issues.apache.org/jira"
 
+
 def get_json(url, headers=None):
     req = requests.get(url, headers=headers)
     return req.json()
 
+
 def run_cmd(cmd):
     if isinstance(cmd, six.string_types):
         cmd = cmd.split(' ')
@@ -96,7 +98,7 @@ def clean_up():
         run_cmd("git branch -D %s" % branch)
 
 
-_REGEX_CI_DIRECTIVE = re.compile('\[[^\]]*\]')
+_REGEX_CI_DIRECTIVE = re.compile(r'\[[^\]]*\]')
 
 
 def strip_ci_directives(commit_message):
@@ -143,7 +145,7 @@ class JiraIssue(object):
         unreleased_versions = sorted(unreleased_versions,
                                      key=lambda x: x.name, reverse=True)
 
-        mainline_version_regex = re.compile('\d.*')
+        mainline_version_regex = re.compile(r'\d.*')
         mainline_versions = [x for x in unreleased_versions
                              if mainline_version_regex.match(x.name)]
 
@@ -451,5 +453,5 @@ def cli():
 if __name__ == '__main__':
     try:
         cli()
-    except Exception as e:
+    except Exception:
         raise
diff --git a/dev/release/changelog.py b/dev/release/changelog.py
index baa8429..414b229 100755
--- a/dev/release/changelog.py
+++ b/dev/release/changelog.py
@@ -77,9 +77,9 @@ def format_changelog_markdown(issues, out):
 
 def _escape_for_markdown(x):
     return (
-        x.replace('_', '\_')  # underscores
-        .replace('`', '\`')   # backticks
-        .replace('*', '\*')   # asterisks
+        x.replace('_', r'\_')  # underscores
+        .replace('`', r'\`')   # backticks
+        .replace('*', r'\*')   # asterisks
     )