2121# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2222# THE SOFTWARE.
2323
24- import io
2524import os
2625import stat
2726from itertools import islice
@@ -170,7 +169,7 @@ def reset(self):
170169 self .saved_line = ""
171170
172171 def load (self , filename , encoding ):
173- with io . open (
172+ with open (
174173 filename , "r" , encoding = encoding , errors = "ignore"
175174 ) as hfile :
176175 with FileLock (hfile , filename = filename ):
@@ -188,7 +187,7 @@ def save(self, filename, encoding, lines=0):
188187 os .O_WRONLY | os .O_CREAT | os .O_TRUNC ,
189188 stat .S_IRUSR | stat .S_IWUSR ,
190189 )
191- with io . open (fd , "w" , encoding = encoding , errors = "ignore" ) as hfile :
190+ with open (fd , "w" , encoding = encoding , errors = "ignore" ) as hfile :
192191 with FileLock (hfile , filename = filename ):
193192 self .save_to (hfile , self .entries , lines )
194193
@@ -209,7 +208,7 @@ def append_reload_and_write(self, s, filename, encoding):
209208 os .O_APPEND | os .O_RDWR | os .O_CREAT ,
210209 stat .S_IRUSR | stat .S_IWUSR ,
211210 )
212- with io . open (fd , "a+" , encoding = encoding , errors = "ignore" ) as hfile :
211+ with open (fd , "a+" , encoding = encoding , errors = "ignore" ) as hfile :
213212 with FileLock (hfile , filename = filename ):
214213 # read entries
215214 hfile .seek (0 , os .SEEK_SET )
0 commit comments