Skip to content

Commit

Permalink
Merge 37755e2 into 2019fe4
Browse files Browse the repository at this point in the history
  • Loading branch information
cclauss committed Mar 1, 2020
2 parents 2019fe4 + 37755e2 commit 7849667
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ env:
- TESTCASE=tests/tests.py
before_script:
# stop the build if there are Python syntax errors or undefined names
- flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics
- flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
- flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
script:
Expand Down
8 changes: 4 additions & 4 deletions zappa/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -1382,7 +1382,7 @@ def colorize_invoke_command(self, string):
# UUIDs
for token in final_string.replace('\t', ' ').split(' '):
try:
if token.count('-') is 4 and token.replace('-', '').isalnum():
if token.count('-') == 4 and token.replace('-', '').isalnum():
final_string = final_string.replace(
token,
click.style(token, fg='magenta')
Expand Down Expand Up @@ -2517,7 +2517,7 @@ def is_http_log_entry(self, string):
# IP address filter
for token in string.replace('\t', ' ').split(' '):
try:
if (token.count('.') is 3 and token.replace('.', '').isnumeric()):
if (token.count('.') == 3 and token.replace('.', '').isnumeric()):
return True
except Exception: # pragma: no cover
pass
Expand Down Expand Up @@ -2552,14 +2552,14 @@ def colorize_log_entry(self, string):
# And UUIDs
for token in final_string.replace('\t', ' ').split(' '):
try:
if token.count('-') is 4 and token.replace('-', '').isalnum():
if token.count('-') == 4 and token.replace('-', '').isalnum():
final_string = final_string.replace(token, click.style(token, fg="magenta"))
except Exception: # pragma: no cover
pass

# And IP addresses
try:
if token.count('.') is 3 and token.replace('.', '').isnumeric():
if token.count('.') == 3 and token.replace('.', '').isnumeric():
final_string = final_string.replace(token, click.style(token, fg="red"))
except Exception: # pragma: no cover
pass
Expand Down
2 changes: 1 addition & 1 deletion zappa/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -2031,7 +2031,7 @@ def update_cognito(self, lambda_name, user_pool, lambda_configs, lambda_arn):
'EmailConfiguration', 'SmsConfiguration', 'UserPoolTags',
'AdminCreateUserConfig'):
description_kwargs[key] = value
elif key is 'LambdaConfig':
elif key == 'LambdaConfig':
for lckey, lcvalue in value.items():
if lckey in LambdaConfig:
value[lckey] = LambdaConfig[lckey]
Expand Down

0 comments on commit 7849667

Please sign in to comment.