Skip to content

Commit

Permalink
fix conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
Rishav Chakraborty committed Sep 2, 2019
2 parents 127cead + fbe01ab commit 595be3c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 13 deletions.
18 changes: 11 additions & 7 deletions scripts/pre_commit_linter.py
Original file line number Diff line number Diff line change
Expand Up @@ -1332,7 +1332,9 @@ def _lint_css_files(
proc = subprocess.Popen(
proc_args, stdout=subprocess.PIPE, stderr=subprocess.PIPE)

linter_stdout, linter_stderr = proc.communicate()
encoded_linter_stdout, encoded_linter_stderr = proc.communicate()
linter_stdout = encoded_linter_stdout.decode(encoding='utf-8')
linter_stderr = encoded_linter_stderr.decode(encoding='utf-8')
if linter_stderr:
python_utils.PRINT('LINTER FAILED')
python_utils.PRINT(linter_stderr)
Expand Down Expand Up @@ -1390,7 +1392,9 @@ def _lint_js_and_ts_files(
proc = subprocess.Popen(
proc_args, stdout=subprocess.PIPE, stderr=subprocess.PIPE)

linter_stdout, linter_stderr = proc.communicate()
encoded_linter_stdout, encoded_linter_stderr = proc.communicate()
linter_stdout = encoded_linter_stdout.decode(encoding='utf-8')
linter_stderr = encoded_linter_stderr.decode(encoding='utf-8')
if linter_stderr:
python_utils.PRINT('LINTER FAILED')
python_utils.PRINT(linter_stderr)
Expand Down Expand Up @@ -1811,11 +1815,10 @@ def _lint_all_files(self):
js_and_ts_messages.append(js_and_ts_stdout.get())

python_utils.PRINT('')
# The output from the stdout are read as bytes, hence the b' prefix.
python_utils.PRINT(b'\n'.join(js_and_ts_messages))
python_utils.PRINT('\n'.join(js_and_ts_messages))

with _redirect_stdout(_TARGET_STDOUT):
python_utils.PRINT(b'\n'.join(js_and_ts_messages))
python_utils.PRINT('\n'.join(js_and_ts_messages))
python_utils.PRINT('')

return js_and_ts_messages
Expand Down Expand Up @@ -2684,7 +2687,7 @@ def _lint_all_files(self):
summary_messages.append(result_queue.get())

with _redirect_stdout(_TARGET_STDOUT):
python_utils.PRINT(b'\n'.join(summary_messages))
python_utils.PRINT('\n'.join(summary_messages))
python_utils.PRINT('')

return summary_messages
Expand Down Expand Up @@ -3074,7 +3077,8 @@ def _lint_html_files(self):
proc = subprocess.Popen(
proc_args, stdout=subprocess.PIPE, stderr=subprocess.PIPE)

linter_stdout, _ = proc.communicate()
encoded_linter_stdout, _ = proc.communicate()
linter_stdout = encoded_linter_stdout.decode(encoding='utf-8')
# This line splits the output of the linter and extracts digits
# from it. The digits are stored in a list. The second last
# digit in the list represents the number of errors in the file.
Expand Down
6 changes: 0 additions & 6 deletions scripts/run_backend_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,12 +335,6 @@ def main(args=None):

build.main(args=[])

# Compile typescript files.
python_utils.PRINT('Compiling typescript...')
subprocess.call([
os.path.join(common.NODE_MODULES_PATH, 'typescript', 'bin', 'tsc'),
'--project', '.'])

python_utils.PRINT('Compiling webpack...')
subprocess.call([
os.path.join(common.NODE_MODULES_PATH, 'webpack', 'bin', 'webpack.js'),
Expand Down

0 comments on commit 595be3c

Please sign in to comment.