mollie / mollie-api-python

Mollie API client for Python
http://www.mollie.com
BSD 2-Clause "Simplified" License
113 stars 55 forks source link

Enable mypy 'check_untyped_defs' #286

Closed whyscream closed 1 year ago

whyscream commented 1 year ago

This uncovers various issues with the implementation of get_resource_class(). Now we have mypy passing and the code should work in theory, but the only place where this method is used (in ObjectList), already shows clearly that the current approach won't work.

We need to rethink the way ObjectList works, and hopefully get rid of get_resource_class() entirely.

For now: the code stays the same, but with working type annotations.