Skip to content

Commit

Permalink
fix flake errors
Browse files Browse the repository at this point in the history
  • Loading branch information
popenta committed Sep 17, 2024
1 parent 09801f7 commit f3daf91
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 21 deletions.
2 changes: 1 addition & 1 deletion multiversx_sdk_cli/cli_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def list_configs(args: Any):
def delete_config(args: Any):
config_file = config.resolve_config_path()
if not config_file.is_file():
logger.info(f"Config file not found. Aborting...")
logger.info("Config file not found. Aborting...")
return

confirm_continuation(f"The file `{str(config_file)}` will be deleted. Do you want to continue? (y/n)")
Expand Down
2 changes: 1 addition & 1 deletion multiversx_sdk_cli/docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def is_docker_installed():
return True
else:
return False
except:
except Exception:
logger.error("Something went wrong when checking if docker is installed!")


Expand Down
2 changes: 1 addition & 1 deletion multiversx_sdk_cli/ledger/ledger_app_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class LedgerApp:
def __init__(self):
try:
self.transport = Transport(interface="hid", debug=False) # Nano S/X using HID interface
except:
except Exception:
raise LedgerError(CONNECTION_ERROR_MSG)

def close(self):
Expand Down
4 changes: 2 additions & 2 deletions multiversx_sdk_cli/localnet/config_part.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ def _validate_overriding_entries(self, overriding: Dict[str, Any]) -> None:

if unknown_entries:
logger.error(f"""\
Unknown localnet configuration entries: {unknown_entries}.
Please check the configuration of the localnet.
Unknown localnet configuration entries: {unknown_entries}.
Please check the configuration of the localnet.
For "{self.get_name()}", the allowed entries are: {allowed_entries}.""")
raise UnknownConfigurationError(f"Unknown localnet configuration entries: {unknown_entries}")

Expand Down
2 changes: 2 additions & 0 deletions multiversx_sdk_cli/simulation.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from collections import OrderedDict
from typing import Any, Dict, Protocol

from multiversx_sdk_cli.interfaces import ISimulateResponse, ITransaction
from multiversx_sdk_cli.utils import ISerializable

Expand All @@ -19,6 +20,7 @@ def to_dictionary(self) -> Dict[str, Any]:

return dictionary


class Simulator():
def __init__(self, proxy: INetworkProvider) -> None:
self.proxy = proxy
Expand Down
4 changes: 2 additions & 2 deletions multiversx_sdk_cli/tests/local_verify_server.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from http.server import HTTPServer, BaseHTTPRequestHandler
import json
from http.server import BaseHTTPRequestHandler, HTTPServer

HOST = 'localhost'
PORT = 7777
Expand All @@ -14,7 +14,7 @@ def do_POST(self):
if self.path == "/initialise":
response = {'token': 7890}
self.wfile.write(bytes(json.dumps(response), 'utf-8'))

if self.path == "/verify":
response = {'status': 'sent to verification'}
self.wfile.write(bytes(json.dumps(response), 'utf-8'))
Expand Down
21 changes: 8 additions & 13 deletions multiversx_sdk_cli/validators/__init__.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
from multiversx_sdk_cli.validators.core import (prepare_args_for_change_reward_address,
prepare_args_for_claim,
prepare_args_for_stake,
prepare_args_for_unbond,
prepare_args_for_unjail,
prepare_args_for_unstake,
prepare_args_for_unstake_nodes,
prepare_args_for_unstake_tokens,
prepare_args_for_unbond_tokens,
prepare_args_for_unbond_nodes,
prepare_args_for_clean_registered_data,
prepare_args_for_restake_unstaked_nodes)

from multiversx_sdk_cli.validators.core import (
prepare_args_for_change_reward_address, prepare_args_for_claim,
prepare_args_for_clean_registered_data,
prepare_args_for_restake_unstaked_nodes, prepare_args_for_stake,
prepare_args_for_unbond, prepare_args_for_unbond_nodes,
prepare_args_for_unbond_tokens, prepare_args_for_unjail,
prepare_args_for_unstake, prepare_args_for_unstake_nodes,
prepare_args_for_unstake_tokens)
from multiversx_sdk_cli.validators.validators_file import ValidatorsFile

__all__ = ["prepare_args_for_stake",
Expand Down
2 changes: 1 addition & 1 deletion multiversx_sdk_cli/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def get_version() -> str:
try:
# Works for local development
return _get_version_from_pyproject()
except Exception as error:
except Exception:
try:
# Works for the installed package
return _get_version_from_metadata()
Expand Down

0 comments on commit f3daf91

Please sign in to comment.