Yelp / bravado

Bravado is a python client library for Swagger 2.0 services
Other
604 stars 117 forks source link

rtypes for SwaggerClient.from_url and SwaggerClient.from_spec #422

Closed aviskase closed 5 years ago

aviskase commented 5 years ago

Is there any reason why SwaggerClient.from_url and SwaggerClient.from_spec have Spec as return type instead of SwaggerClient ?

https://github.com/Yelp/bravado/blob/384db8ae6e3950edc7cfeb2ba68c50273ceedcd7/bravado/client.py#L120

https://github.com/Yelp/bravado/blob/384db8ae6e3950edc7cfeb2ba68c50273ceedcd7/bravado/client.py#L91

If it's a bug, I can do a pull request, but as I understand with #403 there is a possibility that someone is already working on adding and fixing typing for client?

macisamuele commented 5 years ago

@aviskase That's definitely a bug in the type hints provided in the doc strings. As you noticed I was working on a branch to provide more consistent type checking, but I got not enough time to cross-check the whole library (including docstrings).

If you could open a PR that would be really great ;)