diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ae674949f50021f2043a34958abadf0f225fc43b..edbb946d16607f17dc031e04acd121d9eb78daba 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,5 +1,15 @@ exclude: ^docs/ repos: +- repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.4.0 + hooks: + - id: check-ast + - id: check-merge-conflict + - id: check-toml + - id: debug-statements + - id: end-of-file-fixer + - id: mixed-line-ending + - id: trailing-whitespace - repo: https://github.com/psf/black rev: 23.3.0 hooks: diff --git a/CHANGELOG.md b/CHANGELOG.md index 365c137f4fa67a0ba8e5502d62e881599b9e5884..1148c2879c51e32ea7b71a15589a0f566ea41f07 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -64,11 +64,11 @@ The methods to check the signature·s have been moved as specific methods into t - All `Document` subclasses can be directly signed when the optional `signing_key` argument is passed - #172 `version` argument is now optional and have a proper default value per document type - `currency` argument is now optional and defaults to `G1_CURRENCY_CODENAME` - + signing_key: SigningKey = None, version: int = VERSION, currency: str = G1_CURRENCY_CODENAME, - + - Introduce `Identity.from_bma_lookup_response()` to simplify examples - Refactor `Document.signatures` `List` as `Document.signature` `str` - `VerifyingKey.verify_document()` has been removed in favour of `Document.check_signature(pubkey)` @@ -84,12 +84,12 @@ The methods to check the signature·s have been moved as specific methods into t - #175, !155: Rename `timestamp` and `blockstamp` attributes and arguments depending on their content: - `timestamp` for time in seconds - `block_id` for `BlockID` type - - `BlockUID` has been renamed to `BlockID` and `BlockID.block_uid()` to `get_block_id()` - + - `BlockUID` has been renamed to `BlockID` and `BlockID.block_uid()` to `get_block_id()` + - #163, !137: `Revocation.from_signed_raw()` now stores the block ID into a `BlockID` object #### Network -The asynchronous property has been dropped to improve DuniterPy accessibility to new comers. +The asynchronous property has been dropped to improve DuniterPy accessibility to new comers. Improvements have been made on the endpoints handling. - #140, !118: Replace `aiohttp` with non-asynchronous `http` and `ws` libraries: `urllib` and `websocket-client`: @@ -235,7 +235,7 @@ Improvements have been made on the endpoints handling. ### Documentation - #104 add CONTRIBUTE.md file with release workflow - + ### CI/CD - #66, !93 Migrate to [Poetry](https://python-poetry.org/) (build and development environment) diff --git a/tests/key/test_ascii_armor.py b/tests/key/test_ascii_armor.py index 1e18de9b4155aa384fb32d4eee323ff0ed3211f5..eae4b49afd1ce90103a55df218403e3ec4b02e3e 100644 --- a/tests/key/test_ascii_armor.py +++ b/tests/key/test_ascii_armor.py @@ -39,7 +39,7 @@ Hello world ! Héhé ;-) This is a utf-8 message... - + """ # create encrypted and signed ascii armor message encrypted_and_signed_aa_message = AsciiArmor.create( diff --git a/tests/key/test_signing_key.py b/tests/key/test_signing_key.py index 5fa6cc341c5b12ff58918c5d7ded7a3e09b826fc..26ee0fcad6c93e42ee6c6258889416432710defb 100644 --- a/tests/key/test_signing_key.py +++ b/tests/key/test_signing_key.py @@ -115,14 +115,14 @@ class TestSigningKey(unittest.TestCase): # comments # # - + { "curve": "ed25519", "public": "dGVzdHRlc3R0ZXN0dGV0c3RldHN0dGV0c3RldGV0ZXRldHN0ZXR0c3RldHN0dGV0c3Q=.ed25519", "private": "dGVzdHRlc3R0ZXN0dGV0c3RldHN0dGV0c3RldGV0ZXRldHN0ZXR0c3RldHN0dGV0c3Q==.ed25519", "id": "@qJ8qVfXU2mIWG9WfKIRsd6GDscQlErzPHsxzHcyQMWQ=.ed25519" } - + # # comments """