Skip to content

Commit

Permalink
Fix oppia#6040: Fix issues in develop (oppia#6038)
Browse files Browse the repository at this point in the history
* Fix issues in develop

* revert changes

* Increase value of timeout_multiplier

* Linter catches the issues, redo the changes

* Revert changes in exp services test

* Revert changes in top navigation bar directive

* Update method to obtain messages to fix linter

* Address review comments

* Fix issues

* Increase timeout

* Increase timeout

* Revert changes

* Revert changes

* Increase timeout further

* Fix pylint error

* Fix js errors
  • Loading branch information
ankita240796 authored and apb7 committed Jan 1, 2019
1 parent ba37cc9 commit 59260be
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
3 changes: 2 additions & 1 deletion core/domain/exp_services_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,8 @@ def _create_search_query(self, terms, categories, languages):
Args:
terms: list(str). A list of terms to be added in the query.
categories: list(str). A list of categories to be added in the query.
categories: list(str). A list of categories to be added in the
query.
languages: list(str). A list of languages to be added in the query.
Returns:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ oppia.directive('topNavigationBar', [
var NAV_MODES_WITH_CUSTOM_LOCAL_NAV = [
'create', 'explore', 'collection', 'topics_and_skills_dashboard',
'topic_editor', 'story_editor'];
$scope.currentUrl = window.location.pathname.split("/")[1];
$scope.currentUrl = window.location.pathname.split('/')[1];
$scope.LABEL_FOR_CLEARING_FOCUS = LABEL_FOR_CLEARING_FOCUS;
$scope.newStructuresEnabled = constants.ENABLE_NEW_STRUCTURE_EDITORS;
$scope.getStaticImageUrl = UrlInterpolationService.getStaticImageUrl;
Expand Down
15 changes: 10 additions & 5 deletions scripts/pre_commit_linter.py
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,7 @@ def _pre_commit_linter(all_files):
number_of_files_to_lint = sum(
len(file_group) for file_group in file_groups_to_lint)

timeout_multiplier = 1000
timeout_multiplier = 2000
for file_group, process in zip(file_groups_to_lint, linting_processes):
# try..except block is needed to catch ZeroDivisionError
# when there are no CSS, HTML, JavaScript and Python files to lint.
Expand All @@ -771,10 +771,15 @@ def _pre_commit_linter(all_files):
print 'Summary of Errors:'
print '----------------------------------------'
summary_messages = []
summary_messages.append(css_in_html_result.get())
summary_messages.append(css_result.get())
summary_messages.append(js_result.get())
summary_messages.append(py_result.get())

result_queues = [
css_in_html_result, css_result,
js_result, py_result]

for result_queue in result_queues:
while not result_queue.empty():
summary_messages.append(result_queue.get())

print '\n'.join(summary_messages)
print ''
return summary_messages
Expand Down

0 comments on commit 59260be

Please sign in to comment.