diff options
author | shadchin <shadchin@yandex-team.ru> | 2022-02-10 16:44:30 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:44:30 +0300 |
commit | 2598ef1d0aee359b4b6d5fdd1758916d5907d04f (patch) | |
tree | 012bb94d777798f1f56ac1cec429509766d05181 /contrib/tools/python3/src/Lib/encodings | |
parent | 6751af0b0c1b952fede40b19b71da8025b5d8bcf (diff) | |
download | ydb-2598ef1d0aee359b4b6d5fdd1758916d5907d04f.tar.gz |
Restoring authorship annotation for <shadchin@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'contrib/tools/python3/src/Lib/encodings')
6 files changed, 21 insertions, 21 deletions
diff --git a/contrib/tools/python3/src/Lib/encodings/__init__.py b/contrib/tools/python3/src/Lib/encodings/__init__.py index ddd5afdcf2..987fcfd9ba 100644 --- a/contrib/tools/python3/src/Lib/encodings/__init__.py +++ b/contrib/tools/python3/src/Lib/encodings/__init__.py @@ -12,7 +12,7 @@ * getregentry() -> codecs.CodecInfo object The getregentry() API must return a CodecInfo object with encoder, decoder, incrementalencoder, incrementaldecoder, streamwriter and streamreader - attributes which adhere to the Python Codec Interface Standard. + attributes which adhere to the Python Codec Interface Standard. In addition, a module may optionally also define the following APIs which are then used by the package's codec search function: @@ -49,7 +49,7 @@ def normalize_encoding(encoding): collapsed and replaced with a single underscore, e.g. ' -;#' becomes '_'. Leading and trailing underscores are removed. - Note that encoding names should be ASCII only. + Note that encoding names should be ASCII only. """ if isinstance(encoding, bytes): diff --git a/contrib/tools/python3/src/Lib/encodings/aliases.py b/contrib/tools/python3/src/Lib/encodings/aliases.py index d85afd6d5c..6bd41ed289 100644 --- a/contrib/tools/python3/src/Lib/encodings/aliases.py +++ b/contrib/tools/python3/src/Lib/encodings/aliases.py @@ -266,8 +266,8 @@ aliases = { 'roman8' : 'hp_roman8', 'r8' : 'hp_roman8', 'csHPRoman8' : 'hp_roman8', - 'cp1051' : 'hp_roman8', - 'ibm1051' : 'hp_roman8', + 'cp1051' : 'hp_roman8', + 'ibm1051' : 'hp_roman8', # hz codec 'hzgb' : 'hz', @@ -450,7 +450,7 @@ aliases = { # mac_latin2 codec 'maccentraleurope' : 'mac_latin2', - 'mac_centeuro' : 'mac_latin2', + 'mac_centeuro' : 'mac_latin2', 'maclatin2' : 'mac_latin2', # mac_roman codec @@ -534,7 +534,7 @@ aliases = { 'utf8' : 'utf_8', 'utf8_ucs2' : 'utf_8', 'utf8_ucs4' : 'utf_8', - 'cp65001' : 'utf_8', + 'cp65001' : 'utf_8', # uu_codec codec 'uu' : 'uu_codec', diff --git a/contrib/tools/python3/src/Lib/encodings/punycode.py b/contrib/tools/python3/src/Lib/encodings/punycode.py index 1c57264470..414dc76a0a 100644 --- a/contrib/tools/python3/src/Lib/encodings/punycode.py +++ b/contrib/tools/python3/src/Lib/encodings/punycode.py @@ -143,7 +143,7 @@ def decode_generalized_number(extended, extpos, bias, errors): digit = char - 22 # 0x30-26 elif errors == "strict": raise UnicodeError("Invalid extended code point '%s'" - % extended[extpos-1]) + % extended[extpos-1]) else: return extpos, None t = T(j, bias) diff --git a/contrib/tools/python3/src/Lib/encodings/raw_unicode_escape.py b/contrib/tools/python3/src/Lib/encodings/raw_unicode_escape.py index 46c8e070dd..a38a0de778 100644 --- a/contrib/tools/python3/src/Lib/encodings/raw_unicode_escape.py +++ b/contrib/tools/python3/src/Lib/encodings/raw_unicode_escape.py @@ -21,16 +21,16 @@ class IncrementalEncoder(codecs.IncrementalEncoder): def encode(self, input, final=False): return codecs.raw_unicode_escape_encode(input, self.errors)[0] -class IncrementalDecoder(codecs.BufferedIncrementalDecoder): - def _buffer_decode(self, input, errors, final): - return codecs.raw_unicode_escape_decode(input, errors, final) +class IncrementalDecoder(codecs.BufferedIncrementalDecoder): + def _buffer_decode(self, input, errors, final): + return codecs.raw_unicode_escape_decode(input, errors, final) class StreamWriter(Codec,codecs.StreamWriter): pass class StreamReader(Codec,codecs.StreamReader): - def decode(self, input, errors='strict'): - return codecs.raw_unicode_escape_decode(input, errors, False) + def decode(self, input, errors='strict'): + return codecs.raw_unicode_escape_decode(input, errors, False) ### encodings module API diff --git a/contrib/tools/python3/src/Lib/encodings/unicode_escape.py b/contrib/tools/python3/src/Lib/encodings/unicode_escape.py index 9b1ce99b33..0d75604ee0 100644 --- a/contrib/tools/python3/src/Lib/encodings/unicode_escape.py +++ b/contrib/tools/python3/src/Lib/encodings/unicode_escape.py @@ -21,16 +21,16 @@ class IncrementalEncoder(codecs.IncrementalEncoder): def encode(self, input, final=False): return codecs.unicode_escape_encode(input, self.errors)[0] -class IncrementalDecoder(codecs.BufferedIncrementalDecoder): - def _buffer_decode(self, input, errors, final): - return codecs.unicode_escape_decode(input, errors, final) +class IncrementalDecoder(codecs.BufferedIncrementalDecoder): + def _buffer_decode(self, input, errors, final): + return codecs.unicode_escape_decode(input, errors, final) class StreamWriter(Codec,codecs.StreamWriter): pass class StreamReader(Codec,codecs.StreamReader): - def decode(self, input, errors='strict'): - return codecs.unicode_escape_decode(input, errors, False) + def decode(self, input, errors='strict'): + return codecs.unicode_escape_decode(input, errors, False) ### encodings module API diff --git a/contrib/tools/python3/src/Lib/encodings/uu_codec.py b/contrib/tools/python3/src/Lib/encodings/uu_codec.py index 4e58c62fe9..350b5f7a4f 100644 --- a/contrib/tools/python3/src/Lib/encodings/uu_codec.py +++ b/contrib/tools/python3/src/Lib/encodings/uu_codec.py @@ -20,10 +20,10 @@ def uu_encode(input, errors='strict', filename='<data>', mode=0o666): read = infile.read write = outfile.write - # Remove newline chars from filename - filename = filename.replace('\n','\\n') - filename = filename.replace('\r','\\r') - + # Remove newline chars from filename + filename = filename.replace('\n','\\n') + filename = filename.replace('\r','\\r') + # Encode write(('begin %o %s\n' % (mode & 0o777, filename)).encode('ascii')) chunk = read(45) |