Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
@CassiopeiaGhost.property(MatchData)
@ghost_load_on
@lazy
def duration(self) -> datetime.timedelta:
return self._data[MatchData].duration
@CassiopeiaGhost.property(ChampionGGData)
@ghost_load_on(KeyError)
def deaths(self) -> SearchableDictionary:
return SearchableDictionary({Role(role): value for role, value in self._data[ChampionGGData].deaths.items()})
@CassiopeiaGhost.property(MasterLeagueListData)
@ghost_load_on
def id(self) -> str:
return self._data[MasterLeagueListData].id
@CassiopeiaGhost.property(ChampionReleaseData)
@ghost_load_on
@lazy
def release_date(self) -> arrow.Arrow:
return arrow.get(self._data[ChampionReleaseData].releaseDate)
@CassiopeiaGhost.property(ItemData)
@ghost_load_on
def keywords(self) -> List[str]:
return SearchableList(self._data[ItemData].keywords)
@CassiopeiaGhost.property(ItemData)
@ghost_load_on
def name(self) -> str:
return self._data[ItemData].name
@CassiopeiaGhost.property(CurrentGameInfoData)
@ghost_load_on
@lazy
def teams(self) -> List[Team]:
return SearchableList([Team.from_data(team, match=self) for team in self._data[CurrentGameInfoData].teams])
@CassiopeiaGhost.property(SummonerSpellData)
@ghost_load_on
@lazy
def image(self) -> Image:
image = Image.from_data(self._data[SummonerSpellData].image)
image(version=self.version)
return image
@CassiopeiaGhost.property(MasteryPageData)
@ghost_load_on(KeyError)
def name(self) -> str:
return self._data[MasteryPageData].name
@CassiopeiaGhost.property(ChampionRotationData)
@ghost_load_on
def free_champions(self) -> SearchableLazyList:
gen = (Champion(region=self.region, id=id_) for id_ in self._data[ChampionRotationData].freeChampionIds)
return SearchableLazyList(generator=gen)