Skip to content

Commit

Permalink
Merge pull request #99 from deep-compute/bugfix-union-type-casting-ap…
Browse files Browse the repository at this point in the history
…i-doc-error

fixed bug with typing return types
  • Loading branch information
jaswanth098 authored Oct 31, 2019
2 parents 2731473 + 969bb51 commit 4b0c009
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ deploy:
- LICENSE
- kwikapi/api.py
- kwikapi/__init__.py
name: kwikapi-0.5.10
tag_name: 0.5.10
name: kwikapi-0.5.11
tag_name: 0.5.11
true:
repo: deep-compute/kwikapi
- provider: pypi
Expand Down
8 changes: 7 additions & 1 deletion kwikapi/apidoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,13 @@ def _type_str(self, t):
if t is None:
return str(None)

return t.__name__
if hasattr(t, "__name__"):
return t.__name__
else:
try:
return t.__repr__()
except Exception:
return "Unknown"

def apidoc(self, version: str = None, namespace: str = None) -> dict:
versions = {}
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from setuptools import setup, find_packages

version = "0.5.10"
version = "0.5.11"
setup(
name="kwikapi",
version=version,
Expand Down

0 comments on commit 4b0c009

Please sign in to comment.