mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-08 14:54:47 +08:00
json.load[s] shouldn't return any results. fixed by overwriting the method
This commit is contained in:
@@ -124,4 +124,8 @@ _implemented = {
|
|||||||
'copy': _return_first_param,
|
'copy': _return_first_param,
|
||||||
'deepcopy': _return_first_param,
|
'deepcopy': _return_first_param,
|
||||||
},
|
},
|
||||||
|
'json': {
|
||||||
|
'load': lambda *args: [],
|
||||||
|
'loads': lambda *args: [],
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -133,10 +133,19 @@ hashlib.md5
|
|||||||
# -----------------
|
# -----------------
|
||||||
|
|
||||||
import copy
|
import copy
|
||||||
a = copy.deepcopy(1)
|
|
||||||
#? int()
|
#? int()
|
||||||
a
|
copy.deepcopy(1)
|
||||||
|
|
||||||
a = copy.copy()
|
|
||||||
#?
|
#?
|
||||||
a
|
copy.copy()
|
||||||
|
|
||||||
|
# -----------------
|
||||||
|
# json
|
||||||
|
# -----------------
|
||||||
|
|
||||||
|
# We don't want any results for json, because it depends on IO.
|
||||||
|
import json
|
||||||
|
#?
|
||||||
|
json.load('asdf')
|
||||||
|
#?
|
||||||
|
json.loads('[1]')
|
||||||
|
|||||||
Reference in New Issue
Block a user