Skip to content
This repository has been archived by the owner on Feb 25, 2020. It is now read-only.

Commit

Permalink
Merge pull request #85 from getcloudless/upgrade-pylint
Browse files Browse the repository at this point in the history
Update pylint to 2.3.1 fix linter errors
  • Loading branch information
sverch committed Mar 2, 2019
2 parents 422e145 + 115d3fc commit e6fc032
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 14 deletions.
9 changes: 5 additions & 4 deletions cloudless/providers/aws/impl/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,12 @@ def get(self, name):
raise BadEnvironmentStateException(
"Expected to find at most one VPC named: %s, "
"output: %s" % (name, vpcs))
elif not vpcs["Vpcs"]:

if not vpcs["Vpcs"]:
return None
else:
return canonicalize_network_info(name, vpcs["Vpcs"][0],
self.driver.session.Session().region_name)

return canonicalize_network_info(name, vpcs["Vpcs"][0],
self.driver.session.Session().region_name)

# pylint: disable=no-self-use
def destroy(self, network):
Expand Down
8 changes: 0 additions & 8 deletions cloudless/util/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,53 +8,45 @@ class BadEnvironmentStateException(Exception):
Throw this when the cloud environment you're deploying to is not in the
state it should be (violates some invariant).
"""
pass


class DisallowedOperationException(Exception):
"""
Trying to do something that's invalid.
"""
pass


class ProfileNotFoundException(Exception):
"""
Could not find the provided profile.
"""
pass


class NotEnoughIPSpaceException(Exception):
"""
Could not allocate the given CIDR range.
"""
pass


class OperationTimedOut(Exception):
"""
Exceeded max retries to perform operation.
"""
pass


class BlueprintException(Exception):
"""
Encountered error interpreting Blueprint file.
"""
pass


class BadConfigurationException(Exception):
"""
Encountered error interpreting Configuration file.
"""
pass


class IncompleteOperationException(Exception):
"""
This is if we are still waiting for something to happen, normally should retry.
"""
pass
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
'pytest>=3.8.0,<3.9.0',
'pytest-xdist>=1.23.0,<1.24.0',
'tox>=3.2.1,<3.3.0',
'pylint>=2.1.1,<2.2.0',
'pylint>=2.3.1,<2.4.0',
]

# What packages are optional?
Expand Down Expand Up @@ -118,7 +118,6 @@ def finalize_options(self):
"""
Unused/noop
"""
pass

def run(self):
"""
Expand Down
Empty file added tests/__init__.py
Empty file.

0 comments on commit e6fc032

Please sign in to comment.