diff --git a/.github/release.yaml b/.github/release.yaml index 0aee9d3..2cc14af 100644 --- a/.github/release.yaml +++ b/.github/release.yaml @@ -28,4 +28,4 @@ changelog: - documentation # standard github label - title: Other changes labels: - - "*" \ No newline at end of file + - "*" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9a72868..d7e95c0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,3 @@ ---- name: continuous integration on: diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index 2f810d1..d79b4a5 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -1,4 +1,3 @@ ---- name: release drafter on: @@ -6,7 +5,7 @@ on: branches: - master pull_request: - types: [ opened, reopened, synchronize ] + types: [opened, reopened, synchronize] permissions: contents: read diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1df3ab4..209bf54 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,4 +1,3 @@ ---- name: release on: @@ -46,7 +45,7 @@ jobs: - name: Sign distribution artifacts timeout-minutes: 10 - uses: LedgerHQ/actions-security/actions/sign-blob@actions/sign-blob-1 + uses: LedgerHQ/actions-security/actions/sign-blob@actions/sign-blob-1 with: path: dist diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml index e84d7c3..f25e8ab 100644 --- a/.github/workflows/update.yml +++ b/.github/workflows/update.yml @@ -1,4 +1,3 @@ ---- name: update dependencies on: diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 94bf85e..4df1ee5 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -32,42 +32,42 @@ repos: # - pydantic # - pytest # -# - repo: https://github.com/pdm-project/pdm -# rev: 2.18.1 -# hooks: -# - id: pdm-lock-check -# name: check pdm lock file -# -# - repo: https://github.com/adrienverge/yamllint.git -# rev: v1.29.0 -# hooks: -# - id: yamllint -# name: check yaml files (yamllint) -# -# - repo: https://github.com/pre-commit/pre-commit-hooks -# rev: v4.5.0 -# hooks: -# - id: check-ast -# - id: check-builtin-literals -# - id: check-case-conflict -# - id: check-docstring-first -# - id: check-executables-have-shebangs -# - id: check-merge-conflict -# - id: check-shebang-scripts-are-executable -# - id: check-symlinks -# - id: check-toml -# - id: check-json -# - id: check-yaml -# - id: check-vcs-permalinks -# - id: debug-statements -# - id: destroyed-symlinks -# - id: detect-private-key -# - id: end-of-file-fixer -# - id: forbid-new-submodules -# - id: mixed-line-ending -# - id: fix-byte-order-marker -# # - id: no-commit-to-branch TODO (temporary for development) -# + - repo: https://github.com/pdm-project/pdm + rev: 2.18.1 + hooks: + - id: pdm-lock-check + name: check pdm lock file + + - repo: https://github.com/adrienverge/yamllint.git + rev: v1.29.0 + hooks: + - id: yamllint + name: check yaml files (yamllint) + + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.5.0 + hooks: + - id: check-ast + - id: check-builtin-literals + - id: check-case-conflict + - id: check-docstring-first + - id: check-executables-have-shebangs + - id: check-merge-conflict + - id: check-shebang-scripts-are-executable + - id: check-symlinks + - id: check-toml + - id: check-json + - id: check-yaml + - id: check-vcs-permalinks + - id: debug-statements + - id: destroyed-symlinks + - id: detect-private-key + - id: end-of-file-fixer + - id: forbid-new-submodules + - id: mixed-line-ending + - id: fix-byte-order-marker + # - id: no-commit-to-branch TODO (temporary for development) + # - repo: https://github.com/asottile/pyupgrade # rev: v3.15.2 # hooks: @@ -122,9 +122,9 @@ repos: # name: lint docs spelling (codespell) # additional_dependencies: # - tomli -# -# - repo: https://github.com/rhysd/actionlint -# rev: v1.6.27 -# hooks: -# - id: actionlint -# name: lint Github Actions workflows (actionlint) + + - repo: https://github.com/rhysd/actionlint + rev: v1.6.27 + hooks: + - id: actionlint + name: lint Github Actions workflows (actionlint) diff --git a/.yamllint b/.yamllint new file mode 100644 index 0000000..8098743 --- /dev/null +++ b/.yamllint @@ -0,0 +1,6 @@ +extends: default + +rules: + document-start: disable + line-length: + max: 120 diff --git a/docs/erc-7730.schema.json b/docs/erc-7730.schema.json index 8888f6f..00aa4fd 100644 --- a/docs/erc-7730.schema.json +++ b/docs/erc-7730.schema.json @@ -749,4 +749,4 @@ ] } } -} \ No newline at end of file +} diff --git a/pyproject.toml b/pyproject.toml index a63106f..2b094a8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -119,4 +119,4 @@ exclude_dirs = ["tests"] [tool.codespell] ignore-words = ".codespellignore" -skip = "inputs/*,outputs/*,pdm.lock" \ No newline at end of file +skip = "inputs/*,outputs/*,pdm.lock" diff --git a/src/erc7730/common/pydantic.py b/src/erc7730/common/pydantic.py index 23ea211..eb1785b 100644 --- a/src/erc7730/common/pydantic.py +++ b/src/erc7730/common/pydantic.py @@ -29,4 +29,4 @@ def model_from_json_bytes(bytes: bytes, model: type[M]) -> M: Load a Pydantic model from a JSON file content as an array of bytes. """ return model.model_validate_json(bytes, strict=True) - \ No newline at end of file + diff --git a/src/erc7730/mapper/mapper.py b/src/erc7730/mapper/mapper.py index 1255295..578357d 100644 --- a/src/erc7730/mapper/mapper.py +++ b/src/erc7730/mapper/mapper.py @@ -38,4 +38,4 @@ def to_eip712_mapper(erc7730: ERC7730Descriptor) -> EIP712BaseMapper: return EIP712BaseMapper(chain_id, contract_address, schema, display_name) else: raise Exception(f"context for {erc7730} is None or is not EIP712") - \ No newline at end of file + diff --git a/src/erc7730/model/__init__.py b/src/erc7730/model/__init__.py index 24a2bfd..4115dd8 100644 --- a/src/erc7730/model/__init__.py +++ b/src/erc7730/model/__init__.py @@ -1 +1 @@ -""" Package implementing all typed method and their validations """ \ No newline at end of file +""" Package implementing all typed method and their validations """ diff --git a/src/erc7730/model/base.py b/src/erc7730/model/base.py index ea8e780..8e8142b 100644 --- a/src/erc7730/model/base.py +++ b/src/erc7730/model/base.py @@ -12,4 +12,4 @@ class BaseLibraryModel(BaseModel): validate_assignment=True, arbitrary_types_allowed=False, allow_inf_nan=False, - ) \ No newline at end of file + ) diff --git a/src/erc7730/model/context.py b/src/erc7730/model/context.py index cd37c3f..e790da4 100644 --- a/src/erc7730/model/context.py +++ b/src/erc7730/model/context.py @@ -65,11 +65,3 @@ class EIP712Context(EIP712DomainBinding): - - - - - - - - diff --git a/src/erc7730/model/display.py b/src/erc7730/model/display.py index 5a9ae3e..be48216 100644 --- a/src/erc7730/model/display.py +++ b/src/erc7730/model/display.py @@ -83,5 +83,3 @@ class Field(BaseLibraryModel): class Display(BaseLibraryModel): definitions: Optional[Dict[str, Field]] = None formats: Dict[str, Format] - - diff --git a/src/erc7730/model/erc7730_descriptor.py b/src/erc7730/model/erc7730_descriptor.py index 056c5ee..8610de8 100644 --- a/src/erc7730/model/erc7730_descriptor.py +++ b/src/erc7730/model/erc7730_descriptor.py @@ -22,4 +22,4 @@ class ERC7730Descriptor(BaseLibraryModel): context: Optional[Union[ContractContext, EIP712Context]] = None includes: Optional[list[Union[AnyUrl, Path]]] = None metadata: Optional[Metadata] = None - display: Optional[Display] = None \ No newline at end of file + display: Optional[Display] = None diff --git a/src/erc7730/model/metadata.py b/src/erc7730/model/metadata.py index cbc184c..224b2b4 100644 --- a/src/erc7730/model/metadata.py +++ b/src/erc7730/model/metadata.py @@ -19,10 +19,3 @@ class Metadata(BaseLibraryModel): token: Optional[TokenInfo] = None constants: Optional[Dict[str, str]] = None enums: Optional[Union[AnyUrl, Dict[str, Dict[str, str]]]] = None - - - - - - - diff --git a/tests/src/erc7730/test_datamodel.py b/tests/src/erc7730/test_datamodel.py index d9b9c59..9b51502 100644 --- a/tests/src/erc7730/test_datamodel.py +++ b/tests/src/erc7730/test_datamodel.py @@ -10,4 +10,4 @@ def test_from_erc7730() -> None: assert model_from_json_file_or_none(Path("clear-signing-erc7730-registry/registry/paraswap/calldata-AugustusSwapper.json"), ERC7730Descriptor) is not None assert model_from_json_file_or_none(Path("clear-signing-erc7730-registry/registry/tether/calldata-usdt.json"), ERC7730Descriptor) is not None assert model_from_json_file_or_none(Path("clear-signing-erc7730-registry/registry/uniswap/calldata-UniswapV3Router02.json"), ERC7730Descriptor) is not None - assert model_from_json_file_or_none(Path("clear-signing-erc7730-registry/registry/uniswap/eip712-permit2.json"), ERC7730Descriptor) is not None \ No newline at end of file + assert model_from_json_file_or_none(Path("clear-signing-erc7730-registry/registry/uniswap/eip712-permit2.json"), ERC7730Descriptor) is not None