openlibrary icon indicating copy to clipboard operation
openlibrary copied to clipboard

Add typehints in openlibrary.accounts module

Open yivgen opened this issue 1 year ago • 1 comments

Related to #8028

Adds typehints to openlibrary.accounts module

Technical

Testing

Screenshot

Stakeholders

@scottbarnes

yivgen avatar Aug 28 '24 16:08 yivgen

Hi! I've been very busy for the past few days but I can continue working on this now

yivgen avatar Aug 28 '24 16:08 yivgen

Also monkeytype suggests adding typehints in ReadingLog innit like so:

def __init__(self, user: User | None = ...) -> None:

but then self.user could hypothetically be None but that wouldn't work with a lot of the methods like lists, booknotes_counts, reading_log_counts, count_shelf and get_works And I'm not sure what to do about that

yivgen avatar Aug 29 '24 16:08 yivgen

Thanks for this, @yivgen!

scottbarnes avatar Sep 10 '24 04:09 scottbarnes