Skip to content

Commit

Permalink
ARROW-7974: [C++][Developer] Fix linter warnings when PYTHONDEVMODE e…
Browse files Browse the repository at this point in the history
…nabled

Also fixes ARROW-7973

Closes #6549 from wesm/ARROW-7974 and squashes the following commits:

92bdd68 <Wes McKinney> Fix linter warnings in PYTHONDEVMODE

Authored-by: Wes McKinney <wesm+git@apache.org>
Signed-off-by: Wes McKinney <wesm+git@apache.org>
  • Loading branch information
wesm committed Mar 6, 2020
1 parent e11b602 commit f8dddcd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cpp/build-support/run_clang_format.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ def _check_one_file(filename, formatted):

exclude_globs = []
if arguments.exclude_globs:
for line in open(arguments.exclude_globs):
exclude_globs.append(line.strip())
with open(arguments.exclude_globs) as f:
exclude_globs.extend(line.strip() for line in f)

formatted_filenames = []
for path in lintutils.get_sources(arguments.source_dir, exclude_globs):
Expand Down
4 changes: 2 additions & 2 deletions cpp/build-support/run_cpplint.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ def _check_some_files(completed_processes, filenames):

exclude_globs = []
if arguments.exclude_globs:
for line in open(arguments.exclude_globs):
exclude_globs.append(line.strip())
with open(arguments.exclude_globs) as f:
exclude_globs.extend(line.strip() for line in f)

linted_filenames = []
for path in lintutils.get_sources(arguments.source_dir, exclude_globs):
Expand Down

0 comments on commit f8dddcd

Please sign in to comment.