3434from .clans import Clan , RankedClan
3535from .errors import Forbidden , GatewayError , NotFound , PrivateWarLog
3636from .enums import WarRound
37- from .miscmodels import GoldPassSeason , Label , League , Location , LoadGameData
37+ from .miscmodels import BaseLeague , GoldPassSeason , Label , League , Location , LoadGameData
3838from .hero import HeroHolder , PetHolder
3939from .http import HTTPClient , BasicThrottler , BatchThrottler
4040from .iterators import (
@@ -1614,7 +1614,8 @@ async def get_league_named(self, league_name: str) -> Optional[League]:
16141614 """
16151615 return get (await self .search_leagues (), name = league_name )
16161616
1617- async def search_builder_base_leagues (self , * , limit : int = None , before : str = None , after : str = None ) -> List [League ]:
1617+ async def search_builder_base_leagues (self , * , limit : int = None , before : str = None , after : str = None )-> List [
1618+ BaseLeague ]:
16181619 """Get list of builder base leagues.
16191620
16201621 Parameters
@@ -1638,13 +1639,13 @@ async def search_builder_base_leagues(self, *, limit: int = None, before: str =
16381639
16391640 Returns
16401641 --------
1641- List[:class:`League `]
1642+ List[:class:`BaseLeague `]
16421643 The requested leagues.
16431644 """
16441645 data = await self .http .search_builder_base_leagues (limit = limit , before = before , after = after )
1645- return [League (data = n , client = self ) for n in data ["items" ]]
1646+ return [BaseLeague (data = n , client = self ) for n in data ["items" ]]
16461647
1647- async def get_builder_base_league (self , league_id : int ) -> League :
1648+ async def get_builder_base_league (self , league_id : int ) -> BaseLeague :
16481649 """
16491650 Get builder base league information
16501651
@@ -1667,13 +1668,13 @@ async def get_builder_base_league(self, league_id: int) -> League:
16671668
16681669 Returns
16691670 --------
1670- :class:`League `
1671+ :class:`BaseLeague `
16711672 The league with the requested ID
16721673 """
16731674 data = await self .http .get_builder_base_league (league_id )
1674- return League (data = data , client = self )
1675+ return BaseLeague (data = data , client = self )
16751676
1676- async def get_builder_base_league_named (self , league_name : str ) -> Optional [League ]:
1677+ async def get_builder_base_league_named (self , league_name : str ) -> Optional [BaseLeague ]:
16771678 """Get a builder base league by name.
16781679
16791680 This is somewhat equivalent to
@@ -1699,12 +1700,12 @@ async def get_builder_base_league_named(self, league_name: str) -> Optional[Leag
16991700
17001701 Returns
17011702 --------
1702- :class:`League `
1703+ :class:`BaseLeague `
17031704 The first league matching the league name. Could be ``None`` if not found.
17041705 """
17051706 return get (await self .search_builder_base_leagues (), name = league_name )
17061707
1707- async def search_war_leagues (self , * , limit : int = None , before : str = None , after : str = None ) -> List [League ]:
1708+ async def search_war_leagues (self , * , limit : int = None , before : str = None , after : str = None ) -> List [BaseLeague ]:
17081709 """Get list of war leagues.
17091710
17101711 Parameters
@@ -1728,13 +1729,13 @@ async def search_war_leagues(self, *, limit: int = None, before: str = None, aft
17281729
17291730 Returns
17301731 --------
1731- List[:class:`League `]
1732+ List[:class:`BaseLeague `]
17321733 The requested leagues.
17331734 """
17341735 data = await self .http .search_war_leagues (limit = limit , before = before , after = after )
1735- return [League (data = n , client = self ) for n in data ["items" ]]
1736+ return [BaseLeague (data = n , client = self ) for n in data ["items" ]]
17361737
1737- async def get_war_league (self , league_id : int ) -> League :
1738+ async def get_war_league (self , league_id : int ) -> BaseLeague :
17381739 """
17391740 Get war league information
17401741
@@ -1757,13 +1758,13 @@ async def get_war_league(self, league_id: int) -> League:
17571758
17581759 Returns
17591760 --------
1760- :class:`League `
1761+ :class:`BaseLeague `
17611762 The league with the requested ID
17621763 """
17631764 data = await self .http .get_war_league (league_id )
1764- return League (data = data , client = self )
1765+ return BaseLeague (data = data , client = self )
17651766
1766- async def get_war_league_named (self , league_name : str ) -> Optional [League ]:
1767+ async def get_war_league_named (self , league_name : str ) -> Optional [BaseLeague ]:
17671768 """Get a war league by name.
17681769
17691770 This is somewhat equivalent to
@@ -1789,12 +1790,12 @@ async def get_war_league_named(self, league_name: str) -> Optional[League]:
17891790
17901791 Returns
17911792 --------
1792- :class:`League `
1793+ :class:`BaseLeague `
17931794 The first league matching the league name. Could be ``None`` if not found.
17941795 """
17951796 return get (await self .search_war_leagues (), name = league_name )
17961797
1797- async def search_capital_leagues (self , * , limit : int = None , before : str = None , after : str = None ) -> List [League ]:
1798+ async def search_capital_leagues (self , * , limit : int = None , before : str = None , after : str = None ) -> List [BaseLeague ]:
17981799 """Get list of capital leagues.
17991800
18001801 Parameters
@@ -1818,13 +1819,13 @@ async def search_capital_leagues(self, *, limit: int = None, before: str = None,
18181819
18191820 Returns
18201821 --------
1821- List[:class:`League `]
1822+ List[:class:`BaseLeague `]
18221823 The requested leagues.
18231824 """
18241825 data = await self .http .search_capital_leagues (limit = limit , before = before , after = after )
1825- return [League (data = n , client = self ) for n in data ["items" ]]
1826+ return [BaseLeague (data = n , client = self ) for n in data ["items" ]]
18261827
1827- async def get_capital_league (self , league_id : int ) -> League :
1828+ async def get_capital_league (self , league_id : int ) -> BaseLeague :
18281829 """
18291830 Get capital league information
18301831
@@ -1847,13 +1848,13 @@ async def get_capital_league(self, league_id: int) -> League:
18471848
18481849 Returns
18491850 --------
1850- :class:`League `
1851+ :class:`BaseLeague `
18511852 The league with the requested ID
18521853 """
18531854 data = await self .http .get_capital_league (league_id )
1854- return League (data = data , client = self )
1855+ return BaseLeague (data = data , client = self )
18551856
1856- async def get_capital_league_named (self , league_name : str ) -> Optional [League ]:
1857+ async def get_capital_league_named (self , league_name : str ) -> Optional [BaseLeague ]:
18571858 """Get a capital league by name.
18581859
18591860 This is somewhat equivalent to
@@ -1879,7 +1880,7 @@ async def get_capital_league_named(self, league_name: str) -> Optional[League]:
18791880
18801881 Returns
18811882 --------
1882- :class:`League `
1883+ :class:`BaseLeague `
18831884 The first league matching the league name. Could be ``None`` if not found.
18841885 """
18851886 return get (await self .search_capital_leagues (), name = league_name )
0 commit comments