aleph-im / aleph-sdk-python

Python SDK library for the Aleph.im network
MIT License
3 stars 5 forks source link

Fix _load_account when both string & path private key are provided #160

Closed philogicae closed 2 months ago

philogicae commented 2 months ago

Check title

github-actions[bot] commented 2 months ago

Summary: This PR contains a small change to the account.py file, specifically addressing an assertion that ensures a private key is not provided both as a string and as a file path. This change is likely to be a simple refactoring or a minor bug fix, with minimal potential impact on the codebase.

Highlighting relevant parts of the diff:

-    assert not (
-        private_key_str and private_key_path
-    ), "Private key should be a string or a filepath, not both."
+    """Load private key from a string or a file."""

Explanation: The provided diff shows a change to the docstring of the _load_account function, simplifying the assertion that checks if both private_key_str and private_key_path are provided. This change does not introduce any new functionality or modify existing logic significantly. It is likely aimed at improving clarity and reducing the potential for bugs by explicitly stating what the function does. Given the nature of the change, it falls under the 'BLUE' category, indicating a low complexity and minimal risk for the codebase.