Remove some weird code

This commit is contained in:
Dave Halter
2020-07-24 01:33:34 +02:00
parent 44c0395113
commit 020b2861df
2 changed files with 0 additions and 11 deletions

View File

@@ -14,14 +14,6 @@ except NameError:
is_pypy = platform.python_implementation() == 'PyPy'
try:
encoding = sys.stdout.encoding
if encoding is None:
encoding = 'utf-8'
except AttributeError:
encoding = 'ascii'
def u(string):
"""Cast to unicode DAMMIT!
Written because Python2 repr always implicitly casts to a string, so we

View File

@@ -1,7 +1,6 @@
import sys
from abc import abstractmethod, abstractproperty
from parso._compatibility import encoding
from parso.utils import split_lines
@@ -334,8 +333,6 @@ class BaseNode(NodeOrLeaf):
def __repr__(self):
code = self.get_code().replace('\n', ' ').replace('\r', ' ').strip()
if not sys.version_info.major >= 3:
code = code.encode(encoding, 'replace')
return "<%s: %s@%s,%s>" % \
(type(self).__name__, code, self.start_pos[0], self.start_pos[1])