1
0
forked from VimPlug/jedi

Some more code quality fixes

This commit is contained in:
Dave Halter
2020-04-11 02:23:23 +02:00
parent bdd4deedc1
commit 02c3d651bd
11 changed files with 10 additions and 22 deletions
+1 -2
View File
@@ -63,7 +63,6 @@ only *inferes* what needs to be *inferred*. All the statements and modules
that are not used are just being ignored.
"""
import parso
from parso import python_bytes_to_unicode
from jedi.file_io import FileIO
from jedi import debug
@@ -186,7 +185,7 @@ class InferenceState(object):
file_io = FileIO(path)
code = file_io.read()
# We cannot just use parso, because it doesn't use errors='replace'.
code = python_bytes_to_unicode(code, encoding=encoding, errors='replace')
code = parso.python_bytes_to_unicode(code, encoding=encoding, errors='replace')
if len(code) > settings._cropped_file_size:
code = code[:settings._cropped_file_size]