diff options
author | Andrew Kuchling <amk@amk.ca> | 2013-11-11 02:45:24 (GMT) |
---|---|---|
committer | Andrew Kuchling <amk@amk.ca> | 2013-11-11 02:45:24 (GMT) |
commit | 695f07b27b7d074274f9fec715345175cd6d569c (patch) | |
tree | 688542e37e233d9129dce61a01634f7b64cd68ce /Tools | |
parent | 77796e4f7ad300af9b8db30f958694e12b7b09ce (diff) | |
download | cpython-695f07b27b7d074274f9fec715345175cd6d569c.zip cpython-695f07b27b7d074274f9fec715345175cd6d569c.tar.gz cpython-695f07b27b7d074274f9fec715345175cd6d569c.tar.bz2 |
Fix some PEP8-formatting problems in the generated code
Diffstat (limited to 'Tools')
-rw-r--r-- | Tools/unicode/gencodec.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/Tools/unicode/gencodec.py b/Tools/unicode/gencodec.py index f5a1af3..f4c7c03 100644 --- a/Tools/unicode/gencodec.py +++ b/Tools/unicode/gencodec.py @@ -290,27 +290,27 @@ import codecs class Codec(codecs.Codec): - def encode(self,input,errors='strict'): - return codecs.charmap_encode(input,errors,encoding_%s) + def encode(self, input, errors='strict'): + return codecs.charmap_encode(input, errors, encoding_%s) - def decode(self,input,errors='strict'): - return codecs.charmap_decode(input,errors,decoding_%s) + def decode(self, input, errors='strict'): + return codecs.charmap_decode(input, errors, decoding_%s) ''' % (encodingname, name, suffix, suffix)] l.append('''\ class IncrementalEncoder(codecs.IncrementalEncoder): def encode(self, input, final=False): - return codecs.charmap_encode(input,self.errors,encoding_%s)[0] + return codecs.charmap_encode(input, self.errors, encoding_%s)[0] class IncrementalDecoder(codecs.IncrementalDecoder): def decode(self, input, final=False): - return codecs.charmap_decode(input,self.errors,decoding_%s)[0]''' % + return codecs.charmap_decode(input, self.errors, decoding_%s)[0]''' % (suffix, suffix)) l.append(''' -class StreamWriter(Codec,codecs.StreamWriter): +class StreamWriter(Codec, codecs.StreamWriter): pass -class StreamReader(Codec,codecs.StreamReader): +class StreamReader(Codec, codecs.StreamReader): pass ### encodings module API @@ -343,7 +343,7 @@ def getregentry(): if decoding_table_code: l.append(''' ### Encoding table -encoding_table=codecs.charmap_build(decoding_table) +encoding_table = codecs.charmap_build(decoding_table) ''') else: l.append(''' |