File tree Expand file tree Collapse file tree 5 files changed +13
-7
lines changed
Expand file tree Collapse file tree 5 files changed +13
-7
lines changed Original file line number Diff line number Diff line change 11# Change Log
22All notable changes to this project will be documented in this file.
33
4+ ## [ 2.1.10] - 12/13/18
5+ - Fix any data that involves a list (Leaderboard)
6+
47## [ 2.1.9] - 12/11/18
58## Added
69- ` get_datetime ` function for easier date and time conversions
Original file line number Diff line number Diff line change 77############
88
99
10- __version__ = 'v2.1.9 '
10+ __version__ = 'v2.1.10 '
1111__title__ = 'brawlstats'
1212__license__ = 'MIT'
1313__author__ = 'SharpBit'
Original file line number Diff line number Diff line change @@ -41,9 +41,9 @@ def __getattr__(self, attr):
4141
4242 def __getitem__ (self , item ):
4343 try :
44- return getattr ( self ._boxed_data , item )
45- except AttributeError :
46- raise KeyError ('No such key : {}' .format (item ))
44+ return self ._boxed_data [ item ]
45+ except IndexError :
46+ raise IndexError ('No such index : {}' .format (item ))
4747
4848
4949class Client :
@@ -305,7 +305,7 @@ def get_full(self):
305305 """
306306 Gets the full club statistics.
307307
308- Returns club
308+ Returns Club
309309 """
310310 return self .client .get_club (self .tag )
311311
@@ -327,6 +327,9 @@ class Leaderboard(BaseBox):
327327 Returns a player or club leaderboard that contains a list of players or clubs.
328328 """
329329
330+ def __len__ (self ):
331+ return sum (1 for i in self )
332+
330333 def __repr__ (self ):
331334 return "<Leaderboard object count={}>" .format (len (self ))
332335
Original file line number Diff line number Diff line change 2626# The short X.Y version
2727version = '2.1'
2828# The full version, including alpha/beta/rc tags
29- release = '2.1.9 '
29+ release = '2.1.10 '
3030
3131
3232# -- General configuration ---------------------------------------------------
Original file line number Diff line number Diff line change 55
66setup (
77 name = 'brawlstats' ,
8- version = '2.1.9 ' ,
8+ version = '2.1.10 ' ,
99 description = 'An async Python API wrapper for the unofficial Brawl Stars API' ,
1010 long_description = long_description ,
1111 long_description_content_type = 'text/x-rst' ,
You can’t perform that action at this time.
0 commit comments