diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml index 80402f441..9b954dd62 100644 --- a/.github/workflows/pylint.yml +++ b/.github/workflows/pylint.yml @@ -28,4 +28,4 @@ jobs: - name: Run Pylint run: | - pylint --rcfile .pylintrc * \ No newline at end of file + pylint --recursive=true --rcfile .pylintrc * \ No newline at end of file diff --git a/df_py/util/dftool_module.py b/df_py/util/dftool_module.py index 2fa257b1a..e7f54befd 100644 --- a/df_py/util/dftool_module.py +++ b/df_py/util/dftool_module.py @@ -1072,7 +1072,10 @@ def _getSecretSeedOrExit() -> int: def _getPrivateAccount(): private_key = os.getenv("DFTOOL_KEY") assert private_key is not None, "Need to set envvar DFTOOL_KEY" + + # pylint: disable=no-value-for-parameter account = Account.from_key(private_key=private_key) + print(f"For private key DFTOOL_KEY, address is: {account.address}") return account diff --git a/df_py/util/http_provider.py b/df_py/util/http_provider.py index 289452f0c..57d8b998b 100644 --- a/df_py/util/http_provider.py +++ b/df_py/util/http_provider.py @@ -17,6 +17,8 @@ def make_request(self, method, params): "Making request HTTP. URI: %s, Method: %s", self.endpoint_uri, method ) request_data = self.encode_rpc_request(method, params) + + # pylint: disable=not-a-mapping raw_response = make_post_request( self.endpoint_uri, request_data, **self.get_request_kwargs() ) diff --git a/df_py/util/oceantestutil.py b/df_py/util/oceantestutil.py index f6472e8e0..10b2bdcc9 100644 --- a/df_py/util/oceantestutil.py +++ b/df_py/util/oceantestutil.py @@ -248,11 +248,14 @@ def random_lock_and_allocate(web3, tups: list): def get_account0(): - return Account.from_key(private_key=os.getenv("TEST_PRIVATE_KEY0")) + return _account(0) def get_all_accounts(): - return [ - Account.from_key(private_key=os.getenv(f"TEST_PRIVATE_KEY{index}")) - for index in range(0, 9) - ] + return [_account(index) for index in range(9)] + + +# pylint: disable=no-value-for-parameter +def _account(index: int): + private_key = os.getenv(f"TEST_PRIVATE_KEY{index}") + return Account.from_key(private_key=private_key) diff --git a/df_py/util/oceanutil.py b/df_py/util/oceanutil.py index 745f12d2b..a59c88fb5 100644 --- a/df_py/util/oceanutil.py +++ b/df_py/util/oceanutil.py @@ -356,7 +356,7 @@ def get_zero_provider_fee_dict(web3: Web3, provider_account) -> Dict[str, Any]: provider_fee_token = ZERO_ADDRESS valid_until = 0 - message = Web3.solidity_keccak( + message = Web3.solidity_keccak( # pylint: disable=no-value-for-parameter ["bytes", "address", "address", "uint256", "uint256"], [ Web3.to_hex(Web3.to_bytes(text=provider_data)), diff --git a/df_py/util/request.py b/df_py/util/request.py index 154dd6225..da0065eeb 100644 --- a/df_py/util/request.py +++ b/df_py/util/request.py @@ -18,6 +18,7 @@ def _remove_session(key, session): session.close() +# pylint: disable=c-extension-no-member _session_cache = lru.LRU(8, callback=_remove_session)