Skip to content

Commit

Permalink
Merge pull request #491 from aws/warningsfix-2
Browse files Browse the repository at this point in the history
Test
  • Loading branch information
NihalM99 committed Oct 9, 2023
2 parents ab47cdc + ef2065b commit 0eeaf04
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion ebcli/controllers/create.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ def do_command(self):
if (spot_max_price or on_demand_base_capacity or on_demand_above_base_capacity) and not enable_spot:
raise InvalidOptionsError(strings['create.missing_enable_spot'])

if instance_types is "":
if instance_types == "":
raise InvalidOptionsError(strings['spot.instance_types_validation'])

if itype and instance_types:
Expand Down
5 changes: 1 addition & 4 deletions ebcli/display/screen.py
Original file line number Diff line number Diff line change
Expand Up @@ -439,10 +439,7 @@ def scroll_down(self, reverse=False):
scrolled = visible_tables[0].scroll_down(reverse=reverse)
if scrolled:
for i in range(1, len(visible_tables)):
assert(
len(visible_tables[0].data) >= len(visible_tables[i].data),
'First table should be the largest'
)
assert len(visible_tables[0].data) >= len(visible_tables[i].data),'First table should be the largest'
visible_tables[i].scroll_to_id(scrolled, reverse=reverse)

def scroll_over(self, reverse=False):
Expand Down
2 changes: 1 addition & 1 deletion ebcli/lib/codebuild.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def list_curated_environment_images():
each available platform from CodeBuild.
:return: array of image dictionaries
"""
regex_search_version = "AWS ElasticBeanstalk - (.*)v([0-9]+\.[0-9]+\.[0-9]+)"
regex_search_version = r"AWS ElasticBeanstalk - (.*?)v([0-9]+\.[0-9]+\.[0-9]+)"
result = _make_api_call('list_curated_environment_images')
beanstalk_images = []
for platform in result['platforms']:
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/operations/tagops/test_taglist.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def test_validate_key_value_pair__unicode_characters(self):
Python identifies certain Unicode characters as letters, but not others.
For example, the greek delta symbol is not a Unicode letter, and hence
will not match `\w` during regex comparisons, whereas the Swedish `a`
will not match `\\w` during regex comparisons, whereas the Swedish `a`
is a letter.
It is also to be noted that even if Python recognizes a Unicode character
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/operations/test_envvarops.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def assertListsOfDictsEquivalent(self, ls1, ls2):
Counter(frozenset(iteritems(d)) for d in ls2))

def test_sanitize_environment_variables_from_customer_input(self):
environment_variables_input = ' """ DB_USER""" = "\" r=o\"o\'t\"\" " , DB_PAS\ = SWORD="\"pass=\'\"word\""'
environment_variables_input = ' """ DB_USER""" = "\" r=o\"o\'t\"\" " , DB_PAS\\ = SWORD="\"pass=\'\"word\""'

self.assertEqual(
[
Expand Down

0 comments on commit 0eeaf04

Please sign in to comment.