author | Edouard Tisserant |
Fri, 12 Jul 2019 11:51:47 +0200 | |
changeset 2622 | e10a1095f577 |
parent 1881 | 091005ec69c4 |
permissions | -rw-r--r-- |
1872
866fb3ab8778
fix pylint error "(undefined-variable) Undefined variable 'X'"
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1869
diff
changeset
|
1 |
# pylint: disable=undefined-variable |
866fb3ab8778
fix pylint error "(undefined-variable) Undefined variable 'X'"
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1869
diff
changeset
|
2 |
|
1881
091005ec69c4
fix pylint py3k conversion warning: "(no-absolute-import) import missing `from __future__ import absolute_import`"
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1872
diff
changeset
|
3 |
from __future__ import absolute_import |
1869
49cdd843c006
fix pylint error '(import-error) Unable to import X'
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1748
diff
changeset
|
4 |
from svgui.pyjs.jsonrpc.jsonrpc import JSONRPCServiceBase |
371 | 5 |
|
1736
7e61baa047f0
clean-up: fix PEP8 E302 expected 2 blank lines, found 1
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
728
diff
changeset
|
6 |
|
371 | 7 |
class JSONRPCService(JSONRPCServiceBase): |
8 |
||
9 |
def serve(self): |
|
10 |
return self.process(request.body.read()) |
|
11 |
||
1740
b789b695b5c6
clean-up: fix PEP8 E231 missing whitespace after ':' or ','
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1736
diff
changeset
|
12 |
def __call__(self, func): |
1742
92932cd370a4
clean-up: fix PEP8 E225 missing whitespace around operator
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1740
diff
changeset
|
13 |
self.methods[func.__name__] = func |
371 | 14 |
return func |