Skip to content

Commit

Permalink
Fix circleci lint (oppia#7303)
Browse files Browse the repository at this point in the history
* Fix lint error

* Add additional line

* Swap functions
  • Loading branch information
kevinlee12 authored and seanlip committed Aug 5, 2019
1 parent 3a24d7e commit a42c7aa
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 15 deletions.
1 change: 1 addition & 0 deletions core/domain/user_services.py
Original file line number Diff line number Diff line change
Expand Up @@ -1112,6 +1112,7 @@ def flush_migration_bot_contributions_model():
user_contributions.created_exploration_ids = []
_save_user_contributions(user_contributions)


def get_users_email_preferences(user_ids):
"""Get email preferences for the list of users.
Expand Down
30 changes: 15 additions & 15 deletions schema_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,21 +212,6 @@ def get(cls, normalizer_id):
raise Exception('Invalid normalizer id: %s' % normalizer_id)
return getattr(cls, normalizer_id)

@staticmethod
def normalize_spaces(obj):
"""Collapses multiple spaces into single spaces.
Args:
obj: a string.
Returns:
A string that is the same as `obj`, except that each block of
whitespace is collapsed into a single space character. If the
block of whitespace is at the front or end of obj, then it
is simply removed.
"""
return ' '.join(obj.split())

@staticmethod
def sanitize_url(obj):
"""Takes a string representing a URL and sanitizes it.
Expand Down Expand Up @@ -256,6 +241,21 @@ def sanitize_url(obj):
'\'http://\' or \'https://\'; received %s' % raw)
return raw

@staticmethod
def normalize_spaces(obj):
"""Collapses multiple spaces into single spaces.
Args:
obj: a string.
Returns:
A string that is the same as `obj`, except that each block of
whitespace is collapsed into a single space character. If the
block of whitespace is at the front or end of obj, then it
is simply removed.
"""
return ' '.join(obj.split())


class _Validators(object):
"""Various validators.
Expand Down

0 comments on commit a42c7aa

Please sign in to comment.