Skip to content

Commit

Permalink
apply linting rules
Browse files Browse the repository at this point in the history
  • Loading branch information
iamdefinitelyahuman committed Feb 19, 2020
1 parent 8454ff0 commit 452120f
Show file tree
Hide file tree
Showing 15 changed files with 347 additions and 380 deletions.
24 changes: 12 additions & 12 deletions solcx/__init__.py
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
from __future__ import absolute_import

from .main import ( # noqa: F401
get_solc_version_string,
get_solc_version,
compile_files,
compile_source,
compile_standard,
link_code,
)
from .install import ( # noqa: F401
import_installed_solc,
install_solc,
install_solc_pragma,
get_available_solc_versions,
get_installed_solc_versions,
get_solc_folder,
import_installed_solc,
install_solc,
install_solc_pragma,
set_solc_version,
set_solc_version_pragma
set_solc_version_pragma,
)
from .main import ( # noqa: F401
compile_files,
compile_source,
compile_standard,
get_solc_version,
get_solc_version_string,
link_code,
)

# check for installed version of solc
Expand Down
21 changes: 12 additions & 9 deletions solcx/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from .utils.string import force_text


def force_text_maybe(value, encoding='iso-8859-1'):
def force_text_maybe(value, encoding="iso-8859-1"):
if value is not None:
return force_text(value)

Expand All @@ -19,23 +19,26 @@ def __init__(self, command, return_code, stdin_data, stdout_data, stderr_data, m
self.message = message
self.command = command
self.return_code = return_code
self.stdin_data = force_text_maybe(stdin_data, 'utf8')
self.stderr_data = force_text_maybe(stderr_data, 'utf8')
self.stdout_data = force_text_maybe(stdout_data, 'utf8')
self.stdin_data = force_text_maybe(stdin_data, "utf8")
self.stderr_data = force_text_maybe(stderr_data, "utf8")
self.stdout_data = force_text_maybe(stdout_data, "utf8")

def __str__(self):
return textwrap.dedent(("""
return textwrap.dedent(
(
"""
{s.message}
> command: `{command}`
> return code: `{s.return_code}`
> stderr:
{s.stdout_data}
> stdout:
{s.stderr_data}
""").format(
s=self,
command=' '.join(self.command),
)).strip()
"""
).format(
s=self, command=" ".join(self.command),
)
).strip()


class ContractsNotFound(SolcError):
Expand Down
Loading

0 comments on commit 452120f

Please sign in to comment.