Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
iamdefinitelyahuman committed Jul 23, 2019
1 parent ee81fb3 commit 2dfea24
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion solcx/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
compile_standard,
link_code,
)
from .install import (
from .install import ( # noqa: F401
import_installed_solc,
install_solc,
install_solc_pragma,
Expand Down
12 changes: 9 additions & 3 deletions solcx/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ def import_installed_solc():
platform = _get_platform()
if platform == 'linux':
# on Linux, copy active version of solc
path_list = [subprocess.run(['which', 'solc'], stdout=subprocess.PIPE).stdout.decode().strip()]
path_list = [
subprocess.run(['which', 'solc'], stdout=subprocess.PIPE).stdout.decode().strip()
]
if not path_list[0]:
return
elif platform == 'darwin':
Expand Down Expand Up @@ -111,7 +113,9 @@ def set_solc_version_pragma(version, silent=False):
version = version.strip()
comparator_set_range = [i.strip() for i in version.split('||')]
installed_versions = get_installed_solc_versions()
comparator_regex = re.compile(r'(?P<operator>([<>]?=?|\^))(?P<version>(?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+))')
comparator_regex = re.compile(
r'(?P<operator>([<>]?=?|\^))(?P<version>(?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+))'
)
range_flag = False
set_version = None
for installed_version in reversed(installed_versions):
Expand Down Expand Up @@ -176,7 +180,9 @@ def install_solc(version, allow_osx=False):
def install_solc_pragma(version, install=True):
version = version.strip()
comparator_set_range = [i.strip() for i in version.split('||')]
comparator_regex = re.compile(r'(?P<operator>([<>]?=?|\^))(?P<version>(?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+))')
comparator_regex = re.compile(
r'(?P<operator>([<>]?=?|\^))(?P<version>(?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+))'
)
versions_json = requests.get(ALL_RELEASES).json()
range_flag = False
for version_json in versions_json:
Expand Down
Binary file added solcx/temp/solc-binary
Binary file not shown.
2 changes: 1 addition & 1 deletion solcx/wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def solc_wrapper(solc_binary=None,

if combined_json:
if "v0.5" in command[0]:
combined_json = combined_json.replace(',clone-bin','')
combined_json = combined_json.replace(',clone-bin', '')
command.extend(('--combined-json', combined_json))

if gas:
Expand Down

0 comments on commit 2dfea24

Please sign in to comment.