Skip to content

Commit

Permalink
Fix whitespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
DimaStebaev committed Apr 3, 2024
1 parent 89fbb7b commit 0593a0d
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion python/src/skale_contracts/instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,15 @@
"stateMutability": "view",
"payable": False,
"inputs": [],
"outputs": [ { "type": "string", "name": "" } ]
"outputs": [{"type": "string", "name": ""}]
}


@dataclass
class InstanceData:
"""Contains instance data"""
data: dict[str, str]

@classmethod
def from_json(cls, data: str) -> InstanceData:
"""Create InstanceData object from json string"""
Expand Down
2 changes: 2 additions & 0 deletions python/src/skale_contracts/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class NetworkMetadata:
chain_id: int
path: str


@dataclass
class MetadataFile:
"""Represents file with metadata"""
Expand All @@ -33,6 +34,7 @@ def from_json(cls, data: str) -> MetadataFile:
path=network['path']))
return cls(networks)


class Metadata:
"""Class to manage SKALE contracts metadata"""
networks: list[NetworkMetadata]
Expand Down
2 changes: 0 additions & 2 deletions python/src/skale_contracts/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,11 @@ def name() -> str:
def github_repo(self) -> str:
"""URL of github repo with the project"""


@property
def folder(self) -> str:
"""Folder name with instances json files"""
return self.name()


def get_instance(self, alias_or_address: str) -> Instance:
"""Create instance object based on alias or address"""
if self.network.web3.is_address(alias_or_address):
Expand Down
4 changes: 2 additions & 2 deletions python/src/skale_contracts/project_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
projects_dict = {
project_type.name(): project_type
for _, project_type
in inspect.getmembers(projects, inspect.isclass)
if issubclass(project_type, Project)
in inspect.getmembers(projects, inspect.isclass)
if issubclass(project_type, Project)
}


Expand Down
2 changes: 1 addition & 1 deletion python/src/skale_contracts/projects/skale_allocator.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def get_contract_address(
raise ValueError('Beneficiary is not set')
raise ValueError(f'Contract ${name} is not found')

def _get_escrow (self, beneficiary: Address) -> Address:
def _get_escrow(self, beneficiary: Address) -> Address:
return to_canonical_address(
self.allocator.functions.getEscrowAddress(beneficiary).call()
)
Expand Down

0 comments on commit 0593a0d

Please sign in to comment.