Skip to content

Commit eb6c2e5

Browse files
committed
s/get_files_for_linting/get_affected_files/.
Also, fix a "the the" typo.
1 parent 8c8a50b commit eb6c2e5

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

scripts/pycodestyle_on_repo.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@
2323
import subprocess
2424
import sys
2525

26-
from script_utils import get_files_for_linting
26+
from script_utils import get_affected_files
2727

2828

2929
def main():
3030
"""Run pycodestyle on all Python files in the repository."""
3131
git_root = subprocess.check_output(
3232
['git', 'rev-parse', '--show-toplevel']).strip()
3333
os.chdir(git_root)
34-
candidates, _ = get_files_for_linting()
34+
candidates, _ = get_affected_files()
3535
python_files = [
3636
candidate for candidate in candidates if candidate.endswith('.py')]
3737

scripts/run_pylint.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
import subprocess
3030
import sys
3131

32-
from script_utils import get_files_for_linting
32+
from script_utils import get_affected_files
3333

3434

3535
IGNORED_DIRECTORIES = [
@@ -140,7 +140,7 @@ def is_production_filename(filename):
140140
def get_python_files(all_files=None):
141141
"""Gets a list of all Python files in the repository that need linting.
142142
143-
Relies on :func:`get_files_for_linting()` to determine which files should
143+
Relies on :func:`get_affected_files()` to determine which files should
144144
be considered.
145145
146146
NOTE: This requires ``git`` to be installed and requires that this
@@ -154,7 +154,7 @@ def get_python_files(all_files=None):
154154
contains all production files, the next all test files.
155155
"""
156156
if all_files is None:
157-
all_files, diff_base = get_files_for_linting()
157+
all_files, diff_base = get_affected_files()
158158

159159
library_files = []
160160
non_library_files = []

scripts/script_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ def get_changed_packages(blob_name1, blob_name2, package_list):
163163
return sorted(result)
164164

165165

166-
def get_files_for_linting(allow_limited=True):
166+
def get_affected_files(allow_limited=True):
167167
"""Gets a list of files in the repository.
168168
169169
By default, returns all files via ``git ls-files``. However, in some cases
@@ -185,7 +185,7 @@ def get_files_for_linting(allow_limited=True):
185185
be used.
186186
187187
:rtype: pair
188-
:returns: Tuple of the diff base using the the list of filenames to be
188+
:returns: Tuple of the diff base using the list of filenames to be
189189
linted.
190190
"""
191191
diff_base = None

0 commit comments

Comments
 (0)