Yelp / bravado-core

Other
109 stars 98 forks source link

Add typing support #314

Closed macisamuele closed 4 years ago

macisamuele commented 5 years ago

This is a WIP PR with branch based on #313 (so normalise_uri changes will be reviewed elsewhere)

I've added typing to few files where typing was really straight forward and on Spec mostly because it will be required as soon as request, response, resource, operation and basically everything will be typed.

Next steps will be to provide typing information to bravado_core.response but I would like to split it in multiple PRs as this looks already big 😃

coveralls commented 5 years ago

Coverage Status

Coverage decreased (-0.04%) to 98.297% when pulling 9ab2c8285065d1561184fe0b11bb368f9775b34a on macisamuele:typing into cde813a6b89e2cf8322e0ad737f294955a512bad on Yelp:master.

macisamuele commented 5 years ago

This PR has to be rebased on master as #313 has been dropped. Additionally we need to identify a valid approach to deal with the HttpClientProtocol. Currently the best approach might be defining the protocol as an abstract class in bravado_core and update bravado to use it as base class for https://github.com/Yelp/bravado/blob/384db8ae6e3950edc7cfeb2ba68c50273ceedcd7/bravado/http_client.py#L12-L15

macisamuele commented 4 years ago

I'm closing this PR as a lot of progress has been done already on the codebase and as it is in a very un-mergeable state.

I'll be providing a new PR with typing for almost all the modules where the most complex ones (ie. where in this PR was defined the typing.Protocol) are not included such that we can provide some typing information earlier.