Skip to content

Commit

Permalink
lint improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
renatomello committed Oct 16, 2024
1 parent 32c9224 commit 2fdbf85
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/qibo/backends/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ def list_available_backends(*providers: str) -> dict:
return available_backends


def construct_backend(backend, **kwargs) -> Backend:
def construct_backend(backend, **kwargs) -> Backend: # pylint: disable=R1710
"""Construct a generic native or non-native qibo backend.
Args:
Expand All @@ -235,11 +235,12 @@ def construct_backend(backend, **kwargs) -> Backend:
except ImportError as e:
# pylint: disable=unsupported-membership-test
if provider not in e.msg:
raise e
raise MissingBackend(
raise_error(e)
raise_error(
MissingBackend,
f"The '{backend}' backends' provider is not available. Check that a Python "
f"package named '{provider}' is installed, and it is exposing valid Qibo "
"backends.",
+ f"package named '{provider}' is installed, and it is exposing valid Qibo "
+ "backends.",
)


Expand Down

0 comments on commit 2fdbf85

Please sign in to comment.