mirror of
https://github.com/davidhalter/jedi.git
synced 2026-10-22 22:17:05 +08:00
json.load[s] shouldn't return any results. fixed by overwriting the method
This commit is contained in:
1 parent
cf1fd691da
commit
7d73e571bb
2 files changed
+17
-4
No files matched your search
@@ -124,4 +124,8 @@ _implemented = {
|
||||
'copy': _return_first_param,
|
||||
'deepcopy': _return_first_param,
|
||||
},
|
||||
'json': {
|
||||
'load': lambda *args: [],
|
||||
'loads': lambda *args: [],
|
||||
},
|
||||
}
|
||||
@@ -133,10 +133,19 @@ hashlib.md5
|
||||
# -----------------
|
||||
|
||||
import copy
|
||||
a = copy.deepcopy(1)
|
||||
#? 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