mirror of
https://github.com/davidhalter/jedi.git
synced 2026-03-05 07:14:15 +08:00
changing completion of python file objects
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
class TextIOWrapper():
|
||||
def __next__(self):
|
||||
return ''
|
||||
return 'hacked io return'
|
||||
|
||||
@@ -45,6 +45,15 @@ class xrange():
|
||||
return 1
|
||||
|
||||
|
||||
def open(file, mode='r', buffering=-1, encoding=None, errors=None, newline=None, closefd=True):
|
||||
import io
|
||||
return io.TextIOWrapper(file, mode, buffering, encoding, errors, newline, closefd)
|
||||
|
||||
|
||||
def open_python2(name, mode=None, buffering=None):
|
||||
return file(name, mode, buffering)
|
||||
|
||||
|
||||
#--------------------------------------------------------
|
||||
# descriptors
|
||||
#--------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user