author | Edouard Tisserant |
Fri, 08 Oct 2021 09:11:55 +0200 | |
changeset 3334 | d7e0ddb5974b |
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 |