Skip to content

Commit 2cddba9

Browse files
committed
Restoring pylint speedup for Travis PRs.
Was removed in d922f1d since the pylint CLI doesn't handle missing files well.
1 parent 55285f9 commit 2cddba9

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

run_pylint.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,12 @@ def get_files_for_linting():
125125
a remote branch to diff against.
126126
"""
127127
diff_base = None
128-
# Temporarily turning off origin/master check since file removed.
129-
if os.getenv('TRAVIS') is None:
128+
if (os.getenv('TRAVIS_BRANCH') == 'master' and
129+
os.getenv('TRAVIS_PULL_REQUEST') != 'false'):
130+
# In the case of a pull request into master, we want to
131+
# diff against HEAD in master.
132+
diff_base = 'origin/master'
133+
elif os.getenv('TRAVIS') is None:
130134
# Only allow specified remote and branch in local dev.
131135
remote = os.getenv('GCLOUD_REMOTE_FOR_LINT')
132136
branch = os.getenv('GCLOUD_BRANCH_FOR_LINT')

0 commit comments

Comments
 (0)