Skip to content

Commit c98b707

Browse files
committed
Merge pull request #1003 from dhermes/pep8-only-repo
Making tox lint target ignore files outside the git repo.
2 parents f634292 + 8ecfa3d commit c98b707

File tree

2 files changed

+21
-2
lines changed

2 files changed

+21
-2
lines changed

scripts/pep8_on_repo.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/bash
2+
3+
# Copyright 2015 Google Inc. All rights reserved.
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
set -ev
18+
19+
pep8 $(git ls-files '*py')

tox.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,14 @@ deps =
4343
passenv = {[testenv:system-tests]passenv} SPHINX_RELEASE
4444

4545
[pep8]
46-
exclude = gcloud/datastore/_datastore_v1_pb2.py,docs/conf.py,*.egg/,.*/
46+
exclude = gcloud/datastore/_datastore_v1_pb2.py,docs/conf.py
4747
verbose = 1
4848

4949
[testenv:lint]
5050
basepython =
5151
python2.7
5252
commands =
53-
pep8
53+
{toxinidir}/scripts/pep8_on_repo.sh
5454
python run_pylint.py
5555
deps =
5656
pep8

0 commit comments

Comments
 (0)