[pre-commit.ci lite] apply automatic fixes
This commit is contained in:
parent
1ae3ad92c4
commit
5ed4b162da
45 changed files with 840 additions and 784 deletions
|
|
@ -383,4 +383,3 @@ BIG5_CHAR_TO_FREQ_ORDER = (
|
|||
890,3669,3943,5791,1878,3798,3439,5792,2186,2358,3440,1652,5793,5794,5795, 941, # 5360
|
||||
2299, 208,3546,4161,2020, 330,4438,3944,2906,2499,3799,4439,4811,5796,5797,5798, # 5376
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -242,5 +242,3 @@ ISO2022KR_SM_MODEL = {'class_table': ISO2022KR_CLS,
|
|||
'char_len_table': ISO2022KR_CHAR_LEN_TABLE,
|
||||
'name': "ISO-2022-KR",
|
||||
'language': 'Korean'}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -192,4 +192,3 @@ EUCKR_CHAR_TO_FREQ_ORDER = (
|
|||
2629,2630,2631, 924, 648, 863, 603,2632,2633, 934,1540, 864, 865,2634, 642,1042,
|
||||
670,1190,2635,2636,2637,2638, 168,2639, 652, 873, 542,1054,1541,2640,2641,2642, # 512, 256
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -384,4 +384,3 @@ EUCTW_CHAR_TO_FREQ_ORDER = (
|
|||
890,3614,3864,8110,1877,3732,3402,8111,2183,2353,3403,1652,8112,8113,8114, 941, # 8086
|
||||
2294, 208,3499,4057,2019, 330,4294,3865,2892,2492,3733,4295,8115,8116,8117,8118, # 8102
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -280,4 +280,3 @@ GB2312_CHAR_TO_FREQ_ORDER = (
|
|||
381,1638,4592,1020, 516,3214, 458, 947,4575,1432, 211,1514,2926,1865,2142, 189,
|
||||
852,1221,1400,1486, 882,2299,4036, 351, 28,1122, 700,6479,6480,6481,6482,6483, #last 512
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -321,5 +321,3 @@ JIS_CHAR_TO_FREQ_ORDER = (
|
|||
1444,1698,2385,2251,3729,1365,2281,2235,1717,6188, 864,3841,2515, 444, 527,2767, # 4352
|
||||
2922,3625, 544, 461,6189, 566, 209,2437,3398,2098,1065,2068,3331,3626,3257,2137, # 4368 #last 512
|
||||
)
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -229,5 +229,3 @@ class EUCJPContextAnalysis(JapaneseContextAnalysis):
|
|||
return second_char - 0xA1, char_len
|
||||
|
||||
return -1, char_len
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -4647,4 +4647,3 @@ WINDOWS_1251_BULGARIAN_MODEL = SingleByteCharSetModel(charset_name='windows-1251
|
|||
typical_positive_ratio=0.969392,
|
||||
keep_ascii_letters=False,
|
||||
alphabet='АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЬЮЯабвгдежзийклмнопрстуфхцчшщъьюя')
|
||||
|
||||
|
|
|
|||
|
|
@ -4395,4 +4395,3 @@ ISO_8859_7_GREEK_MODEL = SingleByteCharSetModel(charset_name='ISO-8859-7',
|
|||
typical_positive_ratio=0.982851,
|
||||
keep_ascii_letters=False,
|
||||
alphabet='ΆΈΉΊΌΎΏΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩάέήίαβγδεζηθικλμνξοπρςστυφχψωόύώ')
|
||||
|
||||
|
|
|
|||
|
|
@ -4380,4 +4380,3 @@ WINDOWS_1255_HEBREW_MODEL = SingleByteCharSetModel(charset_name='windows-1255',
|
|||
typical_positive_ratio=0.984004,
|
||||
keep_ascii_letters=False,
|
||||
alphabet='אבגדהוזחטיךכלםמןנסעףפץצקרשתװױײ')
|
||||
|
||||
|
|
|
|||
|
|
@ -4647,4 +4647,3 @@ ISO_8859_2_HUNGARIAN_MODEL = SingleByteCharSetModel(charset_name='ISO-8859-2',
|
|||
typical_positive_ratio=0.947368,
|
||||
keep_ascii_letters=True,
|
||||
alphabet='ABCDEFGHIJKLMNOPRSTUVZabcdefghijklmnoprstuvzÁÉÍÓÖÚÜáéíóöúüŐőŰű')
|
||||
|
||||
|
|
|
|||
|
|
@ -5715,4 +5715,3 @@ ISO_8859_5_RUSSIAN_MODEL = SingleByteCharSetModel(charset_name='ISO-8859-5',
|
|||
typical_positive_ratio=0.976601,
|
||||
keep_ascii_letters=False,
|
||||
alphabet='ЁАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюяё')
|
||||
|
||||
|
|
|
|||
|
|
@ -4380,4 +4380,3 @@ TIS_620_THAI_MODEL = SingleByteCharSetModel(charset_name='TIS-620',
|
|||
typical_positive_ratio=0.926386,
|
||||
keep_ascii_letters=False,
|
||||
alphabet='กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛')
|
||||
|
||||
|
|
|
|||
|
|
@ -4380,4 +4380,3 @@ ISO_8859_9_TURKISH_MODEL = SingleByteCharSetModel(charset_name='ISO-8859-9',
|
|||
typical_positive_ratio=0.97029,
|
||||
keep_ascii_letters=True,
|
||||
alphabet='ABCDEFGHIJKLMNOPRSTUVYZabcdefghijklmnoprstuvyzÂÇÎÖÛÜâçîöûüĞğİıŞş')
|
||||
|
||||
|
|
|
|||
|
|
@ -10,4 +10,3 @@ def ToUnicode(label: Union[bytes, bytearray]) -> str:
|
|||
|
||||
def nameprep(s: Any) -> None:
|
||||
raise NotImplementedError('IDNA 2008 does not utilise nameprep protocol')
|
||||
|
||||
|
|
|
|||
|
|
@ -1,2 +1 @@
|
|||
__version__ = '3.3'
|
||||
|
||||
|
|
|
|||
|
|
@ -80,4 +80,3 @@ def highlight(code, lexer, formatter, outfile=None):
|
|||
it is returned as a string.
|
||||
"""
|
||||
return format(lex(code, lexer), formatter, outfile)
|
||||
|
||||
|
|
|
|||
|
|
@ -60,11 +60,11 @@ class SvgFormatter(Formatter):
|
|||
|
||||
`linenostep`
|
||||
If set to a number n > 1, only every nth line number is printed.
|
||||
|
||||
|
||||
`linenowidth`
|
||||
Maximum width devoted to line numbers (default: ``3*ystep``, sufficient
|
||||
for up to 4-digit line numbers. Increase width for longer code blocks).
|
||||
|
||||
for up to 4-digit line numbers. Increase width for longer code blocks).
|
||||
|
||||
`xoffset`
|
||||
Starting offset in X direction, defaults to ``0``.
|
||||
|
||||
|
|
@ -132,12 +132,12 @@ class SvgFormatter(Formatter):
|
|||
outfile.write('<svg xmlns="http://www.w3.org/2000/svg">\n')
|
||||
outfile.write('<g font-family="%s" font-size="%s">\n' %
|
||||
(self.fontfamily, self.fontsize))
|
||||
|
||||
counter = self.linenostart
|
||||
|
||||
counter = self.linenostart
|
||||
counter_step = self.linenostep
|
||||
counter_style = self._get_style(Comment)
|
||||
line_x = x
|
||||
|
||||
|
||||
if self.linenos:
|
||||
if counter % counter_step == 0:
|
||||
outfile.write('<text x="%s" y="%s" %s text-anchor="end">%s</text>' %
|
||||
|
|
@ -161,7 +161,7 @@ class SvgFormatter(Formatter):
|
|||
if self.linenos and counter % counter_step == 0:
|
||||
outfile.write('<text x="%s" y="%s" text-anchor="end" %s>%s</text>' %
|
||||
(x+self.linenowidth,y,counter_style,counter))
|
||||
|
||||
|
||||
counter += 1
|
||||
outfile.write('<text x="%s" y="%s" ' 'xml:space="preserve">' % (line_x,y))
|
||||
outfile.write(tspan + parts[-1] + tspanend)
|
||||
|
|
|
|||
|
|
@ -214,7 +214,7 @@ class PythonLexer(RegexLexer):
|
|||
(r'(^[ \t]*)' # at beginning of line + possible indentation
|
||||
r'(match|case)\b' # a possible keyword
|
||||
r'(?![ \t]*(?:' # not followed by...
|
||||
r'[:,;=^&|@~)\]}]|(?:' + # characters and keywords that mean this isn't
|
||||
r'[:,;=^&|@~)\]}]|(?:' + # characters and keywords that mean this isn't
|
||||
r'|'.join(keyword.kwlist) + r')\b))', # pattern matching
|
||||
bygroups(Text, Keyword), 'soft-keywords-inner'),
|
||||
],
|
||||
|
|
|
|||
|
|
@ -493,7 +493,7 @@ class Session(SessionRedirectMixin):
|
|||
``False``, requests will accept any TLS certificate presented by
|
||||
the server, and will ignore hostname mismatches and/or expired
|
||||
certificates, which will make your application vulnerable to
|
||||
man-in-the-middle (MitM) attacks. Setting verify to ``False``
|
||||
man-in-the-middle (MitM) attacks. Setting verify to ``False``
|
||||
may be useful during local development or testing.
|
||||
:param cert: (optional) if String, path to ssl client cert file (.pem).
|
||||
If Tuple, ('cert', 'key') pair.
|
||||
|
|
|
|||
|
|
@ -248,96 +248,96 @@ SQUARE_DOUBLE_HEAD: Box = Box(
|
|||
|
||||
MINIMAL: Box = Box(
|
||||
"""\
|
||||
╷
|
||||
│
|
||||
╷
|
||||
│
|
||||
╶─┼╴
|
||||
│
|
||||
│
|
||||
╶─┼╴
|
||||
╶─┼╴
|
||||
│
|
||||
╵
|
||||
│
|
||||
╵
|
||||
"""
|
||||
)
|
||||
|
||||
|
||||
MINIMAL_HEAVY_HEAD: Box = Box(
|
||||
"""\
|
||||
╷
|
||||
│
|
||||
╷
|
||||
│
|
||||
╺━┿╸
|
||||
│
|
||||
│
|
||||
╶─┼╴
|
||||
╶─┼╴
|
||||
│
|
||||
╵
|
||||
│
|
||||
╵
|
||||
"""
|
||||
)
|
||||
|
||||
MINIMAL_DOUBLE_HEAD: Box = Box(
|
||||
"""\
|
||||
╷
|
||||
│
|
||||
═╪
|
||||
│
|
||||
─┼
|
||||
─┼
|
||||
│
|
||||
╵
|
||||
╷
|
||||
│
|
||||
═╪
|
||||
│
|
||||
─┼
|
||||
─┼
|
||||
│
|
||||
╵
|
||||
"""
|
||||
)
|
||||
|
||||
|
||||
SIMPLE: Box = Box(
|
||||
"""\
|
||||
|
||||
|
||||
──
|
||||
|
||||
|
||||
──
|
||||
|
||||
|
||||
|
||||
|
||||
──
|
||||
|
||||
|
||||
──
|
||||
|
||||
|
||||
"""
|
||||
)
|
||||
|
||||
SIMPLE_HEAD: Box = Box(
|
||||
"""\
|
||||
|
||||
|
||||
──
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
──
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
"""
|
||||
)
|
||||
|
||||
|
||||
SIMPLE_HEAVY: Box = Box(
|
||||
"""\
|
||||
|
||||
|
||||
━━
|
||||
|
||||
|
||||
━━
|
||||
|
||||
|
||||
|
||||
|
||||
━━
|
||||
|
||||
|
||||
━━
|
||||
|
||||
|
||||
"""
|
||||
)
|
||||
|
||||
|
||||
HORIZONTALS: Box = Box(
|
||||
"""\
|
||||
──
|
||||
|
||||
──
|
||||
|
||||
──
|
||||
──
|
||||
|
||||
──
|
||||
──
|
||||
|
||||
──
|
||||
|
||||
──
|
||||
──
|
||||
|
||||
──
|
||||
"""
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -214,9 +214,9 @@ if __name__ == "__main__": # pragma: no cover
|
|||
|
||||
code = """\
|
||||
class Segment(NamedTuple):
|
||||
text: str = ""
|
||||
style: Optional[Style] = None
|
||||
is_control: bool = False
|
||||
text: str = ""
|
||||
style: Optional[Style] = None
|
||||
is_control: bool = False
|
||||
"""
|
||||
syntax = Syntax(code, "python", theme="monokai", line_numbers=True)
|
||||
|
||||
|
|
@ -224,7 +224,7 @@ class Segment(NamedTuple):
|
|||
"""\
|
||||
### example.md
|
||||
> Hello, World!
|
||||
>
|
||||
>
|
||||
> Markdown _all_ the things
|
||||
"""
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue