Commits

drsm79 committed 8d089df

Add better support for doc strings in MethodView's

  • Participants
  • Parent commits a09f29f

Comments (0)

Files changed (1)

File httpdomain/sphinxcontrib/autohttp/flask.py

                 continue
             view = app.view_functions[endpoint]
             docstring = view.__doc__ or ''
+            if hasattr(view, 'view_class'):
+                meth_func = getattr(view.view_class, method.lower(), None)
+                if meth_func and meth_func.__doc__:
+                    docstring = meth_func.__doc__
             if not isinstance(docstring, unicode):
                 analyzer = ModuleAnalyzer.for_module(view.__module__)
                 docstring = force_decode(docstring, analyzer.encoding)