Yelp / bravado-core

Other
109 stars 98 forks source link

Typing annotations: resource and operation #373

Closed macisamuele closed 4 years ago

macisamuele commented 4 years ago

The goal of this PR is to fully type the bravado_core.operation and bravado_core.resource modules.

In order to achieve proper typing I had to update the implementation of the __repr__ methods as they were returning unicode strings while object.__repr__ expect strings (this applies only to python 2).

I thought that adding the condition over the python version would be the best way of dealing with the issue instead of dropping an effective (but unsightly) type: ignore

coveralls commented 4 years ago

Coverage Status

Coverage decreased (-0.05%) to 99.112% when pulling a693219c116f98eff0c7567b126550293428bcab on macisamuele:maci-resource-operation-typing-annotation into ebaaae52319669ef75be54cada8c48671c0877e5 on Yelp:master.