Skip to content

Commit

Permalink
[fix] pycodestyle
Browse files Browse the repository at this point in the history
  • Loading branch information
ComingToy committed Sep 17, 2018
1 parent 8871eda commit 14442a6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions autopep8.py
Original file line number Diff line number Diff line change
Expand Up @@ -4010,7 +4010,8 @@ def wrap_output(output, encoding):


def wrap_input(input, encoding):
return codecs.getreader(encoding)(input.buffer if hasattr(input, 'buffer') else input)
reader_getter = codecs.getreader(encoding)
return reader_getter(input.buffer if hasattr(input, 'buffer') else input)


def get_encoding():
Expand Down Expand Up @@ -4050,7 +4051,8 @@ def main(argv=None, apply_config=True):
bytes_stdin_io = io.BytesIO(data)

# detect encoding dynamic
input_encoding = lib2to3_tokenize.detect_encoding(bytes_stdin_io.readline)[0]
input_encoding = \
lib2to3_tokenize.detect_encoding(bytes_stdin_io.readline)[0]
output_encoding = sys.stdin.encoding or get_encoding()

bytes_stdin_io = io.BytesIO(data)
Expand Down

0 comments on commit 14442a6

Please sign in to comment.