mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-13 09:50:08 -04:00
Clean up typos
This changeset cleans up a variety of typos that were found and submitted in PR #2588; we cannot directly accept external contributions, but we appreciate the flagging of things like this! Signed-off-by: Carlo Costino <carlo.costino@gsa.gov>
This commit is contained in:
@@ -103,7 +103,7 @@ class RedisClient:
|
||||
|
||||
Notes:
|
||||
- Failed requests count. If over the limit and keep making requests you'll stay over the limit.
|
||||
- The actual value in the set is just the timestamp, the same as the score. We don't store any requets details.
|
||||
- The actual value in the set is just the timestamp, the same as the score. We don't store any request details.
|
||||
- return value of pipe.execute() is an array containing the outcome of each call.
|
||||
- result[2] == outcome of pipe.zcard()
|
||||
- If redis is inactive, or we get an exception, allow the request
|
||||
|
||||
@@ -338,7 +338,7 @@ def strip_and_remove_obscure_whitespace(value):
|
||||
|
||||
|
||||
def remove_whitespace(value):
|
||||
# Removes ALL whitespace, not just the obscure characters we normaly remove
|
||||
# Removes ALL whitespace, not just the obscure characters we normally remove
|
||||
for character in ALL_WHITESPACE:
|
||||
value = value.replace(character, "")
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ from ordered_set import OrderedSet
|
||||
class InsensitiveDict(dict):
|
||||
"""
|
||||
`InsensitiveDict` behaves like an ordered dictionary, except it normalises
|
||||
case, whitespace, hypens and underscores in keys.
|
||||
case, whitespace, hyphens and underscores in keys.
|
||||
|
||||
In other words,
|
||||
InsensitiveDict({'FIRST_NAME': 'example'}) == InsensitiveDict({'first name': 'example'})
|
||||
@@ -23,7 +23,7 @@ class InsensitiveDict(dict):
|
||||
def from_keys(cls, keys):
|
||||
"""
|
||||
This behaves like `dict.from_keys`, except:
|
||||
- it normalises the keys to ignore case, whitespace, hypens and
|
||||
- it normalises the keys to ignore case, whitespace, hyphens and
|
||||
underscores
|
||||
- it stores the original, unnormalised key as the value of the
|
||||
item so it can be retrieved later
|
||||
|
||||
@@ -510,7 +510,7 @@
|
||||
'66':
|
||||
attributes:
|
||||
alpha: REG
|
||||
comment: Maximum long message lenght is 459 for GSM7 or 201 for Unicode alphabet.
|
||||
comment: Maximum long message length is 459 for GSM7 or 201 for Unicode alphabet.
|
||||
Special registration procedure for sending to DND numbers
|
||||
dlr: 'YES'
|
||||
generic_sender: SMS
|
||||
@@ -577,7 +577,7 @@
|
||||
sender_and_registration_info: All senders CONVERTED into one available national
|
||||
numeric sender
|
||||
text_restrictions: Content template MUST be approved by the MNO. Transactional
|
||||
traffic ONLY. Sufix added in the message text
|
||||
traffic ONLY. Suffix added in the message text
|
||||
billable_units: 1
|
||||
names:
|
||||
- China
|
||||
|
||||
@@ -652,7 +652,7 @@ def _do_simple_email_checks(match, email_address):
|
||||
def validate_email_address(email_address): # noqa (C901 too complex)
|
||||
# almost exactly the same as by https://github.com/wtforms/wtforms/blob/master/wtforms/validators.py,
|
||||
# with minor tweaks for SES compatibility - to avoid complications we are a lot stricter with the local part
|
||||
# than neccessary - we don't allow any double quotes or semicolons to prevent SES Technical Failures
|
||||
# than necessary - we don't allow any double quotes or semicolons to prevent SES Technical Failures
|
||||
email_address = strip_and_remove_obscure_whitespace(email_address)
|
||||
match = re.match(EMAIL_REGEX_PATTERN, email_address)
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ class SerialisedModel(ABC):
|
||||
guarantees that:
|
||||
- all of the ALLOWED_PROPERTIES are present in the underlying
|
||||
dictionary
|
||||
- any other abritrary properties of the underlying dictionary can’t
|
||||
- any other arbitrary properties of the underlying dictionary can’t
|
||||
be accessed
|
||||
|
||||
If you are adding a new field to a model, you should ensure that
|
||||
|
||||
@@ -207,7 +207,7 @@ class BaseSMSTemplate(Template):
|
||||
# subclass, to avoid any HTML formatting. SMS templates differ
|
||||
# in that the content can include the service name as a prefix.
|
||||
# So historically we’ve returned the fully-formatted message,
|
||||
# rather than some plain-text represenation of the content. To
|
||||
# rather than some plain-text representation of the content. To
|
||||
# preserve compatibility for consumers of the API we maintain
|
||||
# that behaviour by overriding this method here.
|
||||
return SMSMessageTemplate.__str__(self)
|
||||
|
||||
Reference in New Issue
Block a user