Skip to content

Commit 6381315

Browse files
Try 2 to disable linting on Travis non PR
1 parent 6c48a19 commit 6381315

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

utils/run_linter.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
LINT_ERROR = "Lint Error:\n"
3636

3737
GITHUB_TOKEN = os.environ.get('GITHUB_TOKEN')
38+
TRAVIS = os.environ.get('TRAVIS')
3839
TRAVIS_PULL_REQUEST = os.environ.get('TRAVIS_PULL_REQUEST')
3940
TRAVIS_PULL_REQUEST_SHA = os.environ.get('TRAVIS_PULL_REQUEST_SHA')
4041
TRAVIS_BRANCH = os.environ.get('TRAVIS_BRANCH')
@@ -72,6 +73,9 @@ def main():
7273

7374
changed = {}
7475
if args.diff:
76+
if TRAVIS and not TRAVIS_PULL_REQUEST:
77+
# FIXME: This shouldn't be needed, but not sure why TRAVIS is so special
78+
return
7579
changed = get_changed_lines()
7680

7781
paths = filter_paths(args.path, changed, pwd)

0 commit comments

Comments
 (0)