httpdomain: autoflask directive does not behave correctly with class-based views

jfinkels avatarjfinkels created an issue

The `autoflask` directive does not behave correctly when endpoints are created as methods on a subclass of the `MethodView` class.

For example, if one creates endpoints like this in a module called ``

class SomeClass(MethodView):
    """Class-level documentation."""

    def get(self, photoid):
        """GET method documentation."""

    def post(self, photoid):
        """POST method documentation."""

app = Flask('someapp')
app.add_url_rule('/someendpoint', view_func=SomeClass.as_view('somename'))

and documentation like this in a `someapp.rst` file (along with the other files necessary for Sphinx to run correctly)

Some app

.. autoflask:: someapp:app

the documentation generated by Sphinx will show a listing for each of the methods (GET and POST), but the documentation beneath each method will be

Class-level documentation.

instead of the corresponding method-level documentation.

Class-based views (such as the `MethodView` class) were new in Flask version 0.7 (see the API documentation at ).

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.