Closed wfordh closed 8 months ago
I opted for changing as little as possible for now to not introduce any sort of breaking changes for users before the season. Streamlined some by replacing try / except
clauses with the Python dictionary's built-in get()
method. Otherwise just adding the warning and docstrings for each method.
Gonna go ahead and merge - looks like I can do that without an approval since the base branch isn't master / main. Will make a PR then for merging into main and will need an approval there
Wanted to get this up here even though it's not 100% ready yet. Addresses issue #18. Using my
add_type_hints
branch from PR #19 instead of main since it works off of that.I added a logger warning since the Stats API is not technically documented / supported on Sleeper anymore. I also reworked a bunch of the methods and added some attributes to the class so that the stats that are pulled are stored directly in it and not an external object like before. That seems like better OOP to me, but I might be wrong. Added
KeyError
to the try / except clauses to not make them overly broad.Some open questions I still have include
User
andLeague
classes, but notPlayers
. Maybe that's due to the size of the data that comes in for players and stats? Right now I think I'd lean don't pull the stats._
prefix