Clean up for publish to pypi

This commit is contained in:
Cristi Vîjdea
2017-12-12 22:56:35 +01:00
parent 8883894775
commit 71b3fd2895
7 changed files with 56 additions and 26 deletions
+8 -1
View File
@@ -1,4 +1,11 @@
# coding=utf-8
from pkg_resources import get_distribution, DistributionNotFound
__author__ = """Cristi V."""
__email__ = 'cristi@cvjd.me'
__version__ = '1.0.0rc1'
try:
__version__ = get_distribution(__name__).version
except DistributionNotFound:
# package is not installed
pass
+2 -2
View File
@@ -178,8 +178,8 @@ class OpenAPISchemaGenerator(object):
# Attempt to infer a field description if possible.
try:
model_field = model._meta.get_field(variable)
except Exception:
model_field = None # pragma: no cover
except Exception: # pragma: no cover
model_field = None
if model_field is not None and model_field.help_text:
description = force_text(model_field.help_text)