Skip to content

Commit

Permalink
fix: autopep8 support + fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
klauern committed Feb 13, 2020
1 parent 33f4c8e commit f905667
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ install:
before_script:
# Stop the build if there are Python syntax errors or undefined names
- flake8 .
- autopep8 --diff --recursive .
- autopep8 --diff --recursive --max-line-length 127 .

# Command to run tests
script:
Expand Down
2 changes: 1 addition & 1 deletion ScoutSuite/providers/aliyun/resources/vpc/vpcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ def _parse_vpcs(self, raw_vpc):
vpc_dict['cidr_block'] = raw_vpc.get('CidrBlock')
vpc_dict['is_default'] = raw_vpc.get('IsDefault')

return vpc_dict['id'], vpc_dict
return vpc_dict['id'], vpc_dict
2 changes: 1 addition & 1 deletion ScoutSuite/providers/aws/resources/elb/vpcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
class ELBVpcs(Vpcs):
_children = [
(LoadBalancers, 'elbs'),
]
]
1 change: 0 additions & 1 deletion ScoutSuite/providers/gcp/facade/cloudsql.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,3 @@ async def get_users(self, project_id: str, instance_name: str):
except Exception as e:
print_exception('Failed to retrieve database instance users: {}'.format(e))
return []

2 changes: 1 addition & 1 deletion tests/test-core.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ def test_prompt_overwrite(self):

def test_prompt_value(self):
assert (prompt_value(question='', max_laps=1, test_input='test', is_question=True, choices=['test']) is None)
assert (prompt_value(question='', max_laps=1, test_input='test', is_question=True, choices=['test'], no_confirm=True) == 'test')
assert (prompt_value(question='', max_laps=1, test_input='test', is_question=True, choices=['test'], no_confirm=True) == 'test')
2 changes: 1 addition & 1 deletion tests/test-output.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ def test_get_filename(self):
assert ('scoutsuite-report/scoutsuite-results/scoutsuite_exceptions.js' in get_filename("EXCEPTIONS"))
assert ('scoutsuite-results/scoutsuite_exceptions.js' in get_filename("EXCEPTIONS", relative_path=True))
assert ('scoutsuite-report/scoutsuite-results/scoutsuite_errors.json' in get_filename("ERRORS"))
assert ('scoutsuite-results/scoutsuite_errors.json' in get_filename("ERRORS", relative_path=True))
assert ('scoutsuite-results/scoutsuite_errors.json' in get_filename("ERRORS", relative_path=True))

0 comments on commit f905667

Please sign in to comment.