Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix type_arg parsing #189

Merged
merged 2 commits into from
Jan 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions pysui/sui/sui_txresults/single_tx.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@

from dataclasses import dataclass, field
from typing import Any, Optional, Union
from dataclasses_json import DataClassJsonMixin, config, LetterCase

from dataclasses_json import DataClassJsonMixin, LetterCase, config
from deprecated.sphinx import versionchanged
from pysui.sui.sui_types import ObjectID, SuiAddress

from pysui.sui.sui_txresults.common import GenericRef
from pysui.sui.sui_types import ObjectID, SuiAddress

# pylint:disable=too-many-instance-attributes
# Faucet results
Expand Down Expand Up @@ -59,13 +61,9 @@ class ObjectReadData(DataClassJsonMixin):

def __post_init__(self):
"""Post init processing for parameters."""
ref = self.type_.split("<")
ref = self.type_.split("<", 1)
if len(ref) > 1:
inner_ref = ref[1][:-1].split(",")
if len(inner_ref) > 1:
self.type_arg = [x.strip() for x in inner_ref]
else:
self.type_arg = ref[1][:-1]
self.type_arg = ref[1][:-1]
if "id" in self.fields:
self.fields["id"] = self.fields["id"]["id"]

Expand Down