Skip to content

Commit

Permalink
Merge lint3 into lint (#196)
Browse files Browse the repository at this point in the history
* lint.py: Make compatible with python3

* lint: Remove lint3.py in favor of lint.py
  • Loading branch information
AbdealiLoKo authored and tqchen committed Dec 5, 2016
1 parent 42425dd commit a3b2fbe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 176 deletions.
9 changes: 4 additions & 5 deletions scripts/lint.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ def _print_summary_map(strm, result_map, ftype):
"""Print summary of certain result map."""
if len(result_map) == 0:
return 0
npass = len([x for k, x in result_map.iteritems() if len(x) == 0])
npass = len([x for k, x in result_map.items() if len(x) == 0])
strm.write('=====%d/%d %s files passed check=====\n' % (npass, len(result_map), ftype))
for fname, emap in result_map.iteritems():
for fname, emap in result_map.items():
if len(emap) == 0:
continue
strm.write('%s: %d Errors of %d Categories map=%s\n' % (
Expand Down Expand Up @@ -116,9 +116,8 @@ def get_header_guard_dmlc(filename):
file_path_from_root = fileinfo.RepositoryName()
inc_list = ['include', 'api', 'wrapper']

if file_path_from_root.find('src/') != -1 and _HELPER.project_name is not None:
idx = file_path_from_root.find('src/')
file_path_from_root = _HELPER.project_name + file_path_from_root[idx + 3:]
if file_path_from_root.startswith('src') and _HELPER.project_name is not None:
file_path_from_root = re.sub('^src', _HELPER.project_name, file_path_from_root)
else:
for spath in inc_list:
prefix = spath + os.sep
Expand Down
171 changes: 0 additions & 171 deletions scripts/lint3.py

This file was deleted.

0 comments on commit a3b2fbe

Please sign in to comment.