kopia lustrzana https://github.com/c9/core
speed up,only "function" need "params"
when type is "module" or "class", then throw error , is very slowlypull/125/merge
rodzic
43b87cbe15
commit
bdda3f6fa7
|
@ -50,11 +50,12 @@ class Daemon(BaseHTTPRequestHandler):
|
|||
def to_json(mode, nodoc):
|
||||
include_pos = mode == "goto_definitions"
|
||||
def to_json(c):
|
||||
try:
|
||||
paramList = { p.description for p in c.params }
|
||||
params = ", ".join([p for p in paramList if p != None and p != "self"])
|
||||
except:
|
||||
params = ""
|
||||
if c.type == "function":
|
||||
try:
|
||||
paramList = { p.description for p in c.params }
|
||||
params = ", ".join([p for p in paramList if p != None and p != "self"])
|
||||
except:
|
||||
params = ""
|
||||
return remove_nulls({
|
||||
"name": c.name + ("(" + params + ")" if c.type == "function" else ""),
|
||||
"replaceText": c.name + "(^^)" if c.type == "function" else None,
|
||||
|
@ -95,4 +96,4 @@ if __name__ == "__main__":
|
|||
parser.add_argument("--port", type=int, help="The port for the daemon to listen on")
|
||||
parser.add_argument("--nodoc", help="Don't include docstrings in output")
|
||||
args = parser.parse_args()
|
||||
main(args)
|
||||
main(args)
|
||||
|
|
Ładowanie…
Reference in New Issue