Browse Source

Correct comment according to framework

Guénaël Muller 6 years ago
parent
commit
f0289fb306
2 changed files with 5 additions and 5 deletions
  1. 2 2
      example/fake_api/flask_api.py
  2. 3 3
      example/fake_api/pyramid_api.py

+ 2 - 2
example/fake_api/flask_api.py View File

95
 
95
 
96
         # TODO - G.M - 2017-12-05 - Add better
96
         # TODO - G.M - 2017-12-05 - Add better
97
         #  way to doc response of this function, using response object ?
97
         #  way to doc response of this function, using response object ?
98
-        # return bottle.Response(
98
+        # return flask.Response(
99
         #     status=204,
99
         #     status=204,
100
         # )
100
         # )
101
         raise NoContentException
101
         raise NoContentException
102
 
102
 
103
-    def bind(self, app:flask.Flask):
103
+    def bind(self, app: flask.Flask):
104
         app.add_url_rule('/about',
104
         app.add_url_rule('/about',
105
                          view_func=self.about)
105
                          view_func=self.about)
106
         app.add_url_rule('/users',
106
         app.add_url_rule('/users',

+ 3 - 3
example/fake_api/pyramid_api.py View File

1
 # -*- coding: utf-8 -*-
1
 # -*- coding: utf-8 -*-
2
 import json
2
 import json
3
 from http import HTTPStatus
3
 from http import HTTPStatus
4
-
4
+from pyramid.response import Response
5
 from pyramid.config import Configurator
5
 from pyramid.config import Configurator
6
 from wsgiref.simple_server import make_server
6
 from wsgiref.simple_server import make_server
7
 import time
7
 import time
96
 
96
 
97
         # TODO - G.M - 2017-12-05 - Add better
97
         # TODO - G.M - 2017-12-05 - Add better
98
         #  way to doc response of this function, using response object ?
98
         #  way to doc response of this function, using response object ?
99
-        # return bottle.Response(
100
-        #     status=204,
99
+        # return Response(
100
+        #     status_code=204,
101
         # )
101
         # )
102
         raise NoContentException
102
         raise NoContentException
103
 
103