From 7a6570cf28f4bb735e9f2bbbd39d54ee7f3211f5 Mon Sep 17 00:00:00 2001 From: cguerre-giordano Date: Fri, 20 Sep 2024 15:17:47 +0200 Subject: [PATCH] Fix linter --- src/erc7730/mapper/mapper.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/erc7730/mapper/mapper.py b/src/erc7730/mapper/mapper.py index 50bdcdc..b1f80c9 100644 --- a/src/erc7730/mapper/mapper.py +++ b/src/erc7730/mapper/mapper.py @@ -1,15 +1,15 @@ -# from pydantic import AnyUrl -# from erc7730.common.pydantic import model_from_json_bytes -# from erc7730.model.context import EIP712JsonSchema, EIP712Context, EIP712, Domain, EIP712Domain -# from erc7730.model.erc7730_descriptor import ERC7730Descriptor, EIP712Context -# from erc7730.model.display import Display, Reference, Field, StructFormats, FieldFormat, Fields, Format, DateParameters, DateEncoding, TokenAmountParameters -# from eip712 import EIP712DAppDescriptor, EIP712ContractDescriptor, EIP712Mapper, EIP712MessageDescriptor, EIP712Field, EIP712Format -# import requests +"""from pydantic import AnyUrl +from erc7730.common.pydantic import model_from_json_bytes +from erc7730.model.context import EIP712JsonSchema, EIP712Context, EIP712, Domain, EIP712Domain +from erc7730.model.erc7730_descriptor import ERC7730Descriptor, EIP712Context +from erc7730.model.display import Display, Reference, FieldFormat, Fields, Format, DateParameters, DateEncoding, TokenAmountParameters +from eip712 import EIP712DAppDescriptor, EIP712ContractDescriptor, EIP712Mapper, EIP712MessageDescriptor, EIP712Field, EIP712Format +import requests -# from erc7730.model.metadata import Metadata +from erc7730.model.metadata import Metadata -"""def to_eip712_mapper(erc7730: ERC7730Descriptor) -> EIP712DAppDescriptor|list[Exception]: +def to_eip712_mapper(erc7730: ERC7730Descriptor) -> EIP712DAppDescriptor|list[Exception]: exceptions = list[Exception]() context = erc7730.context if (context is not None and isinstance(context, EIP712Context)): @@ -130,4 +130,5 @@ def to_erc7730_mapper(eip712DappDescriptor: EIP712DAppDescriptor) -> ERC7730Desc display = Display(definitions=None, formats = formats) metadata = Metadata(owner=None, info=None, token=None, constants=None, enums=None) return ERC7730Descriptor(context = context, includes=None, metadata=metadata, display=display) + """