Ahmad2005 commited on
Commit
84d5808
·
verified ·
1 Parent(s): 816b39d

Add files using upload-large-folder tool

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments-2.20.0.dist-info/METADATA +57 -0
  2. .cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments-2.20.0.dist-info/WHEEL +4 -0
  3. .cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments-2.20.0.dist-info/entry_points.txt +2 -0
  4. .cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments-2.20.0.dist-info/licenses/AUTHORS +292 -0
  5. .cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments-2.20.0.dist-info/licenses/LICENSE +25 -0
  6. .cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments/__init__.py +82 -0
  7. .cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments/__main__.py +17 -0
  8. .cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments/cmdline.py +668 -0
  9. .cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments/filter.py +70 -0
  10. .cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments/formatter.py +129 -0
  11. .cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments/lexer.py +963 -0
  12. .cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments/lexers/wren.py +98 -0
  13. .cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments/lexers/x10.py +66 -0
  14. .cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments/lexers/xorg.py +38 -0
  15. .cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments/lexers/yang.py +103 -0
  16. .cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments/lexers/yara.py +69 -0
  17. .cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments/lexers/zig.py +125 -0
  18. .cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments/modeline.py +43 -0
  19. .cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments/plugin.py +74 -0
  20. .cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments/regexopt.py +102 -0
  21. .cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments/scanner.py +104 -0
  22. .cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments/sphinxext.py +247 -0
  23. .cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments/style.py +203 -0
  24. .cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments/styles/__init__.py +61 -0
  25. .cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments/styles/_mapping.py +54 -0
  26. .cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments/styles/abap.py +32 -0
  27. .cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments/styles/algol.py +65 -0
  28. .cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments/styles/algol_nu.py +65 -0
  29. .cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments/styles/arduino.py +100 -0
  30. .cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments/styles/autumn.py +67 -0
  31. .cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments/styles/borland.py +53 -0
  32. .cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments/styles/bw.py +52 -0
  33. .cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments/styles/coffee.py +80 -0
  34. .cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments/styles/colorful.py +83 -0
  35. .cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments/styles/default.py +76 -0
  36. .cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments/styles/dracula.py +90 -0
  37. .cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments/styles/emacs.py +75 -0
  38. .cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments/styles/friendly.py +76 -0
  39. .cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments/styles/friendly_grayscale.py +80 -0
  40. .cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments/styles/fruity.py +47 -0
  41. .cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments/styles/gh_dark.py +113 -0
  42. .cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments/styles/gruvbox.py +118 -0
  43. .cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments/styles/igor.py +32 -0
  44. .cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments/styles/inkpot.py +72 -0
  45. .cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments/styles/lightbulb.py +110 -0
  46. .cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments/styles/lilypond.py +62 -0
  47. .cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments/styles/lovelace.py +100 -0
  48. .cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments/styles/manni.py +79 -0
  49. .cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments/styles/material.py +124 -0
  50. .cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments/styles/monokai.py +112 -0
.cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments-2.20.0.dist-info/METADATA ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Metadata-Version: 2.4
2
+ Name: Pygments
3
+ Version: 2.20.0
4
+ Summary: Pygments is a syntax highlighting package written in Python.
5
+ Project-URL: Homepage, https://pygments.org
6
+ Project-URL: Documentation, https://pygments.org/docs
7
+ Project-URL: Source, https://github.com/pygments/pygments
8
+ Project-URL: Bug Tracker, https://github.com/pygments/pygments/issues
9
+ Project-URL: Changelog, https://github.com/pygments/pygments/blob/master/CHANGES
10
+ Author-email: Georg Brandl <georg@python.org>
11
+ Maintainer: Matthäus G. Chajdas
12
+ Maintainer-email: Georg Brandl <georg@python.org>, Jean Abou Samra <jean@abou-samra.fr>
13
+ License-Expression: BSD-2-Clause
14
+ License-File: AUTHORS
15
+ License-File: LICENSE
16
+ Keywords: syntax highlighting
17
+ Classifier: Development Status :: 6 - Mature
18
+ Classifier: Intended Audience :: Developers
19
+ Classifier: Intended Audience :: End Users/Desktop
20
+ Classifier: Intended Audience :: System Administrators
21
+ Classifier: Operating System :: OS Independent
22
+ Classifier: Programming Language :: Python
23
+ Classifier: Programming Language :: Python :: 3
24
+ Classifier: Programming Language :: Python :: 3.9
25
+ Classifier: Programming Language :: Python :: 3.10
26
+ Classifier: Programming Language :: Python :: 3.11
27
+ Classifier: Programming Language :: Python :: 3.12
28
+ Classifier: Programming Language :: Python :: 3.13
29
+ Classifier: Programming Language :: Python :: 3.14
30
+ Classifier: Programming Language :: Python :: Implementation :: CPython
31
+ Classifier: Programming Language :: Python :: Implementation :: PyPy
32
+ Classifier: Topic :: Text Processing :: Filters
33
+ Classifier: Topic :: Utilities
34
+ Requires-Python: >=3.9
35
+ Provides-Extra: plugins
36
+ Provides-Extra: windows-terminal
37
+ Requires-Dist: colorama>=0.4.6; extra == 'windows-terminal'
38
+ Description-Content-Type: text/x-rst
39
+
40
+ Pygments
41
+ ~~~~~~~~
42
+
43
+ Pygments is a syntax highlighting package written in Python.
44
+
45
+ It is a generic syntax highlighter suitable for use in code hosting, forums,
46
+ wikis or other applications that need to prettify source code. Highlights
47
+ are:
48
+
49
+ * a wide range of over 500 languages and other text formats is supported
50
+ * special attention is paid to details, increasing quality by a fair amount
51
+ * support for new languages and formats are added easily
52
+ * a number of output formats, presently HTML, LaTeX, RTF, SVG, all image
53
+ formats that PIL supports and ANSI sequences
54
+ * it is usable as a command-line tool and as a library
55
+
56
+ Copyright 2006-present by the Pygments team, see ``AUTHORS``.
57
+ Licensed under the BSD, see ``LICENSE`` for details.
.cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments-2.20.0.dist-info/WHEEL ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.29.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
.cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments-2.20.0.dist-info/entry_points.txt ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ [console_scripts]
2
+ pygmentize = pygments.cmdline:main
.cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments-2.20.0.dist-info/licenses/AUTHORS ADDED
@@ -0,0 +1,292 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Pygments is written and maintained by Georg Brandl <georg@python.org>.
2
+
3
+ Major developers are Tim Hatch <tim@timhatch.com> and Armin Ronacher
4
+ <armin.ronacher@active-4.com>.
5
+
6
+ Other contributors, listed alphabetically, are:
7
+
8
+ * Sam Aaron -- Ioke lexer
9
+ * Jean Abou Samra -- LilyPond lexer
10
+ * João Abecasis -- JSLT lexer
11
+ * Ali Afshar -- image formatter
12
+ * Thomas Aglassinger -- Easytrieve, JCL, Rexx, Transact-SQL and VBScript
13
+ lexers
14
+ * Maxence Ahlouche -- PostgreSQL Explain lexer
15
+ * Muthiah Annamalai -- Ezhil lexer
16
+ * Nikolay Antipov -- OpenSCAD lexer
17
+ * Kumar Appaiah -- Debian control lexer
18
+ * Andreas Amann -- AppleScript lexer
19
+ * Timothy Armstrong -- Dart lexer fixes
20
+ * Jeffrey Arnold -- R/S, Rd, BUGS, Jags, and Stan lexers
21
+ * Eiríkr Åsheim -- Uxntal lexer
22
+ * Jeremy Ashkenas -- CoffeeScript lexer
23
+ * José Joaquín Atria -- Praat lexer
24
+ * Stefan Matthias Aust -- Smalltalk lexer
25
+ * Lucas Bajolet -- Nit lexer
26
+ * Ben Bangert -- Mako lexers
27
+ * Max Battcher -- Darcs patch lexer
28
+ * Thomas Baruchel -- APL lexer
29
+ * Tim Baumann -- (Literate) Agda lexer
30
+ * Paul Baumgart, 280 North, Inc. -- Objective-J lexer
31
+ * Michael Bayer -- Myghty lexers
32
+ * Thomas Beale -- Archetype lexers
33
+ * John Benediktsson -- Factor lexer
34
+ * David Benjamin, Google LLC -- TLS lexer
35
+ * Trevor Bergeron -- mIRC formatter
36
+ * Vincent Bernat -- LessCSS lexer
37
+ * Christopher Bertels -- Fancy lexer
38
+ * Sébastien Bigaret -- QVT Operational lexer
39
+ * Jarrett Billingsley -- MiniD lexer
40
+ * Adam Blinkinsop -- Haskell, Redcode lexers
41
+ * Stéphane Blondon -- Procfile, SGF and Sieve lexers
42
+ * Frits van Bommel -- assembler lexers
43
+ * Pierre Bourdon -- bugfixes
44
+ * Martijn Braam -- Kernel log lexer, BARE lexer
45
+ * JD Browne, Google LLC -- GoogleSQL lexer
46
+ * Matthias Bussonnier -- ANSI style handling for terminal-256 formatter
47
+ * chebee7i -- Python traceback lexer improvements
48
+ * Hiram Chirino -- Scaml and Jade lexers
49
+ * Mauricio Caceres -- SAS and Stata lexers.
50
+ * Michael Camilleri, John Gabriele, sogaiu -- Janet lexer
51
+ * Daren Chandisingh -- Gleam lexer
52
+ * Ian Cooper -- VGL lexer
53
+ * David Corbett -- Inform, Jasmin, JSGF, Snowball, and TADS 3 lexers
54
+ * Leaf Corcoran -- MoonScript lexer
55
+ * Fraser Cormack -- TableGen lexer
56
+ * Gabriel Corona -- ASN.1 lexer
57
+ * Christopher Creutzig -- MuPAD lexer
58
+ * Daniël W. Crompton -- Pike lexer
59
+ * Pete Curry -- bugfixes
60
+ * Bryan Davis -- EBNF lexer
61
+ * Bruno Deferrari -- Shen lexer
62
+ * Walter Dörwald -- UL4 lexer
63
+ * Luke Drummond -- Meson lexer
64
+ * Giedrius Dubinskas -- HTML formatter improvements
65
+ * Owen Durni -- Haxe lexer
66
+ * Alexander Dutton, Oxford University Computing Services -- SPARQL lexer
67
+ * James Edwards -- Terraform lexer
68
+ * Nick Efford -- Python 3 lexer
69
+ * Sven Efftinge -- Xtend lexer
70
+ * Artem Egorkine -- terminal256 formatter
71
+ * Matthew Fernandez -- CAmkES lexer
72
+ * Paweł Fertyk -- GDScript lexer, HTML formatter improvements
73
+ * Michael Ficarra -- CPSA lexer
74
+ * James H. Fisher -- PostScript lexer
75
+ * Amanda Fitch, Google LLC -- GoogleSQL lexer
76
+ * William S. Fulton -- SWIG lexer
77
+ * Carlos Galdino -- Elixir and Elixir Console lexers
78
+ * Michael Galloy -- IDL lexer
79
+ * Naveen Garg -- Autohotkey lexer
80
+ * Simon Garnotel -- FreeFem++ lexer
81
+ * Laurent Gautier -- R/S lexer
82
+ * Alex Gaynor -- PyPy log lexer
83
+ * Richard Gerkin -- Igor Pro lexer
84
+ * Alain Gilbert -- TypeScript lexer
85
+ * Alex Gilding -- BlitzBasic lexer
86
+ * GitHub, Inc -- DASM16, Augeas, TOML, and Slash lexers
87
+ * Bertrand Goetzmann -- Groovy lexer
88
+ * Krzysiek Goj -- Scala lexer
89
+ * Rostyslav Golda -- FloScript lexer
90
+ * Andrey Golovizin -- BibTeX lexers
91
+ * Matt Good -- Genshi, Cheetah lexers
92
+ * Michał Górny -- vim modeline support
93
+ * Alex Gosse -- TrafficScript lexer
94
+ * Patrick Gotthardt -- PHP namespaces support
95
+ * Hubert Gruniaux -- C and C++ lexer improvements
96
+ * Olivier Guibe -- Asymptote lexer
97
+ * Phil Hagelberg -- Fennel lexer
98
+ * Florian Hahn -- Boogie lexer
99
+ * Martin Harriman -- SNOBOL lexer
100
+ * Matthew Harrison -- SVG formatter
101
+ * Steven Hazel -- Tcl lexer
102
+ * Dan Michael Heggø -- Turtle lexer
103
+ * Aslak Hellesøy -- Gherkin lexer
104
+ * Greg Hendershott -- Racket lexer
105
+ * Justin Hendrick -- ParaSail lexer
106
+ * Jordi Gutiérrez Hermoso -- Octave lexer
107
+ * David Hess, Fish Software, Inc. -- Objective-J lexer
108
+ * Ken Hilton -- Typographic Number Theory and Arrow lexers
109
+ * Varun Hiremath -- Debian control lexer
110
+ * Rob Hoelz -- Perl 6 lexer
111
+ * Doug Hogan -- Mscgen lexer
112
+ * Ben Hollis -- Mason lexer
113
+ * Max Horn -- GAP lexer
114
+ * Fred Hornsey -- OMG IDL Lexer
115
+ * Alastair Houghton -- Lexer inheritance facility
116
+ * Tim Howard -- BlitzMax lexer
117
+ * Dustin Howett -- Logos lexer
118
+ * Ivan Inozemtsev -- Fantom lexer
119
+ * Hiroaki Itoh -- Shell console rewrite, Lexers for PowerShell session,
120
+ MSDOS session, BC, WDiff
121
+ * Brian R. Jackson -- Tea lexer
122
+ * Alex Jeffery, ChromaWay AB -- Rell lexer
123
+ * Christian Jann -- ShellSession lexer
124
+ * Jonas Camillus Jeppesen -- Line numbers and line highlighting for
125
+ RTF-formatter
126
+ * Dennis Kaarsemaker -- sources.list lexer
127
+ * Dmitri Kabak -- Inferno Limbo lexer
128
+ * Igor Kalnitsky -- vhdl lexer
129
+ * Colin Kennedy - USD lexer
130
+ * Alexander Kit -- MaskJS lexer
131
+ * Pekka Klärck -- Robot Framework lexer
132
+ * Gerwin Klein -- Isabelle lexer
133
+ * Eric Knibbe -- Lasso lexer
134
+ * Stepan Koltsov -- Clay lexer
135
+ * Oliver Kopp - Friendly grayscale style
136
+ * Adam Koprowski -- Opa lexer
137
+ * Benjamin Kowarsch -- Modula-2 lexer
138
+ * Domen Kožar -- Nix lexer
139
+ * Oleh Krekel -- Emacs Lisp lexer
140
+ * Alexander Kriegisch -- Kconfig and AspectJ lexers
141
+ * Marek Kubica -- Scheme lexer
142
+ * Jochen Kupperschmidt -- Markdown processor
143
+ * Gerd Kurzbach -- Modelica lexer
144
+ * Jon Larimer, Google Inc. -- Smali lexer
145
+ * Olov Lassus -- Dart lexer
146
+ * Matt Layman -- TAP lexer
147
+ * Dan Lazin, Google LLC -- GoogleSQL lexer
148
+ * Kristian Lyngstøl -- Varnish lexers
149
+ * Sylvestre Ledru -- Scilab lexer
150
+ * Chee Sing Lee -- Flatline lexer
151
+ * Mark Lee -- Vala lexer
152
+ * Thomas Linder Puls -- Visual Prolog lexer
153
+ * Pete Lomax -- Phix lexer
154
+ * Valentin Lorentz -- C++ lexer improvements
155
+ * Ben Mabey -- Gherkin lexer
156
+ * Angus MacArthur -- QML lexer
157
+ * Louis Mandel -- X10 lexer
158
+ * Louis Marchand -- Eiffel lexer
159
+ * Simone Margaritelli -- Hybris lexer
160
+ * Tim Martin - World of Warcraft TOC lexer
161
+ * Kirk McDonald -- D lexer
162
+ * Gordon McGregor -- SystemVerilog lexer
163
+ * Stephen McKamey -- Duel/JBST lexer
164
+ * Brian McKenna -- F# lexer
165
+ * Charles McLaughlin -- Puppet lexer
166
+ * Kurt McKee -- Tera Term macro lexer, PostgreSQL updates, MySQL overhaul, JSON lexer
167
+ * Joe Eli McIlvain -- Savi lexer
168
+ * Lukas Meuser -- BBCode formatter, Lua lexer
169
+ * Cat Miller -- Pig lexer
170
+ * Paul Miller -- LiveScript lexer
171
+ * Hong Minhee -- HTTP lexer
172
+ * Michael Mior -- Awk lexer
173
+ * Bruce Mitchener -- Dylan lexer rewrite
174
+ * Reuben Morais -- SourcePawn lexer
175
+ * Jon Morton -- Rust lexer
176
+ * Paulo Moura -- Logtalk lexer
177
+ * Mher Movsisyan -- DTD lexer
178
+ * Dejan Muhamedagic -- Crmsh lexer
179
+ * Adrien Nayrat -- PostgreSQL Explain lexer
180
+ * Ana Nelson -- Ragel, ANTLR, R console lexers
181
+ * David Neto, Google LLC -- WebGPU Shading Language lexer
182
+ * Kurt Neufeld -- Markdown lexer
183
+ * Nam T. Nguyen -- Monokai style
184
+ * Jesper Noehr -- HTML formatter "anchorlinenos"
185
+ * Mike Nolta -- Julia lexer
186
+ * Avery Nortonsmith -- Pointless lexer
187
+ * Jonas Obrist -- BBCode lexer
188
+ * Edward O'Callaghan -- Cryptol lexer
189
+ * David Oliva -- Rebol lexer
190
+ * Pat Pannuto -- nesC lexer
191
+ * Jon Parise -- Protocol buffers and Thrift lexers
192
+ * Benjamin Peterson -- Test suite refactoring
193
+ * Ronny Pfannschmidt -- BBCode lexer
194
+ * Dominik Picheta -- Nimrod lexer
195
+ * Andrew Pinkham -- RTF Formatter Refactoring
196
+ * Clément Prévost -- UrbiScript lexer
197
+ * Tanner Prynn -- cmdline -x option and loading lexers from files
198
+ * Oleh Prypin -- Crystal lexer (based on Ruby lexer)
199
+ * Nick Psaris -- K and Q lexers
200
+ * Xidorn Quan -- Web IDL lexer
201
+ * Elias Rabel -- Fortran fixed form lexer
202
+ * raichoo -- Idris lexer
203
+ * Daniel Ramirez -- GDScript lexer
204
+ * Kashif Rasul -- CUDA lexer
205
+ * Nathan Reed -- HLSL lexer
206
+ * Justin Reidy -- MXML lexer
207
+ * Jonathon Reinhart, Google LLC -- Soong lexer
208
+ * Norman Richards -- JSON lexer
209
+ * Corey Richardson -- Rust lexer updates
210
+ * Fabrizio Riguzzi -- cplint leder
211
+ * Lubomir Rintel -- GoodData MAQL and CL lexers
212
+ * Andre Roberge -- Tango style
213
+ * Georg Rollinger -- HSAIL lexer
214
+ * Michiel Roos -- TypoScript lexer
215
+ * Konrad Rudolph -- LaTeX formatter enhancements
216
+ * Mario Ruggier -- Evoque lexers
217
+ * Miikka Salminen -- Lovelace style, Hexdump lexer, lexer enhancements
218
+ * Stou Sandalski -- NumPy, FORTRAN, tcsh and XSLT lexers
219
+ * Matteo Sasso -- Common Lisp lexer
220
+ * Joe Schafer -- Ada lexer
221
+ * Max Schillinger -- TiddlyWiki5 lexer
222
+ * Andrew Schmidt -- X++ lexer
223
+ * Ken Schutte -- Matlab lexers
224
+ * René Schwaiger -- Rainbow Dash style
225
+ * Sebastian Schweizer -- Whiley lexer
226
+ * Tassilo Schweyer -- Io, MOOCode lexers
227
+ * Pablo Seminario -- PromQL lexer
228
+ * Ted Shaw -- AutoIt lexer
229
+ * Joerg Sieker -- ABAP lexer
230
+ * Robert Simmons -- Standard ML lexer
231
+ * Kirill Simonov -- YAML lexer
232
+ * Corbin Simpson -- Monte lexer
233
+ * Ville Skyttä -- ASCII armored lexer
234
+ * Alexander Smishlajev -- Visual FoxPro lexer
235
+ * Steve Spigarelli -- XQuery lexer
236
+ * Jerome St-Louis -- eC lexer
237
+ * Camil Staps -- Clean and NuSMV lexers; Solarized style
238
+ * James Strachan -- Kotlin lexer
239
+ * Tom Stuart -- Treetop lexer
240
+ * Colin Sullivan -- SuperCollider lexer
241
+ * Ben Swift -- Extempore lexer
242
+ * tatt61880 -- Kuin lexer
243
+ * Edoardo Tenani -- Arduino lexer
244
+ * Tiberius Teng -- default style overhaul
245
+ * Jeremy Thurgood -- Erlang, Squid config lexers
246
+ * Brian Tiffin -- OpenCOBOL lexer
247
+ * Bob Tolbert -- Hy lexer
248
+ * Doug Torrance -- Macaulay2 lexer
249
+ * Matthias Trute -- Forth lexer
250
+ * Tuoa Spi T4 -- Bdd lexer
251
+ * Erick Tryzelaar -- Felix lexer
252
+ * Alexander Udalov -- Kotlin lexer improvements
253
+ * Thomas Van Doren -- Chapel lexer
254
+ * Dave Van Ee -- Uxntal lexer updates
255
+ * Daniele Varrazzo -- PostgreSQL lexers
256
+ * Abe Voelker -- OpenEdge ABL lexer
257
+ * Pepijn de Vos -- HTML formatter CTags support
258
+ * Matthias Vallentin -- Bro lexer
259
+ * Benoît Vinot -- AMPL lexer
260
+ * Linh Vu Hong -- RSL lexer
261
+ * Taavi Väänänen -- Debian control, PHP lexers
262
+ * Immanuel Washington -- Smithy lexer
263
+ * Nathan Weizenbaum -- Haml and Sass lexers
264
+ * Nathan Whetsell -- Csound lexers
265
+ * Dietmar Winkler -- Modelica lexer
266
+ * Nils Winter -- Smalltalk lexer
267
+ * Davy Wybiral -- Clojure lexer
268
+ * Whitney Young -- ObjectiveC lexer
269
+ * Diego Zamboni -- CFengine3 lexer
270
+ * Enrique Zamudio -- Ceylon lexer
271
+ * Alex Zimin -- Nemerle lexer
272
+ * Rob Zimmerman -- Kal lexer
273
+ * Evgenii Zheltonozhskii -- Maple lexer
274
+ * Vincent Zurczak -- Roboconf lexer
275
+ * Hubert Gruniaux -- C and C++ lexer improvements
276
+ * Thomas Symalla -- AMDGPU Lexer
277
+ * 15b3 -- Image Formatter improvements
278
+ * Fabian Neumann -- CDDL lexer
279
+ * Thomas Duboucher -- CDDL lexer
280
+ * Philipp Imhof -- Pango Markup formatter
281
+ * Thomas Voss -- Sed lexer
282
+ * Martin Fischer -- WCAG contrast testing
283
+ * Marc Auberer -- Spice lexer
284
+ * Amr Hesham -- Carbon lexer
285
+ * diskdance -- Wikitext lexer
286
+ * vanillajonathan -- PRQL lexer
287
+ * Nikolay Antipov -- OpenSCAD lexer
288
+ * Markus Meyer, Nextron Systems -- YARA lexer
289
+ * Hannes Römer -- Mojo lexer
290
+ * Jan Frederik Schaefer -- PDDL lexer
291
+
292
+ Many thanks for all contributions!
.cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments-2.20.0.dist-info/licenses/LICENSE ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Copyright (c) 2006-2022 by the respective authors (see AUTHORS file).
2
+ All rights reserved.
3
+
4
+ Redistribution and use in source and binary forms, with or without
5
+ modification, are permitted provided that the following conditions are
6
+ met:
7
+
8
+ * Redistributions of source code must retain the above copyright
9
+ notice, this list of conditions and the following disclaimer.
10
+
11
+ * Redistributions in binary form must reproduce the above copyright
12
+ notice, this list of conditions and the following disclaimer in the
13
+ documentation and/or other materials provided with the distribution.
14
+
15
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
16
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
17
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
18
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
19
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
21
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
25
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments/__init__.py ADDED
@@ -0,0 +1,82 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ Pygments
3
+ ~~~~~~~~
4
+
5
+ Pygments is a syntax highlighting package written in Python.
6
+
7
+ It is a generic syntax highlighter for general use in all kinds of software
8
+ such as forum systems, wikis or other applications that need to prettify
9
+ source code. Highlights are:
10
+
11
+ * a wide range of common languages and markup formats is supported
12
+ * special attention is paid to details, increasing quality by a fair amount
13
+ * support for new languages and formats are added easily
14
+ * a number of output formats, presently HTML, LaTeX, RTF, SVG, all image
15
+ formats that PIL supports, and ANSI sequences
16
+ * it is usable as a command-line tool and as a library
17
+ * ... and it highlights even Brainfuck!
18
+
19
+ The `Pygments master branch`_ is installable with ``easy_install Pygments==dev``.
20
+
21
+ .. _Pygments master branch:
22
+ https://github.com/pygments/pygments/archive/master.zip#egg=Pygments-dev
23
+
24
+ :copyright: Copyright 2006-present by the Pygments team, see AUTHORS.
25
+ :license: BSD, see LICENSE for details.
26
+ """
27
+ from io import StringIO, BytesIO
28
+
29
+ __version__ = '2.20.0'
30
+ __docformat__ = 'restructuredtext'
31
+
32
+ __all__ = ['lex', 'format', 'highlight']
33
+
34
+
35
+ def lex(code, lexer):
36
+ """
37
+ Lex `code` with the `lexer` (must be a `Lexer` instance)
38
+ and return an iterable of tokens. Currently, this only calls
39
+ `lexer.get_tokens()`.
40
+ """
41
+ try:
42
+ return lexer.get_tokens(code)
43
+ except TypeError:
44
+ # Heuristic to catch a common mistake.
45
+ from pygments.lexer import RegexLexer
46
+ if isinstance(lexer, type) and issubclass(lexer, RegexLexer):
47
+ raise TypeError('lex() argument must be a lexer instance, '
48
+ 'not a class')
49
+ raise
50
+
51
+
52
+ def format(tokens, formatter, outfile=None): # pylint: disable=redefined-builtin
53
+ """
54
+ Format ``tokens`` (an iterable of tokens) with the formatter ``formatter``
55
+ (a `Formatter` instance).
56
+
57
+ If ``outfile`` is given and a valid file object (an object with a
58
+ ``write`` method), the result will be written to it, otherwise it
59
+ is returned as a string.
60
+ """
61
+ try:
62
+ if not outfile:
63
+ realoutfile = getattr(formatter, 'encoding', None) and BytesIO() or StringIO()
64
+ formatter.format(tokens, realoutfile)
65
+ return realoutfile.getvalue()
66
+ else:
67
+ formatter.format(tokens, outfile)
68
+ except TypeError:
69
+ # Heuristic to catch a common mistake.
70
+ from pygments.formatter import Formatter
71
+ if isinstance(formatter, type) and issubclass(formatter, Formatter):
72
+ raise TypeError('format() argument must be a formatter instance, '
73
+ 'not a class')
74
+ raise
75
+
76
+
77
+ def highlight(code, lexer, formatter, outfile=None):
78
+ """
79
+ This is the most high-level highlighting function. It combines `lex` and
80
+ `format` in one function.
81
+ """
82
+ return format(lex(code, lexer), formatter, outfile)
.cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments/__main__.py ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ pygments.__main__
3
+ ~~~~~~~~~~~~~~~~~
4
+
5
+ Main entry point for ``python -m pygments``.
6
+
7
+ :copyright: Copyright 2006-present by the Pygments team, see AUTHORS.
8
+ :license: BSD, see LICENSE for details.
9
+ """
10
+
11
+ import sys
12
+ import pygments.cmdline
13
+
14
+ try:
15
+ sys.exit(pygments.cmdline.main(sys.argv))
16
+ except KeyboardInterrupt:
17
+ sys.exit(1)
.cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments/cmdline.py ADDED
@@ -0,0 +1,668 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ pygments.cmdline
3
+ ~~~~~~~~~~~~~~~~
4
+
5
+ Command line interface.
6
+
7
+ :copyright: Copyright 2006-present by the Pygments team, see AUTHORS.
8
+ :license: BSD, see LICENSE for details.
9
+ """
10
+
11
+ import os
12
+ import sys
13
+ import shutil
14
+ import argparse
15
+ from textwrap import dedent
16
+
17
+ from pygments import __version__, highlight
18
+ from pygments.util import ClassNotFound, OptionError, docstring_headline, \
19
+ guess_decode, guess_decode_from_terminal, terminal_encoding, \
20
+ UnclosingTextIOWrapper
21
+ from pygments.lexers import get_all_lexers, get_lexer_by_name, guess_lexer, \
22
+ load_lexer_from_file, get_lexer_for_filename, find_lexer_class_for_filename
23
+ from pygments.lexers.special import TextLexer
24
+ from pygments.formatters.latex import LatexEmbeddedLexer, LatexFormatter
25
+ from pygments.formatters import get_all_formatters, get_formatter_by_name, \
26
+ load_formatter_from_file, get_formatter_for_filename, find_formatter_class
27
+ from pygments.formatters.terminal import TerminalFormatter
28
+ from pygments.formatters.terminal256 import Terminal256Formatter, TerminalTrueColorFormatter
29
+ from pygments.filters import get_all_filters, find_filter_class
30
+ from pygments.styles import get_all_styles, get_style_by_name
31
+
32
+
33
+ def _parse_options(o_strs):
34
+ opts = {}
35
+ if not o_strs:
36
+ return opts
37
+ for o_str in o_strs:
38
+ if not o_str.strip():
39
+ continue
40
+ o_args = o_str.split(',')
41
+ for o_arg in o_args:
42
+ o_arg = o_arg.strip()
43
+ try:
44
+ o_key, o_val = o_arg.split('=', 1)
45
+ o_key = o_key.strip()
46
+ o_val = o_val.strip()
47
+ except ValueError:
48
+ opts[o_arg] = True
49
+ else:
50
+ opts[o_key] = o_val
51
+ return opts
52
+
53
+
54
+ def _parse_filters(f_strs):
55
+ filters = []
56
+ if not f_strs:
57
+ return filters
58
+ for f_str in f_strs:
59
+ if ':' in f_str:
60
+ fname, fopts = f_str.split(':', 1)
61
+ filters.append((fname, _parse_options([fopts])))
62
+ else:
63
+ filters.append((f_str, {}))
64
+ return filters
65
+
66
+
67
+ def _print_help(what, name):
68
+ try:
69
+ if what == 'lexer':
70
+ cls = get_lexer_by_name(name)
71
+ print(f"Help on the {cls.name} lexer:")
72
+ print(dedent(cls.__doc__))
73
+ elif what == 'formatter':
74
+ cls = find_formatter_class(name)
75
+ print(f"Help on the {cls.name} formatter:")
76
+ print(dedent(cls.__doc__))
77
+ elif what == 'filter':
78
+ cls = find_filter_class(name)
79
+ print(f"Help on the {name} filter:")
80
+ print(dedent(cls.__doc__))
81
+ return 0
82
+ except (AttributeError, ValueError):
83
+ print(f"{what} not found!", file=sys.stderr)
84
+ return 1
85
+
86
+
87
+ def _print_list(what):
88
+ if what == 'lexer':
89
+ print()
90
+ print("Lexers:")
91
+ print("~~~~~~~")
92
+
93
+ info = []
94
+ for fullname, names, exts, _ in get_all_lexers():
95
+ tup = (', '.join(names)+':', fullname,
96
+ exts and '(filenames ' + ', '.join(exts) + ')' or '')
97
+ info.append(tup)
98
+ info.sort()
99
+ for i in info:
100
+ print(('* {}\n {} {}').format(*i))
101
+
102
+ elif what == 'formatter':
103
+ print()
104
+ print("Formatters:")
105
+ print("~~~~~~~~~~~")
106
+
107
+ info = []
108
+ for cls in get_all_formatters():
109
+ doc = docstring_headline(cls)
110
+ tup = (', '.join(cls.aliases) + ':', doc, cls.filenames and
111
+ '(filenames ' + ', '.join(cls.filenames) + ')' or '')
112
+ info.append(tup)
113
+ info.sort()
114
+ for i in info:
115
+ print(('* {}\n {} {}').format(*i))
116
+
117
+ elif what == 'filter':
118
+ print()
119
+ print("Filters:")
120
+ print("~~~~~~~~")
121
+
122
+ for name in get_all_filters():
123
+ cls = find_filter_class(name)
124
+ print("* " + name + ':')
125
+ print(f" {docstring_headline(cls)}")
126
+
127
+ elif what == 'style':
128
+ print()
129
+ print("Styles:")
130
+ print("~~~~~~~")
131
+
132
+ for name in get_all_styles():
133
+ cls = get_style_by_name(name)
134
+ print("* " + name + ':')
135
+ print(f" {docstring_headline(cls)}")
136
+
137
+
138
+ def _print_list_as_json(requested_items):
139
+ import json
140
+ result = {}
141
+ if 'lexer' in requested_items:
142
+ info = {}
143
+ for fullname, names, filenames, mimetypes in get_all_lexers():
144
+ info[fullname] = {
145
+ 'aliases': names,
146
+ 'filenames': filenames,
147
+ 'mimetypes': mimetypes
148
+ }
149
+ result['lexers'] = info
150
+
151
+ if 'formatter' in requested_items:
152
+ info = {}
153
+ for cls in get_all_formatters():
154
+ doc = docstring_headline(cls)
155
+ info[cls.name] = {
156
+ 'aliases': cls.aliases,
157
+ 'filenames': cls.filenames,
158
+ 'doc': doc
159
+ }
160
+ result['formatters'] = info
161
+
162
+ if 'filter' in requested_items:
163
+ info = {}
164
+ for name in get_all_filters():
165
+ cls = find_filter_class(name)
166
+ info[name] = {
167
+ 'doc': docstring_headline(cls)
168
+ }
169
+ result['filters'] = info
170
+
171
+ if 'style' in requested_items:
172
+ info = {}
173
+ for name in get_all_styles():
174
+ cls = get_style_by_name(name)
175
+ info[name] = {
176
+ 'doc': docstring_headline(cls)
177
+ }
178
+ result['styles'] = info
179
+
180
+ json.dump(result, sys.stdout)
181
+
182
+ def main_inner(parser, argns):
183
+ if argns.help:
184
+ parser.print_help()
185
+ return 0
186
+
187
+ if argns.V:
188
+ print(f'Pygments version {__version__}, (c) 2006-present by Georg Brandl, Matthäus '
189
+ 'Chajdas and contributors.')
190
+ return 0
191
+
192
+ def is_only_option(opt):
193
+ return not any(v for (k, v) in vars(argns).items() if k != opt)
194
+
195
+ # handle ``pygmentize -L``
196
+ if argns.L is not None:
197
+ arg_set = set()
198
+ for k, v in vars(argns).items():
199
+ if v:
200
+ arg_set.add(k)
201
+
202
+ arg_set.discard('L')
203
+ arg_set.discard('json')
204
+
205
+ if arg_set:
206
+ parser.print_help(sys.stderr)
207
+ return 2
208
+
209
+ # print version
210
+ if not argns.json:
211
+ main(['', '-V'])
212
+ allowed_types = {'lexer', 'formatter', 'filter', 'style'}
213
+ largs = [arg.rstrip('s') for arg in argns.L]
214
+ if any(arg not in allowed_types for arg in largs):
215
+ parser.print_help(sys.stderr)
216
+ return 0
217
+ if not largs:
218
+ largs = allowed_types
219
+ if not argns.json:
220
+ for arg in largs:
221
+ _print_list(arg)
222
+ else:
223
+ _print_list_as_json(largs)
224
+ return 0
225
+
226
+ # handle ``pygmentize -H``
227
+ if argns.H:
228
+ if not is_only_option('H'):
229
+ parser.print_help(sys.stderr)
230
+ return 2
231
+ what, name = argns.H
232
+ if what not in ('lexer', 'formatter', 'filter'):
233
+ parser.print_help(sys.stderr)
234
+ return 2
235
+ return _print_help(what, name)
236
+
237
+ # parse -O options
238
+ parsed_opts = _parse_options(argns.O or [])
239
+
240
+ # parse -P options
241
+ for p_opt in argns.P or []:
242
+ try:
243
+ name, value = p_opt.split('=', 1)
244
+ except ValueError:
245
+ parsed_opts[p_opt] = True
246
+ else:
247
+ parsed_opts[name] = value
248
+
249
+ # encodings
250
+ inencoding = parsed_opts.get('inencoding', parsed_opts.get('encoding'))
251
+ outencoding = parsed_opts.get('outencoding', parsed_opts.get('encoding'))
252
+
253
+ # handle ``pygmentize -N``
254
+ if argns.N:
255
+ lexer = find_lexer_class_for_filename(argns.N)
256
+ if lexer is None:
257
+ lexer = TextLexer
258
+
259
+ print(lexer.aliases[0])
260
+ return 0
261
+
262
+ # handle ``pygmentize -C``
263
+ if argns.C:
264
+ inp = sys.stdin.buffer.read()
265
+ try:
266
+ lexer = guess_lexer(inp, inencoding=inencoding)
267
+ except ClassNotFound:
268
+ lexer = TextLexer
269
+
270
+ print(lexer.aliases[0])
271
+ return 0
272
+
273
+ # handle ``pygmentize -S``
274
+ S_opt = argns.S
275
+ a_opt = argns.a
276
+ if S_opt is not None:
277
+ f_opt = argns.f
278
+ if not f_opt:
279
+ parser.print_help(sys.stderr)
280
+ return 2
281
+ if argns.l or argns.INPUTFILE:
282
+ parser.print_help(sys.stderr)
283
+ return 2
284
+
285
+ try:
286
+ parsed_opts['style'] = S_opt
287
+ fmter = get_formatter_by_name(f_opt, **parsed_opts)
288
+ except ClassNotFound as err:
289
+ print(err, file=sys.stderr)
290
+ return 1
291
+
292
+ print(fmter.get_style_defs(a_opt or ''))
293
+ return 0
294
+
295
+ # if no -S is given, -a is not allowed
296
+ if argns.a is not None:
297
+ parser.print_help(sys.stderr)
298
+ return 2
299
+
300
+ # parse -F options
301
+ F_opts = _parse_filters(argns.F or [])
302
+
303
+ # -x: allow custom (eXternal) lexers and formatters
304
+ allow_custom_lexer_formatter = bool(argns.x)
305
+
306
+ # select lexer
307
+ lexer = None
308
+
309
+ # given by name?
310
+ lexername = argns.l
311
+ if lexername:
312
+ # custom lexer, located relative to user's cwd
313
+ if allow_custom_lexer_formatter and '.py' in lexername:
314
+ try:
315
+ filename = None
316
+ name = None
317
+ if ':' in lexername:
318
+ filename, name = lexername.rsplit(':', 1)
319
+
320
+ if '.py' in name:
321
+ # This can happen on Windows: If the lexername is
322
+ # C:\lexer.py -- return to normal load path in that case
323
+ name = None
324
+
325
+ if filename and name:
326
+ lexer = load_lexer_from_file(filename, name,
327
+ **parsed_opts)
328
+ else:
329
+ lexer = load_lexer_from_file(lexername, **parsed_opts)
330
+ except ClassNotFound as err:
331
+ print('Error:', err, file=sys.stderr)
332
+ return 1
333
+ else:
334
+ try:
335
+ lexer = get_lexer_by_name(lexername, **parsed_opts)
336
+ except (OptionError, ClassNotFound) as err:
337
+ print('Error:', err, file=sys.stderr)
338
+ return 1
339
+
340
+ # read input code
341
+ code = None
342
+
343
+ if argns.INPUTFILE:
344
+ if argns.s:
345
+ print('Error: -s option not usable when input file specified',
346
+ file=sys.stderr)
347
+ return 2
348
+
349
+ infn = argns.INPUTFILE
350
+ try:
351
+ with open(infn, 'rb') as infp:
352
+ code = infp.read()
353
+ except Exception as err:
354
+ print('Error: cannot read infile:', err, file=sys.stderr)
355
+ return 1
356
+ if not inencoding:
357
+ code, inencoding = guess_decode(code)
358
+
359
+ # do we have to guess the lexer?
360
+ if not lexer:
361
+ try:
362
+ lexer = get_lexer_for_filename(infn, code, **parsed_opts)
363
+ except ClassNotFound as err:
364
+ if argns.g:
365
+ try:
366
+ lexer = guess_lexer(code, **parsed_opts)
367
+ except ClassNotFound:
368
+ lexer = TextLexer(**parsed_opts)
369
+ else:
370
+ print('Error:', err, file=sys.stderr)
371
+ return 1
372
+ except OptionError as err:
373
+ print('Error:', err, file=sys.stderr)
374
+ return 1
375
+
376
+ elif not argns.s: # treat stdin as full file (-s support is later)
377
+ # read code from terminal, always in binary mode since we want to
378
+ # decode ourselves and be tolerant with it
379
+ code = sys.stdin.buffer.read() # use .buffer to get a binary stream
380
+ if not inencoding:
381
+ code, inencoding = guess_decode_from_terminal(code, sys.stdin)
382
+ # else the lexer will do the decoding
383
+ if not lexer:
384
+ try:
385
+ lexer = guess_lexer(code, **parsed_opts)
386
+ except ClassNotFound:
387
+ lexer = TextLexer(**parsed_opts)
388
+
389
+ else: # -s option needs a lexer with -l
390
+ if not lexer:
391
+ print('Error: when using -s a lexer has to be selected with -l',
392
+ file=sys.stderr)
393
+ return 2
394
+
395
+ # process filters
396
+ for fname, fopts in F_opts:
397
+ try:
398
+ lexer.add_filter(fname, **fopts)
399
+ except ClassNotFound as err:
400
+ print('Error:', err, file=sys.stderr)
401
+ return 1
402
+
403
+ # select formatter
404
+ outfn = argns.o
405
+ fmter = argns.f
406
+ if fmter:
407
+ # custom formatter, located relative to user's cwd
408
+ if allow_custom_lexer_formatter and '.py' in fmter:
409
+ try:
410
+ filename = None
411
+ name = None
412
+ if ':' in fmter:
413
+ # Same logic as above for custom lexer
414
+ filename, name = fmter.rsplit(':', 1)
415
+
416
+ if '.py' in name:
417
+ name = None
418
+
419
+ if filename and name:
420
+ fmter = load_formatter_from_file(filename, name,
421
+ **parsed_opts)
422
+ else:
423
+ fmter = load_formatter_from_file(fmter, **parsed_opts)
424
+ except ClassNotFound as err:
425
+ print('Error:', err, file=sys.stderr)
426
+ return 1
427
+ else:
428
+ try:
429
+ fmter = get_formatter_by_name(fmter, **parsed_opts)
430
+ except (OptionError, ClassNotFound) as err:
431
+ print('Error:', err, file=sys.stderr)
432
+ return 1
433
+
434
+ if outfn:
435
+ if not fmter:
436
+ try:
437
+ fmter = get_formatter_for_filename(outfn, **parsed_opts)
438
+ except (OptionError, ClassNotFound) as err:
439
+ print('Error:', err, file=sys.stderr)
440
+ return 1
441
+ try:
442
+ outfile = open(outfn, 'wb')
443
+ except Exception as err:
444
+ print('Error: cannot open outfile:', err, file=sys.stderr)
445
+ return 1
446
+ else:
447
+ if not fmter:
448
+ if os.environ.get('COLORTERM','') in ('truecolor', '24bit'):
449
+ fmter = TerminalTrueColorFormatter(**parsed_opts)
450
+ elif '256' in os.environ.get('TERM', ''):
451
+ fmter = Terminal256Formatter(**parsed_opts)
452
+ else:
453
+ fmter = TerminalFormatter(**parsed_opts)
454
+ outfile = sys.stdout.buffer
455
+
456
+ # determine output encoding if not explicitly selected
457
+ if not outencoding:
458
+ if outfn:
459
+ # output file? use lexer encoding for now (can still be None)
460
+ fmter.encoding = inencoding
461
+ else:
462
+ # else use terminal encoding
463
+ fmter.encoding = terminal_encoding(sys.stdout)
464
+
465
+ # provide coloring under Windows, if possible
466
+ if not outfn and sys.platform in ('win32', 'cygwin') and \
467
+ fmter.name in ('Terminal', 'Terminal256'): # pragma: no cover
468
+ # unfortunately colorama doesn't support binary streams on Py3
469
+ outfile = UnclosingTextIOWrapper(outfile, encoding=fmter.encoding)
470
+ fmter.encoding = None
471
+ try:
472
+ import colorama.initialise
473
+ except ImportError:
474
+ pass
475
+ else:
476
+ outfile = colorama.initialise.wrap_stream(
477
+ outfile, convert=None, strip=None, autoreset=False, wrap=True)
478
+
479
+ # When using the LaTeX formatter and the option `escapeinside` is
480
+ # specified, we need a special lexer which collects escaped text
481
+ # before running the chosen language lexer.
482
+ escapeinside = parsed_opts.get('escapeinside', '')
483
+ if len(escapeinside) == 2 and isinstance(fmter, LatexFormatter):
484
+ left = escapeinside[0]
485
+ right = escapeinside[1]
486
+ lexer = LatexEmbeddedLexer(left, right, lexer)
487
+
488
+ # ... and do it!
489
+ if not argns.s:
490
+ # process whole input as per normal...
491
+ try:
492
+ highlight(code, lexer, fmter, outfile)
493
+ finally:
494
+ if outfn:
495
+ outfile.close()
496
+ return 0
497
+ else:
498
+ # line by line processing of stdin (eg: for 'tail -f')...
499
+ try:
500
+ while 1:
501
+ line = sys.stdin.buffer.readline()
502
+ if not line:
503
+ break
504
+ if not inencoding:
505
+ line = guess_decode_from_terminal(line, sys.stdin)[0]
506
+ highlight(line, lexer, fmter, outfile)
507
+ if hasattr(outfile, 'flush'):
508
+ outfile.flush()
509
+ return 0
510
+ except KeyboardInterrupt: # pragma: no cover
511
+ return 0
512
+ finally:
513
+ if outfn:
514
+ outfile.close()
515
+
516
+
517
+ class HelpFormatter(argparse.HelpFormatter):
518
+ def __init__(self, prog, indent_increment=2, max_help_position=16, width=None):
519
+ if width is None:
520
+ try:
521
+ width = shutil.get_terminal_size().columns - 2
522
+ except Exception:
523
+ pass
524
+ argparse.HelpFormatter.__init__(self, prog, indent_increment,
525
+ max_help_position, width)
526
+
527
+
528
+ def main(args=sys.argv):
529
+ """
530
+ Main command line entry point.
531
+ """
532
+ desc = "Highlight an input file and write the result to an output file."
533
+ parser = argparse.ArgumentParser(description=desc, add_help=False,
534
+ formatter_class=HelpFormatter)
535
+
536
+ operation = parser.add_argument_group('Main operation')
537
+ lexersel = operation.add_mutually_exclusive_group()
538
+ lexersel.add_argument(
539
+ '-l', metavar='LEXER',
540
+ help='Specify the lexer to use. (Query names with -L.) If not '
541
+ 'given and -g is not present, the lexer is guessed from the filename.')
542
+ lexersel.add_argument(
543
+ '-g', action='store_true',
544
+ help='Guess the lexer from the file contents, or pass through '
545
+ 'as plain text if nothing can be guessed.')
546
+ operation.add_argument(
547
+ '-F', metavar='FILTER[:options]', action='append',
548
+ help='Add a filter to the token stream. (Query names with -L.) '
549
+ 'Filter options are given after a colon if necessary.')
550
+ operation.add_argument(
551
+ '-f', metavar='FORMATTER',
552
+ help='Specify the formatter to use. (Query names with -L.) '
553
+ 'If not given, the formatter is guessed from the output filename, '
554
+ 'and defaults to the terminal formatter if the output is to the '
555
+ 'terminal or an unknown file extension.')
556
+ operation.add_argument(
557
+ '-O', metavar='OPTION=value[,OPTION=value,...]', action='append',
558
+ help='Give options to the lexer and formatter as a comma-separated '
559
+ 'list of key-value pairs. '
560
+ 'Example: `-O bg=light,python=cool`.')
561
+ operation.add_argument(
562
+ '-P', metavar='OPTION=value', action='append',
563
+ help='Give a single option to the lexer and formatter - with this '
564
+ 'you can pass options whose value contains commas and equal signs. '
565
+ 'Example: `-P "heading=Pygments, the Python highlighter"`.')
566
+ operation.add_argument(
567
+ '-o', metavar='OUTPUTFILE',
568
+ help='Where to write the output. Defaults to standard output.')
569
+
570
+ operation.add_argument(
571
+ 'INPUTFILE', nargs='?',
572
+ help='Where to read the input. Defaults to standard input.')
573
+
574
+ flags = parser.add_argument_group('Operation flags')
575
+ flags.add_argument(
576
+ '-v', action='store_true',
577
+ help='Print a detailed traceback on unhandled exceptions, which '
578
+ 'is useful for debugging and bug reports.')
579
+ flags.add_argument(
580
+ '-s', action='store_true',
581
+ help='Process lines one at a time until EOF, rather than waiting to '
582
+ 'process the entire file. This only works for stdin, only for lexers '
583
+ 'with no line-spanning constructs, and is intended for streaming '
584
+ 'input such as you get from `tail -f`. '
585
+ 'Example usage: `tail -f sql.log | pygmentize -s -l sql`.')
586
+ flags.add_argument(
587
+ '-x', action='store_true',
588
+ help='Allow custom lexers and formatters to be loaded from a .py file '
589
+ 'relative to the current working directory. For example, '
590
+ '`-l ./customlexer.py -x`. By default, this option expects a file '
591
+ 'with a class named CustomLexer or CustomFormatter; you can also '
592
+ 'specify your own class name with a colon (`-l ./lexer.py:MyLexer`). '
593
+ 'Users should be very careful not to use this option with untrusted '
594
+ 'files, because it will import and run them.')
595
+ flags.add_argument('--json', help='Output as JSON. This can '
596
+ 'be only used in conjunction with -L.',
597
+ default=False,
598
+ action='store_true')
599
+
600
+ special_modes_group = parser.add_argument_group(
601
+ 'Special modes - do not do any highlighting')
602
+ special_modes = special_modes_group.add_mutually_exclusive_group()
603
+ special_modes.add_argument(
604
+ '-S', metavar='STYLE -f formatter',
605
+ help='Print style definitions for STYLE for a formatter '
606
+ 'given with -f. The argument given by -a is formatter '
607
+ 'dependent.')
608
+ special_modes.add_argument(
609
+ '-L', nargs='*', metavar='WHAT',
610
+ help='List lexers, formatters, styles or filters -- '
611
+ 'give additional arguments for the thing(s) you want to list '
612
+ '(e.g. "styles"), or omit them to list everything.')
613
+ special_modes.add_argument(
614
+ '-N', metavar='FILENAME',
615
+ help='Guess and print out a lexer name based solely on the given '
616
+ 'filename. Does not take input or highlight anything. If no specific '
617
+ 'lexer can be determined, "text" is printed.')
618
+ special_modes.add_argument(
619
+ '-C', action='store_true',
620
+ help='Like -N, but print out a lexer name based solely on '
621
+ 'a given content from standard input.')
622
+ special_modes.add_argument(
623
+ '-H', action='store', nargs=2, metavar=('NAME', 'TYPE'),
624
+ help='Print detailed help for the object <name> of type <type>, '
625
+ 'where <type> is one of "lexer", "formatter" or "filter".')
626
+ special_modes.add_argument(
627
+ '-V', action='store_true',
628
+ help='Print the package version.')
629
+ special_modes.add_argument(
630
+ '-h', '--help', action='store_true',
631
+ help='Print this help.')
632
+ special_modes_group.add_argument(
633
+ '-a', metavar='ARG',
634
+ help='Formatter-specific additional argument for the -S (print '
635
+ 'style sheet) mode.')
636
+
637
+ argns = parser.parse_args(args[1:])
638
+
639
+ try:
640
+ return main_inner(parser, argns)
641
+ except BrokenPipeError:
642
+ # someone closed our stdout, e.g. by quitting a pager.
643
+ return 0
644
+ except Exception:
645
+ if argns.v:
646
+ print(file=sys.stderr)
647
+ print('*' * 65, file=sys.stderr)
648
+ print('An unhandled exception occurred while highlighting.',
649
+ file=sys.stderr)
650
+ print('Please report the whole traceback to the issue tracker at',
651
+ file=sys.stderr)
652
+ print('<https://github.com/pygments/pygments/issues>.',
653
+ file=sys.stderr)
654
+ print('*' * 65, file=sys.stderr)
655
+ print(file=sys.stderr)
656
+ raise
657
+ import traceback
658
+ info = traceback.format_exception(*sys.exc_info())
659
+ msg = info[-1].strip()
660
+ if len(info) >= 3:
661
+ # extract relevant file and position info
662
+ msg += '\n (f{})'.format(info[-2].split('\n')[0].strip()[1:])
663
+ print(file=sys.stderr)
664
+ print('*** Error while highlighting:', file=sys.stderr)
665
+ print(msg, file=sys.stderr)
666
+ print('*** If this is a bug you want to report, please rerun with -v.',
667
+ file=sys.stderr)
668
+ return 1
.cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments/filter.py ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ pygments.filter
3
+ ~~~~~~~~~~~~~~~
4
+
5
+ Module that implements the default filter.
6
+
7
+ :copyright: Copyright 2006-present by the Pygments team, see AUTHORS.
8
+ :license: BSD, see LICENSE for details.
9
+ """
10
+
11
+
12
+ def apply_filters(stream, filters, lexer=None):
13
+ """
14
+ Use this method to apply an iterable of filters to
15
+ a stream. If lexer is given it's forwarded to the
16
+ filter, otherwise the filter receives `None`.
17
+ """
18
+ def _apply(filter_, stream):
19
+ yield from filter_.filter(lexer, stream)
20
+ for filter_ in filters:
21
+ stream = _apply(filter_, stream)
22
+ return stream
23
+
24
+
25
+ def simplefilter(f):
26
+ """
27
+ Decorator that converts a function into a filter::
28
+
29
+ @simplefilter
30
+ def lowercase(self, lexer, stream, options):
31
+ for ttype, value in stream:
32
+ yield ttype, value.lower()
33
+ """
34
+ return type(f.__name__, (FunctionFilter,), {
35
+ '__module__': getattr(f, '__module__'),
36
+ '__doc__': f.__doc__,
37
+ 'function': f,
38
+ })
39
+
40
+
41
+ class Filter:
42
+ """
43
+ Default filter. Subclass this class or use the `simplefilter`
44
+ decorator to create own filters.
45
+ """
46
+
47
+ def __init__(self, **options):
48
+ self.options = options
49
+
50
+ def filter(self, lexer, stream):
51
+ raise NotImplementedError()
52
+
53
+
54
+ class FunctionFilter(Filter):
55
+ """
56
+ Abstract class used by `simplefilter` to create simple
57
+ function filters on the fly. The `simplefilter` decorator
58
+ automatically creates subclasses of this class for
59
+ functions passed to it.
60
+ """
61
+ function = None
62
+
63
+ def __init__(self, **options):
64
+ if not hasattr(self, 'function'):
65
+ raise TypeError(f'{self.__class__.__name__!r} used without bound function')
66
+ Filter.__init__(self, **options)
67
+
68
+ def filter(self, lexer, stream):
69
+ # pylint: disable=not-callable
70
+ yield from self.function(lexer, stream, self.options)
.cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments/formatter.py ADDED
@@ -0,0 +1,129 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ pygments.formatter
3
+ ~~~~~~~~~~~~~~~~~~
4
+
5
+ Base formatter class.
6
+
7
+ :copyright: Copyright 2006-present by the Pygments team, see AUTHORS.
8
+ :license: BSD, see LICENSE for details.
9
+ """
10
+
11
+ import codecs
12
+
13
+ from pygments.util import get_bool_opt
14
+ from pygments.styles import get_style_by_name
15
+
16
+ __all__ = ['Formatter']
17
+
18
+
19
+ def _lookup_style(style):
20
+ if isinstance(style, str):
21
+ return get_style_by_name(style)
22
+ return style
23
+
24
+
25
+ class Formatter:
26
+ """
27
+ Converts a token stream to text.
28
+
29
+ Formatters should have attributes to help selecting them. These
30
+ are similar to the corresponding :class:`~pygments.lexer.Lexer`
31
+ attributes.
32
+
33
+ .. autoattribute:: name
34
+ :no-value:
35
+
36
+ .. autoattribute:: aliases
37
+ :no-value:
38
+
39
+ .. autoattribute:: filenames
40
+ :no-value:
41
+
42
+ You can pass options as keyword arguments to the constructor.
43
+ All formatters accept these basic options:
44
+
45
+ ``style``
46
+ The style to use, can be a string or a Style subclass
47
+ (default: "default"). Not used by e.g. the
48
+ TerminalFormatter.
49
+ ``full``
50
+ Tells the formatter to output a "full" document, i.e.
51
+ a complete self-contained document. This doesn't have
52
+ any effect for some formatters (default: false).
53
+ ``title``
54
+ If ``full`` is true, the title that should be used to
55
+ caption the document (default: '').
56
+ ``encoding``
57
+ If given, must be an encoding name. This will be used to
58
+ convert the Unicode token strings to byte strings in the
59
+ output. If it is "" or None, Unicode strings will be written
60
+ to the output file, which most file-like objects do not
61
+ support (default: None).
62
+ ``outencoding``
63
+ Overrides ``encoding`` if given.
64
+
65
+ """
66
+
67
+ #: Full name for the formatter, in human-readable form.
68
+ name = None
69
+
70
+ #: A list of short, unique identifiers that can be used to lookup
71
+ #: the formatter from a list, e.g. using :func:`.get_formatter_by_name()`.
72
+ aliases = []
73
+
74
+ #: A list of fnmatch patterns that match filenames for which this
75
+ #: formatter can produce output. The patterns in this list should be unique
76
+ #: among all formatters.
77
+ filenames = []
78
+
79
+ #: If True, this formatter outputs Unicode strings when no encoding
80
+ #: option is given.
81
+ unicodeoutput = True
82
+
83
+ def __init__(self, **options):
84
+ """
85
+ As with lexers, this constructor takes arbitrary optional arguments,
86
+ and if you override it, you should first process your own options, then
87
+ call the base class implementation.
88
+ """
89
+ self.style = _lookup_style(options.get('style', 'default'))
90
+ self.full = get_bool_opt(options, 'full', False)
91
+ self.title = options.get('title', '')
92
+ self.encoding = options.get('encoding', None) or None
93
+ if self.encoding in ('guess', 'chardet'):
94
+ # can happen for e.g. pygmentize -O encoding=guess
95
+ self.encoding = 'utf-8'
96
+ self.encoding = options.get('outencoding') or self.encoding
97
+ self.options = options
98
+
99
+ def get_style_defs(self, arg=''):
100
+ """
101
+ This method must return statements or declarations suitable to define
102
+ the current style for subsequent highlighted text (e.g. CSS classes
103
+ in the `HTMLFormatter`).
104
+
105
+ The optional argument `arg` can be used to modify the generation and
106
+ is formatter dependent (it is standardized because it can be given on
107
+ the command line).
108
+
109
+ This method is called by the ``-S`` :doc:`command-line option <cmdline>`,
110
+ the `arg` is then given by the ``-a`` option.
111
+ """
112
+ return ''
113
+
114
+ def format(self, tokensource, outfile):
115
+ """
116
+ This method must format the tokens from the `tokensource` iterable and
117
+ write the formatted version to the file object `outfile`.
118
+
119
+ Formatter options can control how exactly the tokens are converted.
120
+ """
121
+ if self.encoding:
122
+ # wrap the outfile in a StreamWriter
123
+ outfile = codecs.lookup(self.encoding)[3](outfile)
124
+ return self.format_unencoded(tokensource, outfile)
125
+
126
+ # Allow writing Formatter[str] or Formatter[bytes]. That's equivalent to
127
+ # Formatter. This helps when using third-party type stubs from typeshed.
128
+ def __class_getitem__(cls, name):
129
+ return cls
.cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments/lexer.py ADDED
@@ -0,0 +1,963 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ pygments.lexer
3
+ ~~~~~~~~~~~~~~
4
+
5
+ Base lexer classes.
6
+
7
+ :copyright: Copyright 2006-present by the Pygments team, see AUTHORS.
8
+ :license: BSD, see LICENSE for details.
9
+ """
10
+
11
+ import re
12
+ import sys
13
+ import time
14
+
15
+ from pygments.filter import apply_filters, Filter
16
+ from pygments.filters import get_filter_by_name
17
+ from pygments.token import Error, Text, Other, Whitespace, _TokenType
18
+ from pygments.util import get_bool_opt, get_int_opt, get_list_opt, \
19
+ make_analysator, Future, guess_decode
20
+ from pygments.regexopt import regex_opt
21
+
22
+ __all__ = ['Lexer', 'RegexLexer', 'ExtendedRegexLexer', 'DelegatingLexer',
23
+ 'LexerContext', 'include', 'inherit', 'bygroups', 'using', 'this',
24
+ 'default', 'words', 'line_re']
25
+
26
+ line_re = re.compile('.*?\n')
27
+
28
+ _encoding_map = [(b'\xef\xbb\xbf', 'utf-8'),
29
+ (b'\xff\xfe\0\0', 'utf-32'),
30
+ (b'\0\0\xfe\xff', 'utf-32be'),
31
+ (b'\xff\xfe', 'utf-16'),
32
+ (b'\xfe\xff', 'utf-16be')]
33
+
34
+ _default_analyse = staticmethod(lambda x: 0.0)
35
+
36
+
37
+ class LexerMeta(type):
38
+ """
39
+ This metaclass automagically converts ``analyse_text`` methods into
40
+ static methods which always return float values.
41
+ """
42
+
43
+ def __new__(mcs, name, bases, d):
44
+ if 'analyse_text' in d:
45
+ d['analyse_text'] = make_analysator(d['analyse_text'])
46
+ return type.__new__(mcs, name, bases, d)
47
+
48
+
49
+ class Lexer(metaclass=LexerMeta):
50
+ """
51
+ Lexer for a specific language.
52
+
53
+ See also :doc:`lexerdevelopment`, a high-level guide to writing
54
+ lexers.
55
+
56
+ Lexer classes have attributes used for choosing the most appropriate
57
+ lexer based on various criteria.
58
+
59
+ .. autoattribute:: name
60
+ :no-value:
61
+ .. autoattribute:: aliases
62
+ :no-value:
63
+ .. autoattribute:: filenames
64
+ :no-value:
65
+ .. autoattribute:: alias_filenames
66
+ .. autoattribute:: mimetypes
67
+ :no-value:
68
+ .. autoattribute:: priority
69
+
70
+ Lexers included in Pygments should have two additional attributes:
71
+
72
+ .. autoattribute:: url
73
+ :no-value:
74
+ .. autoattribute:: version_added
75
+ :no-value:
76
+
77
+ Lexers included in Pygments may have additional attributes:
78
+
79
+ .. autoattribute:: _example
80
+ :no-value:
81
+
82
+ You can pass options to the constructor. The basic options recognized
83
+ by all lexers and processed by the base `Lexer` class are:
84
+
85
+ ``stripnl``
86
+ Strip leading and trailing newlines from the input (default: True).
87
+ ``stripall``
88
+ Strip all leading and trailing whitespace from the input
89
+ (default: False).
90
+ ``ensurenl``
91
+ Make sure that the input ends with a newline (default: True). This
92
+ is required for some lexers that consume input linewise.
93
+
94
+ .. versionadded:: 1.3
95
+
96
+ ``tabsize``
97
+ If given and greater than 0, expand tabs in the input (default: 0).
98
+ ``encoding``
99
+ If given, must be an encoding name. This encoding will be used to
100
+ convert the input string to Unicode, if it is not already a Unicode
101
+ string (default: ``'guess'``, which uses a simple UTF-8 / Locale /
102
+ Latin1 detection. Can also be ``'chardet'`` to use the chardet
103
+ library, if it is installed.
104
+ ``inencoding``
105
+ Overrides the ``encoding`` if given.
106
+ """
107
+
108
+ #: Full name of the lexer, in human-readable form
109
+ name = None
110
+
111
+ #: A list of short, unique identifiers that can be used to look
112
+ #: up the lexer from a list, e.g., using `get_lexer_by_name()`.
113
+ aliases = []
114
+
115
+ #: A list of `fnmatch` patterns that match filenames which contain
116
+ #: content for this lexer. The patterns in this list should be unique among
117
+ #: all lexers.
118
+ filenames = []
119
+
120
+ #: A list of `fnmatch` patterns that match filenames which may or may not
121
+ #: contain content for this lexer. This list is used by the
122
+ #: :func:`.guess_lexer_for_filename()` function, to determine which lexers
123
+ #: are then included in guessing the correct one. That means that
124
+ #: e.g. every lexer for HTML and a template language should include
125
+ #: ``\*.html`` in this list.
126
+ alias_filenames = []
127
+
128
+ #: A list of MIME types for content that can be lexed with this lexer.
129
+ mimetypes = []
130
+
131
+ #: Priority, should multiple lexers match and no content is provided
132
+ priority = 0
133
+
134
+ #: URL of the language specification/definition. Used in the Pygments
135
+ #: documentation. Set to an empty string to disable.
136
+ url = None
137
+
138
+ #: Version of Pygments in which the lexer was added.
139
+ version_added = None
140
+
141
+ #: Example file name. Relative to the ``tests/examplefiles`` directory.
142
+ #: This is used by the documentation generator to show an example.
143
+ _example = None
144
+
145
+ def __init__(self, **options):
146
+ """
147
+ This constructor takes arbitrary options as keyword arguments.
148
+ Every subclass must first process its own options and then call
149
+ the `Lexer` constructor, since it processes the basic
150
+ options like `stripnl`.
151
+
152
+ An example looks like this:
153
+
154
+ .. sourcecode:: python
155
+
156
+ def __init__(self, **options):
157
+ self.compress = options.get('compress', '')
158
+ Lexer.__init__(self, **options)
159
+
160
+ As these options must all be specifiable as strings (due to the
161
+ command line usage), there are various utility functions
162
+ available to help with that, see `Utilities`_.
163
+ """
164
+ self.options = options
165
+ self.stripnl = get_bool_opt(options, 'stripnl', True)
166
+ self.stripall = get_bool_opt(options, 'stripall', False)
167
+ self.ensurenl = get_bool_opt(options, 'ensurenl', True)
168
+ self.tabsize = get_int_opt(options, 'tabsize', 0)
169
+ self.encoding = options.get('encoding', 'guess')
170
+ self.encoding = options.get('inencoding') or self.encoding
171
+ self.filters = []
172
+ for filter_ in get_list_opt(options, 'filters', ()):
173
+ self.add_filter(filter_)
174
+
175
+ def __repr__(self):
176
+ if self.options:
177
+ return f'<pygments.lexers.{self.__class__.__name__} with {self.options!r}>'
178
+ else:
179
+ return f'<pygments.lexers.{self.__class__.__name__}>'
180
+
181
+ def add_filter(self, filter_, **options):
182
+ """
183
+ Add a new stream filter to this lexer.
184
+ """
185
+ if not isinstance(filter_, Filter):
186
+ filter_ = get_filter_by_name(filter_, **options)
187
+ self.filters.append(filter_)
188
+
189
+ def analyse_text(text):
190
+ """
191
+ A static method which is called for lexer guessing.
192
+
193
+ It should analyse the text and return a float in the range
194
+ from ``0.0`` to ``1.0``. If it returns ``0.0``, the lexer
195
+ will not be selected as the most probable one, if it returns
196
+ ``1.0``, it will be selected immediately. This is used by
197
+ `guess_lexer`.
198
+
199
+ The `LexerMeta` metaclass automatically wraps this function so
200
+ that it works like a static method (no ``self`` or ``cls``
201
+ parameter) and the return value is automatically converted to
202
+ `float`. If the return value is an object that is boolean `False`
203
+ it's the same as if the return values was ``0.0``.
204
+ """
205
+
206
+ def _preprocess_lexer_input(self, text):
207
+ """Apply preprocessing such as decoding the input, removing BOM and normalizing newlines."""
208
+
209
+ if not isinstance(text, str):
210
+ if self.encoding == 'guess':
211
+ text, _ = guess_decode(text)
212
+ elif self.encoding == 'chardet':
213
+ try:
214
+ import chardet
215
+ except ImportError as e:
216
+ raise ImportError('To enable chardet encoding guessing, '
217
+ 'please install the chardet library '
218
+ 'from http://chardet.feedparser.org/') from e
219
+ # check for BOM first
220
+ decoded = None
221
+ for bom, encoding in _encoding_map:
222
+ if text.startswith(bom):
223
+ decoded = text[len(bom):].decode(encoding, 'replace')
224
+ break
225
+ # no BOM found, so use chardet
226
+ if decoded is None:
227
+ enc = chardet.detect(text[:1024]) # Guess using first 1KB
228
+ decoded = text.decode(enc.get('encoding') or 'utf-8',
229
+ 'replace')
230
+ text = decoded
231
+ else:
232
+ text = text.decode(self.encoding)
233
+ if text.startswith('\ufeff'):
234
+ text = text[len('\ufeff'):]
235
+ else:
236
+ if text.startswith('\ufeff'):
237
+ text = text[len('\ufeff'):]
238
+
239
+ # text now *is* a unicode string
240
+ text = text.replace('\r\n', '\n')
241
+ text = text.replace('\r', '\n')
242
+ if self.stripall:
243
+ text = text.strip()
244
+ elif self.stripnl:
245
+ text = text.strip('\n')
246
+ if self.tabsize > 0:
247
+ text = text.expandtabs(self.tabsize)
248
+ if self.ensurenl and not text.endswith('\n'):
249
+ text += '\n'
250
+
251
+ return text
252
+
253
+ def get_tokens(self, text, unfiltered=False):
254
+ """
255
+ This method is the basic interface of a lexer. It is called by
256
+ the `highlight()` function. It must process the text and return an
257
+ iterable of ``(tokentype, value)`` pairs from `text`.
258
+
259
+ Normally, you don't need to override this method. The default
260
+ implementation processes the options recognized by all lexers
261
+ (`stripnl`, `stripall` and so on), and then yields all tokens
262
+ from `get_tokens_unprocessed()`, with the ``index`` dropped.
263
+
264
+ If `unfiltered` is set to `True`, the filtering mechanism is
265
+ bypassed even if filters are defined.
266
+ """
267
+ text = self._preprocess_lexer_input(text)
268
+
269
+ def streamer():
270
+ for _, t, v in self.get_tokens_unprocessed(text):
271
+ yield t, v
272
+ stream = streamer()
273
+ if not unfiltered:
274
+ stream = apply_filters(stream, self.filters, self)
275
+ return stream
276
+
277
+ def get_tokens_unprocessed(self, text):
278
+ """
279
+ This method should process the text and return an iterable of
280
+ ``(index, tokentype, value)`` tuples where ``index`` is the starting
281
+ position of the token within the input text.
282
+
283
+ It must be overridden by subclasses. It is recommended to
284
+ implement it as a generator to maximize effectiveness.
285
+ """
286
+ raise NotImplementedError
287
+
288
+
289
+ class DelegatingLexer(Lexer):
290
+ """
291
+ This lexer takes two lexer as arguments. A root lexer and
292
+ a language lexer. First everything is scanned using the language
293
+ lexer, afterwards all ``Other`` tokens are lexed using the root
294
+ lexer.
295
+
296
+ The lexers from the ``template`` lexer package use this base lexer.
297
+ """
298
+
299
+ def __init__(self, _root_lexer, _language_lexer, _needle=Other, **options):
300
+ self.root_lexer = _root_lexer(**options)
301
+ self.language_lexer = _language_lexer(**options)
302
+ self.needle = _needle
303
+ Lexer.__init__(self, **options)
304
+
305
+ def get_tokens_unprocessed(self, text):
306
+ buffered = ''
307
+ insertions = []
308
+ lng_buffer = []
309
+ for i, t, v in self.language_lexer.get_tokens_unprocessed(text):
310
+ if t is self.needle:
311
+ if lng_buffer:
312
+ insertions.append((len(buffered), lng_buffer))
313
+ lng_buffer = []
314
+ buffered += v
315
+ else:
316
+ lng_buffer.append((i, t, v))
317
+ if lng_buffer:
318
+ insertions.append((len(buffered), lng_buffer))
319
+ return do_insertions(insertions,
320
+ self.root_lexer.get_tokens_unprocessed(buffered))
321
+
322
+
323
+ # ------------------------------------------------------------------------------
324
+ # RegexLexer and ExtendedRegexLexer
325
+ #
326
+
327
+
328
+ class include(str): # pylint: disable=invalid-name
329
+ """
330
+ Indicates that a state should include rules from another state.
331
+ """
332
+ pass
333
+
334
+
335
+ class _inherit:
336
+ """
337
+ Indicates the a state should inherit from its superclass.
338
+ """
339
+ def __repr__(self):
340
+ return 'inherit'
341
+
342
+ inherit = _inherit() # pylint: disable=invalid-name
343
+
344
+
345
+ class combined(tuple): # pylint: disable=invalid-name
346
+ """
347
+ Indicates a state combined from multiple states.
348
+ """
349
+
350
+ def __new__(cls, *args):
351
+ return tuple.__new__(cls, args)
352
+
353
+ def __init__(self, *args):
354
+ # tuple.__init__ doesn't do anything
355
+ pass
356
+
357
+
358
+ class _PseudoMatch:
359
+ """
360
+ A pseudo match object constructed from a string.
361
+ """
362
+
363
+ def __init__(self, start, text):
364
+ self._text = text
365
+ self._start = start
366
+
367
+ def start(self, arg=None):
368
+ return self._start
369
+
370
+ def end(self, arg=None):
371
+ return self._start + len(self._text)
372
+
373
+ def group(self, arg=None):
374
+ if arg:
375
+ raise IndexError('No such group')
376
+ return self._text
377
+
378
+ def groups(self):
379
+ return (self._text,)
380
+
381
+ def groupdict(self):
382
+ return {}
383
+
384
+
385
+ def bygroups(*args):
386
+ """
387
+ Callback that yields multiple actions for each group in the match.
388
+ """
389
+ def callback(lexer, match, ctx=None):
390
+ for i, action in enumerate(args):
391
+ if action is None:
392
+ continue
393
+ elif type(action) is _TokenType:
394
+ data = match.group(i + 1)
395
+ if data:
396
+ yield match.start(i + 1), action, data
397
+ else:
398
+ data = match.group(i + 1)
399
+ if data is not None:
400
+ if ctx:
401
+ ctx.pos = match.start(i + 1)
402
+ for item in action(lexer,
403
+ _PseudoMatch(match.start(i + 1), data), ctx):
404
+ if item:
405
+ yield item
406
+ if ctx:
407
+ ctx.pos = match.end()
408
+ return callback
409
+
410
+
411
+ class _This:
412
+ """
413
+ Special singleton used for indicating the caller class.
414
+ Used by ``using``.
415
+ """
416
+
417
+ this = _This()
418
+
419
+
420
+ def using(_other, **kwargs):
421
+ """
422
+ Callback that processes the match with a different lexer.
423
+
424
+ The keyword arguments are forwarded to the lexer, except `state` which
425
+ is handled separately.
426
+
427
+ `state` specifies the state that the new lexer will start in, and can
428
+ be an enumerable such as ('root', 'inline', 'string') or a simple
429
+ string which is assumed to be on top of the root state.
430
+
431
+ Note: For that to work, `_other` must not be an `ExtendedRegexLexer`.
432
+ """
433
+ gt_kwargs = {}
434
+ if 'state' in kwargs:
435
+ s = kwargs.pop('state')
436
+ if isinstance(s, (list, tuple)):
437
+ gt_kwargs['stack'] = s
438
+ else:
439
+ gt_kwargs['stack'] = ('root', s)
440
+
441
+ if _other is this:
442
+ def callback(lexer, match, ctx=None):
443
+ # if keyword arguments are given the callback
444
+ # function has to create a new lexer instance
445
+ if kwargs:
446
+ # XXX: cache that somehow
447
+ d = dict(lexer.options)
448
+ d.update(kwargs)
449
+ lx = lexer.__class__(**d)
450
+ else:
451
+ lx = lexer
452
+ s = match.start()
453
+ for i, t, v in lx.get_tokens_unprocessed(match.group(), **gt_kwargs):
454
+ yield i + s, t, v
455
+ if ctx:
456
+ ctx.pos = match.end()
457
+ else:
458
+ def callback(lexer, match, ctx=None):
459
+ # XXX: cache that somehow
460
+ d = dict(lexer.options)
461
+ d.update(kwargs)
462
+ lx = _other(**d)
463
+
464
+ s = match.start()
465
+ for i, t, v in lx.get_tokens_unprocessed(match.group(), **gt_kwargs):
466
+ yield i + s, t, v
467
+ if ctx:
468
+ ctx.pos = match.end()
469
+ return callback
470
+
471
+
472
+ class default:
473
+ """
474
+ Indicates a state or state action (e.g. #pop) to apply.
475
+ For example default('#pop') is equivalent to ('', Token, '#pop')
476
+ Note that state tuples may be used as well.
477
+
478
+ .. versionadded:: 2.0
479
+ """
480
+ def __init__(self, state):
481
+ self.state = state
482
+
483
+
484
+ class words(Future):
485
+ """
486
+ Indicates a list of literal words that is transformed into an optimized
487
+ regex that matches any of the words.
488
+
489
+ .. versionadded:: 2.0
490
+ """
491
+ def __init__(self, words, prefix='', suffix=''):
492
+ self.words = words
493
+ self.prefix = prefix
494
+ self.suffix = suffix
495
+
496
+ def get(self):
497
+ return regex_opt(self.words, prefix=self.prefix, suffix=self.suffix)
498
+
499
+
500
+ class RegexLexerMeta(LexerMeta):
501
+ """
502
+ Metaclass for RegexLexer, creates the self._tokens attribute from
503
+ self.tokens on the first instantiation.
504
+ """
505
+
506
+ def _process_regex(cls, regex, rflags, state):
507
+ """Preprocess the regular expression component of a token definition."""
508
+ if isinstance(regex, Future):
509
+ regex = regex.get()
510
+ return re.compile(regex, rflags).match
511
+
512
+ def _process_token(cls, token):
513
+ """Preprocess the token component of a token definition."""
514
+ assert type(token) is _TokenType or callable(token), \
515
+ f'token type must be simple type or callable, not {token!r}'
516
+ return token
517
+
518
+ def _process_new_state(cls, new_state, unprocessed, processed):
519
+ """Preprocess the state transition action of a token definition."""
520
+ if isinstance(new_state, str):
521
+ # an existing state
522
+ if new_state == '#pop':
523
+ return -1
524
+ elif new_state in unprocessed:
525
+ return (new_state,)
526
+ elif new_state == '#push':
527
+ return new_state
528
+ elif new_state[:5] == '#pop:':
529
+ return -int(new_state[5:])
530
+ else:
531
+ assert False, f'unknown new state {new_state!r}'
532
+ elif isinstance(new_state, combined):
533
+ # combine a new state from existing ones
534
+ tmp_state = '_tmp_%d' % cls._tmpname
535
+ cls._tmpname += 1
536
+ itokens = []
537
+ for istate in new_state:
538
+ assert istate != new_state, f'circular state ref {istate!r}'
539
+ itokens.extend(cls._process_state(unprocessed,
540
+ processed, istate))
541
+ processed[tmp_state] = itokens
542
+ return (tmp_state,)
543
+ elif isinstance(new_state, tuple):
544
+ # push more than one state
545
+ for istate in new_state:
546
+ assert (istate in unprocessed or
547
+ istate in ('#pop', '#push')), \
548
+ 'unknown new state ' + istate
549
+ return new_state
550
+ else:
551
+ assert False, f'unknown new state def {new_state!r}'
552
+
553
+ def _process_state(cls, unprocessed, processed, state):
554
+ """Preprocess a single state definition."""
555
+ assert isinstance(state, str), f"wrong state name {state!r}"
556
+ assert state[0] != '#', f"invalid state name {state!r}"
557
+ if state in processed:
558
+ return processed[state]
559
+ tokens = processed[state] = []
560
+ rflags = cls.flags
561
+ for tdef in unprocessed[state]:
562
+ if isinstance(tdef, include):
563
+ # it's a state reference
564
+ assert tdef != state, f"circular state reference {state!r}"
565
+ tokens.extend(cls._process_state(unprocessed, processed,
566
+ str(tdef)))
567
+ continue
568
+ if isinstance(tdef, _inherit):
569
+ # should be processed already, but may not in the case of:
570
+ # 1. the state has no counterpart in any parent
571
+ # 2. the state includes more than one 'inherit'
572
+ continue
573
+ if isinstance(tdef, default):
574
+ new_state = cls._process_new_state(tdef.state, unprocessed, processed)
575
+ tokens.append((re.compile('').match, None, new_state))
576
+ continue
577
+
578
+ assert type(tdef) is tuple, f"wrong rule def {tdef!r}"
579
+
580
+ try:
581
+ rex = cls._process_regex(tdef[0], rflags, state)
582
+ except Exception as err:
583
+ raise ValueError(f"uncompilable regex {tdef[0]!r} in state {state!r} of {cls!r}: {err}") from err
584
+
585
+ token = cls._process_token(tdef[1])
586
+
587
+ if len(tdef) == 2:
588
+ new_state = None
589
+ else:
590
+ new_state = cls._process_new_state(tdef[2],
591
+ unprocessed, processed)
592
+
593
+ tokens.append((rex, token, new_state))
594
+ return tokens
595
+
596
+ def process_tokendef(cls, name, tokendefs=None):
597
+ """Preprocess a dictionary of token definitions."""
598
+ processed = cls._all_tokens[name] = {}
599
+ tokendefs = tokendefs or cls.tokens[name]
600
+ for state in list(tokendefs):
601
+ cls._process_state(tokendefs, processed, state)
602
+ return processed
603
+
604
+ def get_tokendefs(cls):
605
+ """
606
+ Merge tokens from superclasses in MRO order, returning a single tokendef
607
+ dictionary.
608
+
609
+ Any state that is not defined by a subclass will be inherited
610
+ automatically. States that *are* defined by subclasses will, by
611
+ default, override that state in the superclass. If a subclass wishes to
612
+ inherit definitions from a superclass, it can use the special value
613
+ "inherit", which will cause the superclass' state definition to be
614
+ included at that point in the state.
615
+ """
616
+ tokens = {}
617
+ inheritable = {}
618
+ for c in cls.__mro__:
619
+ toks = c.__dict__.get('tokens', {})
620
+
621
+ for state, items in toks.items():
622
+ curitems = tokens.get(state)
623
+ if curitems is None:
624
+ # N.b. because this is assigned by reference, sufficiently
625
+ # deep hierarchies are processed incrementally (e.g. for
626
+ # A(B), B(C), C(RegexLexer), B will be premodified so X(B)
627
+ # will not see any inherits in B).
628
+ tokens[state] = items
629
+ try:
630
+ inherit_ndx = items.index(inherit)
631
+ except ValueError:
632
+ continue
633
+ inheritable[state] = inherit_ndx
634
+ continue
635
+
636
+ inherit_ndx = inheritable.pop(state, None)
637
+ if inherit_ndx is None:
638
+ continue
639
+
640
+ # Replace the "inherit" value with the items
641
+ curitems[inherit_ndx:inherit_ndx+1] = items
642
+ try:
643
+ # N.b. this is the index in items (that is, the superclass
644
+ # copy), so offset required when storing below.
645
+ new_inh_ndx = items.index(inherit)
646
+ except ValueError:
647
+ pass
648
+ else:
649
+ inheritable[state] = inherit_ndx + new_inh_ndx
650
+
651
+ return tokens
652
+
653
+ def __call__(cls, *args, **kwds):
654
+ """Instantiate cls after preprocessing its token definitions."""
655
+ if '_tokens' not in cls.__dict__:
656
+ cls._all_tokens = {}
657
+ cls._tmpname = 0
658
+ if hasattr(cls, 'token_variants') and cls.token_variants:
659
+ # don't process yet
660
+ pass
661
+ else:
662
+ cls._tokens = cls.process_tokendef('', cls.get_tokendefs())
663
+
664
+ return type.__call__(cls, *args, **kwds)
665
+
666
+
667
+ class RegexLexer(Lexer, metaclass=RegexLexerMeta):
668
+ """
669
+ Base for simple stateful regular expression-based lexers.
670
+ Simplifies the lexing process so that you need only
671
+ provide a list of states and regular expressions.
672
+ """
673
+
674
+ #: Flags for compiling the regular expressions.
675
+ #: Defaults to MULTILINE.
676
+ flags = re.MULTILINE
677
+
678
+ #: At all time there is a stack of states. Initially, the stack contains
679
+ #: a single state 'root'. The top of the stack is called "the current state".
680
+ #:
681
+ #: Dict of ``{'state': [(regex, tokentype, new_state), ...], ...}``
682
+ #:
683
+ #: ``new_state`` can be omitted to signify no state transition.
684
+ #: If ``new_state`` is a string, it is pushed on the stack. This ensure
685
+ #: the new current state is ``new_state``.
686
+ #: If ``new_state`` is a tuple of strings, all of those strings are pushed
687
+ #: on the stack and the current state will be the last element of the list.
688
+ #: ``new_state`` can also be ``combined('state1', 'state2', ...)``
689
+ #: to signify a new, anonymous state combined from the rules of two
690
+ #: or more existing ones.
691
+ #: Furthermore, it can be '#pop' to signify going back one step in
692
+ #: the state stack, or '#push' to push the current state on the stack
693
+ #: again. Note that if you push while in a combined state, the combined
694
+ #: state itself is pushed, and not only the state in which the rule is
695
+ #: defined.
696
+ #:
697
+ #: The tuple can also be replaced with ``include('state')``, in which
698
+ #: case the rules from the state named by the string are included in the
699
+ #: current one.
700
+ tokens = {}
701
+
702
+ def get_tokens_unprocessed(self, text, stack=('root',)):
703
+ """
704
+ Split ``text`` into (tokentype, text) pairs.
705
+
706
+ ``stack`` is the initial stack (default: ``['root']``)
707
+ """
708
+ pos = 0
709
+ tokendefs = self._tokens
710
+ statestack = list(stack)
711
+ statetokens = tokendefs[statestack[-1]]
712
+ while 1:
713
+ for rexmatch, action, new_state in statetokens:
714
+ m = rexmatch(text, pos)
715
+ if m:
716
+ if action is not None:
717
+ if type(action) is _TokenType:
718
+ yield pos, action, m.group()
719
+ else:
720
+ yield from action(self, m)
721
+ pos = m.end()
722
+ if new_state is not None:
723
+ # state transition
724
+ if isinstance(new_state, tuple):
725
+ for state in new_state:
726
+ if state == '#pop':
727
+ if len(statestack) > 1:
728
+ statestack.pop()
729
+ elif state == '#push':
730
+ statestack.append(statestack[-1])
731
+ else:
732
+ statestack.append(state)
733
+ elif isinstance(new_state, int):
734
+ # pop, but keep at least one state on the stack
735
+ # (random code leading to unexpected pops should
736
+ # not allow exceptions)
737
+ if abs(new_state) >= len(statestack):
738
+ del statestack[1:]
739
+ else:
740
+ del statestack[new_state:]
741
+ elif new_state == '#push':
742
+ statestack.append(statestack[-1])
743
+ else:
744
+ assert False, f"wrong state def: {new_state!r}"
745
+ statetokens = tokendefs[statestack[-1]]
746
+ break
747
+ else:
748
+ # We are here only if all state tokens have been considered
749
+ # and there was not a match on any of them.
750
+ try:
751
+ if text[pos] == '\n':
752
+ # at EOL, reset state to "root"
753
+ statestack = ['root']
754
+ statetokens = tokendefs['root']
755
+ yield pos, Whitespace, '\n'
756
+ pos += 1
757
+ continue
758
+ yield pos, Error, text[pos]
759
+ pos += 1
760
+ except IndexError:
761
+ break
762
+
763
+
764
+ class LexerContext:
765
+ """
766
+ A helper object that holds lexer position data.
767
+ """
768
+
769
+ def __init__(self, text, pos, stack=None, end=None):
770
+ self.text = text
771
+ self.pos = pos
772
+ self.end = end or len(text) # end=0 not supported ;-)
773
+ self.stack = stack or ['root']
774
+
775
+ def __repr__(self):
776
+ return f'LexerContext({self.text!r}, {self.pos!r}, {self.stack!r})'
777
+
778
+
779
+ class ExtendedRegexLexer(RegexLexer):
780
+ """
781
+ A RegexLexer that uses a context object to store its state.
782
+ """
783
+
784
+ def get_tokens_unprocessed(self, text=None, context=None):
785
+ """
786
+ Split ``text`` into (tokentype, text) pairs.
787
+ If ``context`` is given, use this lexer context instead.
788
+ """
789
+ tokendefs = self._tokens
790
+ if not context:
791
+ ctx = LexerContext(text, 0)
792
+ statetokens = tokendefs['root']
793
+ else:
794
+ ctx = context
795
+ statetokens = tokendefs[ctx.stack[-1]]
796
+ text = ctx.text
797
+ while 1:
798
+ for rexmatch, action, new_state in statetokens:
799
+ m = rexmatch(text, ctx.pos, ctx.end)
800
+ if m:
801
+ if action is not None:
802
+ if type(action) is _TokenType:
803
+ yield ctx.pos, action, m.group()
804
+ ctx.pos = m.end()
805
+ else:
806
+ yield from action(self, m, ctx)
807
+ if not new_state:
808
+ # altered the state stack?
809
+ statetokens = tokendefs[ctx.stack[-1]]
810
+ # CAUTION: callback must set ctx.pos!
811
+ if new_state is not None:
812
+ # state transition
813
+ if isinstance(new_state, tuple):
814
+ for state in new_state:
815
+ if state == '#pop':
816
+ if len(ctx.stack) > 1:
817
+ ctx.stack.pop()
818
+ elif state == '#push':
819
+ ctx.stack.append(ctx.stack[-1])
820
+ else:
821
+ ctx.stack.append(state)
822
+ elif isinstance(new_state, int):
823
+ # see RegexLexer for why this check is made
824
+ if abs(new_state) >= len(ctx.stack):
825
+ del ctx.stack[1:]
826
+ else:
827
+ del ctx.stack[new_state:]
828
+ elif new_state == '#push':
829
+ ctx.stack.append(ctx.stack[-1])
830
+ else:
831
+ assert False, f"wrong state def: {new_state!r}"
832
+ statetokens = tokendefs[ctx.stack[-1]]
833
+ break
834
+ else:
835
+ try:
836
+ if ctx.pos >= ctx.end:
837
+ break
838
+ if text[ctx.pos] == '\n':
839
+ # at EOL, reset state to "root"
840
+ ctx.stack = ['root']
841
+ statetokens = tokendefs['root']
842
+ yield ctx.pos, Text, '\n'
843
+ ctx.pos += 1
844
+ continue
845
+ yield ctx.pos, Error, text[ctx.pos]
846
+ ctx.pos += 1
847
+ except IndexError:
848
+ break
849
+
850
+
851
+ def do_insertions(insertions, tokens):
852
+ """
853
+ Helper for lexers which must combine the results of several
854
+ sublexers.
855
+
856
+ ``insertions`` is a list of ``(index, itokens)`` pairs.
857
+ Each ``itokens`` iterable should be inserted at position
858
+ ``index`` into the token stream given by the ``tokens``
859
+ argument.
860
+
861
+ The result is a combined token stream.
862
+
863
+ TODO: clean up the code here.
864
+ """
865
+ insertions = iter(insertions)
866
+ try:
867
+ index, itokens = next(insertions)
868
+ except StopIteration:
869
+ # no insertions
870
+ yield from tokens
871
+ return
872
+
873
+ realpos = None
874
+ insleft = True
875
+
876
+ # iterate over the token stream where we want to insert
877
+ # the tokens from the insertion list.
878
+ for i, t, v in tokens:
879
+ # first iteration. store the position of first item
880
+ if realpos is None:
881
+ realpos = i
882
+ oldi = 0
883
+ while insleft and i + len(v) >= index:
884
+ tmpval = v[oldi:index - i]
885
+ if tmpval:
886
+ yield realpos, t, tmpval
887
+ realpos += len(tmpval)
888
+ for it_index, it_token, it_value in itokens:
889
+ yield realpos, it_token, it_value
890
+ realpos += len(it_value)
891
+ oldi = index - i
892
+ try:
893
+ index, itokens = next(insertions)
894
+ except StopIteration:
895
+ insleft = False
896
+ break # not strictly necessary
897
+ if oldi < len(v):
898
+ yield realpos, t, v[oldi:]
899
+ realpos += len(v) - oldi
900
+
901
+ # leftover tokens
902
+ while insleft:
903
+ # no normal tokens, set realpos to zero
904
+ realpos = realpos or 0
905
+ for p, t, v in itokens:
906
+ yield realpos, t, v
907
+ realpos += len(v)
908
+ try:
909
+ index, itokens = next(insertions)
910
+ except StopIteration:
911
+ insleft = False
912
+ break # not strictly necessary
913
+
914
+
915
+ class ProfilingRegexLexerMeta(RegexLexerMeta):
916
+ """Metaclass for ProfilingRegexLexer, collects regex timing info."""
917
+
918
+ def _process_regex(cls, regex, rflags, state):
919
+ if isinstance(regex, words):
920
+ rex = regex_opt(regex.words, prefix=regex.prefix,
921
+ suffix=regex.suffix)
922
+ else:
923
+ rex = regex
924
+ compiled = re.compile(rex, rflags)
925
+
926
+ def match_func(text, pos, endpos=sys.maxsize):
927
+ info = cls._prof_data[-1].setdefault((state, rex), [0, 0.0])
928
+ t0 = time.time()
929
+ res = compiled.match(text, pos, endpos)
930
+ t1 = time.time()
931
+ info[0] += 1
932
+ info[1] += t1 - t0
933
+ return res
934
+ return match_func
935
+
936
+
937
+ class ProfilingRegexLexer(RegexLexer, metaclass=ProfilingRegexLexerMeta):
938
+ """Drop-in replacement for RegexLexer that does profiling of its regexes."""
939
+
940
+ _prof_data = []
941
+ _prof_sort_index = 4 # defaults to time per call
942
+
943
+ def get_tokens_unprocessed(self, text, stack=('root',)):
944
+ # this needs to be a stack, since using(this) will produce nested calls
945
+ self.__class__._prof_data.append({})
946
+ yield from RegexLexer.get_tokens_unprocessed(self, text, stack)
947
+ rawdata = self.__class__._prof_data.pop()
948
+ data = sorted(((s, repr(r).strip('u\'').replace('\\\\', '\\')[:65],
949
+ n, 1000 * t, 1000 * t / n)
950
+ for ((s, r), (n, t)) in rawdata.items()),
951
+ key=lambda x: x[self._prof_sort_index],
952
+ reverse=True)
953
+ sum_total = sum(x[3] for x in data)
954
+
955
+ print()
956
+ print('Profiling result for %s lexing %d chars in %.3f ms' %
957
+ (self.__class__.__name__, len(text), sum_total))
958
+ print('=' * 110)
959
+ print('%-20s %-64s ncalls tottime percall' % ('state', 'regex'))
960
+ print('-' * 110)
961
+ for d in data:
962
+ print('%-20s %-65s %5d %8.4f %8.4f' % d)
963
+ print('=' * 110)
.cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments/lexers/wren.py ADDED
@@ -0,0 +1,98 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ pygments.lexers.wren
3
+ ~~~~~~~~~~~~~~~~~~~~
4
+
5
+ Lexer for Wren.
6
+
7
+ :copyright: Copyright 2006-present by the Pygments team, see AUTHORS.
8
+ :license: BSD, see LICENSE for details.
9
+ """
10
+
11
+ import re
12
+
13
+ from pygments.lexer import include, RegexLexer, words
14
+ from pygments.token import Whitespace, Punctuation, Keyword, Name, Comment, \
15
+ Operator, Number, String
16
+
17
+ __all__ = ['WrenLexer']
18
+
19
+ class WrenLexer(RegexLexer):
20
+ """
21
+ For Wren source code, version 0.4.0.
22
+ """
23
+ name = 'Wren'
24
+ url = 'https://wren.io'
25
+ aliases = ['wren']
26
+ filenames = ['*.wren']
27
+ version_added = '2.14'
28
+
29
+ flags = re.MULTILINE | re.DOTALL
30
+
31
+ tokens = {
32
+ 'root': [
33
+ # Whitespace.
34
+ (r'\s+', Whitespace),
35
+ (r'[,\\\[\]{}]', Punctuation),
36
+
37
+ # Really 'root', not '#push': in 'interpolation',
38
+ # parentheses inside the interpolation expression are
39
+ # Punctuation, not String.Interpol.
40
+ (r'\(', Punctuation, 'root'),
41
+ (r'\)', Punctuation, '#pop'),
42
+
43
+ # Keywords.
44
+ (words((
45
+ 'as', 'break', 'class', 'construct', 'continue', 'else',
46
+ 'for', 'foreign', 'if', 'import', 'return', 'static', 'super',
47
+ 'this', 'var', 'while'), prefix = r'(?<!\.)',
48
+ suffix = r'\b'), Keyword),
49
+
50
+ (words((
51
+ 'true', 'false', 'null'), prefix = r'(?<!\.)',
52
+ suffix = r'\b'), Keyword.Constant),
53
+
54
+ (words((
55
+ 'in', 'is'), prefix = r'(?<!\.)',
56
+ suffix = r'\b'), Operator.Word),
57
+
58
+ # Comments.
59
+ (r'/\*', Comment.Multiline, 'comment'), # Multiline, can nest.
60
+ (r'//.*?$', Comment.Single), # Single line.
61
+ (r'#.*?(\(.*?\))?$', Comment.Special), # Attribute or shebang.
62
+
63
+ # Names and operators.
64
+ (r'[!%&*+\-./:<=>?\\^|~]+', Operator),
65
+ (r'[a-z][a-zA-Z_0-9]*', Name),
66
+ (r'[A-Z][a-zA-Z_0-9]*', Name.Class),
67
+ (r'__[a-zA-Z_0-9]*', Name.Variable.Class),
68
+ (r'_[a-zA-Z_0-9]*', Name.Variable.Instance),
69
+
70
+ # Numbers.
71
+ (r'0x[0-9a-fA-F]+', Number.Hex),
72
+ (r'\d+(\.\d+)?([eE][-+]?\d+)?', Number.Float),
73
+
74
+ # Strings.
75
+ (r'""".*?"""', String), # Raw string
76
+ (r'"', String, 'string'), # Other string
77
+ ],
78
+ 'comment': [
79
+ (r'/\*', Comment.Multiline, '#push'),
80
+ (r'\*/', Comment.Multiline, '#pop'),
81
+ (r'([^*/]|\*(?!/)|/(?!\*))+', Comment.Multiline),
82
+ ],
83
+ 'string': [
84
+ (r'"', String, '#pop'),
85
+ (r'\\[\\%"0abefnrtv]', String.Escape), # Escape.
86
+ (r'\\x[a-fA-F0-9]{2}', String.Escape), # Byte escape.
87
+ (r'\\u[a-fA-F0-9]{4}', String.Escape), # Unicode escape.
88
+ (r'\\U[a-fA-F0-9]{8}', String.Escape), # Long Unicode escape.
89
+
90
+ (r'%\(', String.Interpol, 'interpolation'),
91
+ (r'[^\\"%]+', String), # All remaining characters.
92
+ ],
93
+ 'interpolation': [
94
+ # redefine closing paren to be String.Interpol
95
+ (r'\)', String.Interpol, '#pop'),
96
+ include('root'),
97
+ ],
98
+ }
.cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments/lexers/x10.py ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ pygments.lexers.x10
3
+ ~~~~~~~~~~~~~~~~~~~
4
+
5
+ Lexers for the X10 programming language.
6
+
7
+ :copyright: Copyright 2006-present by the Pygments team, see AUTHORS.
8
+ :license: BSD, see LICENSE for details.
9
+ """
10
+
11
+ from pygments.lexer import RegexLexer
12
+ from pygments.token import Text, Comment, Keyword, String
13
+
14
+ __all__ = ['X10Lexer']
15
+
16
+
17
+ class X10Lexer(RegexLexer):
18
+ """
19
+ For the X10 language.
20
+ """
21
+
22
+ name = 'X10'
23
+ url = 'http://x10-lang.org/'
24
+ aliases = ['x10', 'xten']
25
+ filenames = ['*.x10']
26
+ mimetypes = ['text/x-x10']
27
+ version_added = '2.2'
28
+
29
+ keywords = (
30
+ 'as', 'assert', 'async', 'at', 'athome', 'ateach', 'atomic',
31
+ 'break', 'case', 'catch', 'class', 'clocked', 'continue',
32
+ 'def', 'default', 'do', 'else', 'final', 'finally', 'finish',
33
+ 'for', 'goto', 'haszero', 'here', 'if', 'import', 'in',
34
+ 'instanceof', 'interface', 'isref', 'new', 'offer',
35
+ 'operator', 'package', 'return', 'struct', 'switch', 'throw',
36
+ 'try', 'type', 'val', 'var', 'when', 'while'
37
+ )
38
+
39
+ types = (
40
+ 'void'
41
+ )
42
+
43
+ values = (
44
+ 'false', 'null', 'self', 'super', 'this', 'true'
45
+ )
46
+
47
+ modifiers = (
48
+ 'abstract', 'extends', 'implements', 'native', 'offers',
49
+ 'private', 'property', 'protected', 'public', 'static',
50
+ 'throws', 'transient'
51
+ )
52
+
53
+ tokens = {
54
+ 'root': [
55
+ (r'[^\S\n]+', Text),
56
+ (r'//.*?\n', Comment.Single),
57
+ (r'/\*(.|\n)*?\*/', Comment.Multiline),
58
+ (r'\b({})\b'.format('|'.join(keywords)), Keyword),
59
+ (r'\b({})\b'.format('|'.join(types)), Keyword.Type),
60
+ (r'\b({})\b'.format('|'.join(values)), Keyword.Constant),
61
+ (r'\b({})\b'.format('|'.join(modifiers)), Keyword.Declaration),
62
+ (r'"(\\\\|\\[^\\]|[^"\\])*"', String),
63
+ (r"'\\.'|'[^\\]'|'\\u[0-9a-fA-F]{4}'", String.Char),
64
+ (r'.', Text)
65
+ ],
66
+ }
.cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments/lexers/xorg.py ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ pygments.lexers.xorg
3
+ ~~~~~~~~~~~~~~~~~~~~
4
+
5
+ Lexers for Xorg configs.
6
+
7
+ :copyright: Copyright 2006-present by the Pygments team, see AUTHORS.
8
+ :license: BSD, see LICENSE for details.
9
+ """
10
+
11
+ from pygments.lexer import RegexLexer, bygroups
12
+ from pygments.token import Comment, String, Name, Text
13
+
14
+ __all__ = ['XorgLexer']
15
+
16
+
17
+ class XorgLexer(RegexLexer):
18
+ """Lexer for xorg.conf files."""
19
+ name = 'Xorg'
20
+ url = 'https://www.x.org/wiki/'
21
+ aliases = ['xorg.conf']
22
+ filenames = ['xorg.conf']
23
+ mimetypes = []
24
+ version_added = ''
25
+
26
+ tokens = {
27
+ 'root': [
28
+ (r'\s+', Text),
29
+ (r'#.*$', Comment),
30
+
31
+ (r'((?:Sub)?Section)(\s+)("\w+")',
32
+ bygroups(String.Escape, Text, String.Escape)),
33
+ (r'(End(?:Sub)?Section)', String.Escape),
34
+
35
+ (r'(\w+)(\s+)([^\n#]+)',
36
+ bygroups(Name.Builtin, Text, Name.Constant)),
37
+ ],
38
+ }
.cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments/lexers/yang.py ADDED
@@ -0,0 +1,103 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ pygments.lexers.yang
3
+ ~~~~~~~~~~~~~~~~~~~~
4
+
5
+ Lexer for the YANG 1.1 modeling language. See :rfc:`7950`.
6
+
7
+ :copyright: Copyright 2006-present by the Pygments team, see AUTHORS.
8
+ :license: BSD, see LICENSE for details.
9
+ """
10
+
11
+ from pygments.lexer import RegexLexer, bygroups, words
12
+ from pygments.token import Text, Token, Name, String, Comment, Number
13
+
14
+ __all__ = ['YangLexer']
15
+
16
+
17
+ class YangLexer(RegexLexer):
18
+ """
19
+ Lexer for YANG, based on RFC7950.
20
+ """
21
+ name = 'YANG'
22
+ url = 'https://tools.ietf.org/html/rfc7950/'
23
+ aliases = ['yang']
24
+ filenames = ['*.yang']
25
+ mimetypes = ['application/yang']
26
+ version_added = '2.7'
27
+
28
+ #Keywords from RFC7950 ; oriented at BNF style
29
+ TOP_STMTS_KEYWORDS = ("module", "submodule")
30
+ MODULE_HEADER_STMT_KEYWORDS = ("belongs-to", "namespace", "prefix", "yang-version")
31
+ META_STMT_KEYWORDS = ("contact", "description", "organization",
32
+ "reference", "revision")
33
+ LINKAGE_STMTS_KEYWORDS = ("import", "include", "revision-date")
34
+ BODY_STMT_KEYWORDS = ("action", "argument", "augment", "deviation",
35
+ "extension", "feature", "grouping", "identity",
36
+ "if-feature", "input", "notification", "output",
37
+ "rpc", "typedef")
38
+ DATA_DEF_STMT_KEYWORDS = ("anydata", "anyxml", "case", "choice",
39
+ "config", "container", "deviate", "leaf",
40
+ "leaf-list", "list", "must", "presence",
41
+ "refine", "uses", "when")
42
+ TYPE_STMT_KEYWORDS = ("base", "bit", "default", "enum", "error-app-tag",
43
+ "error-message", "fraction-digits", "length",
44
+ "max-elements", "min-elements", "modifier",
45
+ "ordered-by", "path", "pattern", "position",
46
+ "range", "require-instance", "status", "type",
47
+ "units", "value", "yin-element")
48
+ LIST_STMT_KEYWORDS = ("key", "mandatory", "unique")
49
+
50
+ #RFC7950 other keywords
51
+ CONSTANTS_KEYWORDS = ("add", "current", "delete", "deprecated", "false",
52
+ "invert-match", "max", "min", "not-supported",
53
+ "obsolete", "replace", "true", "unbounded", "user")
54
+
55
+ #RFC7950 Built-In Types
56
+ TYPES = ("binary", "bits", "boolean", "decimal64", "empty", "enumeration",
57
+ "identityref", "instance-identifier", "int16", "int32", "int64",
58
+ "int8", "leafref", "string", "uint16", "uint32", "uint64",
59
+ "uint8", "union")
60
+
61
+ suffix_re_pattern = r'(?=[^\w\-:])'
62
+
63
+ tokens = {
64
+ 'comments': [
65
+ (r'[^*/]', Comment),
66
+ (r'/\*', Comment, '#push'),
67
+ (r'\*/', Comment, '#pop'),
68
+ (r'[*/]', Comment),
69
+ ],
70
+ "root": [
71
+ (r'\s+', Text.Whitespace),
72
+ (r'[{};]+', Token.Punctuation),
73
+ (r'(?<![\-\w])(and|or|not|\+|\.)(?![\-\w])', Token.Operator),
74
+
75
+ (r'"(?:\\"|[^"])*?"', String.Double),
76
+ (r"'(?:\\'|[^'])*?'", String.Single),
77
+
78
+ (r'/\*', Comment, 'comments'),
79
+ (r'//.*?$', Comment),
80
+
81
+ #match BNF stmt for `node-identifier` with [ prefix ":"]
82
+ (r'(?:^|(?<=[\s{};]))([\w.-]+)(:)([\w.-]+)(?=[\s{};])',
83
+ bygroups(Name.Namespace, Token.Punctuation, Name.Variable)),
84
+
85
+ #match BNF stmt `date-arg-str`
86
+ (r'([0-9]{4}\-[0-9]{2}\-[0-9]{2})(?=[\s{};])', Name.Label),
87
+ (r'([0-9]+\.[0-9]+)(?=[\s{};])', Number.Float),
88
+ (r'([0-9]+)(?=[\s{};])', Number.Integer),
89
+
90
+ (words(TOP_STMTS_KEYWORDS, suffix=suffix_re_pattern), Token.Keyword),
91
+ (words(MODULE_HEADER_STMT_KEYWORDS, suffix=suffix_re_pattern), Token.Keyword),
92
+ (words(META_STMT_KEYWORDS, suffix=suffix_re_pattern), Token.Keyword),
93
+ (words(LINKAGE_STMTS_KEYWORDS, suffix=suffix_re_pattern), Token.Keyword),
94
+ (words(BODY_STMT_KEYWORDS, suffix=suffix_re_pattern), Token.Keyword),
95
+ (words(DATA_DEF_STMT_KEYWORDS, suffix=suffix_re_pattern), Token.Keyword),
96
+ (words(TYPE_STMT_KEYWORDS, suffix=suffix_re_pattern), Token.Keyword),
97
+ (words(LIST_STMT_KEYWORDS, suffix=suffix_re_pattern), Token.Keyword),
98
+ (words(TYPES, suffix=suffix_re_pattern), Name.Class),
99
+ (words(CONSTANTS_KEYWORDS, suffix=suffix_re_pattern), Name.Class),
100
+
101
+ (r'[^;{}\s\'"]+', Name.Variable),
102
+ ]
103
+ }
.cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments/lexers/yara.py ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ pygments.lexers.yara
3
+ ~~~~~~~~~~~~~~~~~~~~
4
+
5
+ Lexers for YARA.
6
+
7
+ :copyright: Copyright 2006-present by the Pygments team, see AUTHORS.
8
+ :license: BSD, see LICENSE for details.
9
+ """
10
+
11
+ from pygments.lexer import RegexLexer, words
12
+ from pygments.token import Comment, String, Name, Text, Punctuation, \
13
+ Operator, Keyword, Whitespace, Number
14
+
15
+ __all__ = ['YaraLexer']
16
+
17
+
18
+ class YaraLexer(RegexLexer):
19
+ """
20
+ For YARA rules
21
+ """
22
+
23
+ name = 'YARA'
24
+ url = 'https://virustotal.github.io/yara/'
25
+ aliases = ['yara', 'yar']
26
+ filenames = ['*.yar']
27
+ mimetypes = ['text/x-yara']
28
+ version_added = '2.16'
29
+
30
+ tokens = {
31
+ 'root': [
32
+ (r'\s+', Whitespace),
33
+ (r'//.*?$', Comment.Single),
34
+ (r'\#.*?$', Comment.Single),
35
+ (r'/\*', Comment.Multiline, 'comment'),
36
+ (words(('rule', 'private', 'global', 'import', 'include'),
37
+ prefix=r'\b', suffix=r'\b'),
38
+ Keyword.Declaration),
39
+ (words(('strings', 'condition', 'meta'), prefix=r'\b', suffix=r'\b'),
40
+ Keyword),
41
+ (words(('ascii', 'at', 'base64', 'base64wide', 'condition',
42
+ 'contains', 'endswith', 'entrypoint', 'filesize', 'for',
43
+ 'fullword', 'icontains', 'iendswith', 'iequals', 'in',
44
+ 'include', 'int16', 'int16be', 'int32', 'int32be', 'int8',
45
+ 'int8be', 'istartswith', 'matches', 'meta', 'nocase',
46
+ 'none', 'of', 'startswith', 'strings', 'them', 'uint16',
47
+ 'uint16be', 'uint32', 'uint32be', 'uint8', 'uint8be',
48
+ 'wide', 'xor', 'defined'),
49
+ prefix=r'\b', suffix=r'\b'),
50
+ Name.Builtin),
51
+ (r'(true|false)\b', Keyword.Constant),
52
+ (r'(and|or|not|any|all)\b', Operator.Word),
53
+ (r'(\$\w+)', Name.Variable),
54
+ (r'"[^"]*"', String.Double),
55
+ (r'\'[^\']*\'', String.Single),
56
+ (r'\{.*?\}$', Number.Hex),
57
+ (r'(/.*?/)', String.Regex),
58
+ (r'[a-z_]\w*', Name),
59
+ (r'[$(){}[\].?+*|]', Punctuation),
60
+ (r'[:=,;]', Punctuation),
61
+ (r'.', Text)
62
+ ],
63
+ 'comment': [
64
+ (r'[^*/]+', Comment.Multiline),
65
+ (r'/\*', Comment.Multiline, '#push'),
66
+ (r'\*/', Comment.Multiline, '#pop'),
67
+ (r'[*/]', Comment.Multiline)
68
+ ]
69
+ }
.cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments/lexers/zig.py ADDED
@@ -0,0 +1,125 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ pygments.lexers.zig
3
+ ~~~~~~~~~~~~~~~~~~~
4
+
5
+ Lexers for Zig.
6
+
7
+ :copyright: Copyright 2006-present by the Pygments team, see AUTHORS.
8
+ :license: BSD, see LICENSE for details.
9
+ """
10
+
11
+ from pygments.lexer import RegexLexer, words
12
+ from pygments.token import Comment, Operator, Keyword, Name, String, \
13
+ Number, Punctuation, Whitespace
14
+
15
+ __all__ = ['ZigLexer']
16
+
17
+
18
+ class ZigLexer(RegexLexer):
19
+ """
20
+ Lexer for the Zig language.
21
+
22
+ grammar: https://ziglang.org/documentation/master/#Grammar
23
+ """
24
+ name = 'Zig'
25
+ url = 'http://ziglang.org'
26
+ aliases = ['zig']
27
+ filenames = ['*.zig']
28
+ mimetypes = ['text/zig']
29
+ version_added = ''
30
+
31
+ type_keywords = (
32
+ words(('bool', 'f16', 'f32', 'f64', 'f128', 'void', 'noreturn', 'type',
33
+ 'anyerror', 'promise', 'i0', 'u0', 'isize', 'usize', 'comptime_int',
34
+ 'comptime_float', 'c_short', 'c_ushort', 'c_int', 'c_uint', 'c_long',
35
+ 'c_ulong', 'c_longlong', 'c_ulonglong', 'c_longdouble', 'c_void'
36
+ 'i8', 'u8', 'i16', 'u16', 'i32', 'u32', 'i64', 'u64', 'i128',
37
+ 'u128'), suffix=r'\b'),
38
+ Keyword.Type)
39
+
40
+ storage_keywords = (
41
+ words(('const', 'var', 'extern', 'packed', 'export', 'pub', 'noalias',
42
+ 'inline', 'comptime', 'nakedcc', 'stdcallcc', 'volatile', 'allowzero',
43
+ 'align', 'linksection', 'threadlocal'), suffix=r'\b'),
44
+ Keyword.Reserved)
45
+
46
+ structure_keywords = (
47
+ words(('struct', 'enum', 'union', 'error'), suffix=r'\b'),
48
+ Keyword)
49
+
50
+ statement_keywords = (
51
+ words(('break', 'return', 'continue', 'asm', 'defer', 'errdefer',
52
+ 'unreachable', 'try', 'catch', 'async', 'await', 'suspend',
53
+ 'resume', 'cancel'), suffix=r'\b'),
54
+ Keyword)
55
+
56
+ conditional_keywords = (
57
+ words(('if', 'else', 'switch', 'and', 'or', 'orelse'), suffix=r'\b'),
58
+ Keyword)
59
+
60
+ repeat_keywords = (
61
+ words(('while', 'for'), suffix=r'\b'),
62
+ Keyword)
63
+
64
+ other_keywords = (
65
+ words(('fn', 'usingnamespace', 'test'), suffix=r'\b'),
66
+ Keyword)
67
+
68
+ constant_keywords = (
69
+ words(('true', 'false', 'null', 'undefined'), suffix=r'\b'),
70
+ Keyword.Constant)
71
+
72
+ tokens = {
73
+ 'root': [
74
+ (r'\n', Whitespace),
75
+ (r'\s+', Whitespace),
76
+ (r'//.*?\n', Comment.Single),
77
+
78
+ # Keywords
79
+ statement_keywords,
80
+ storage_keywords,
81
+ structure_keywords,
82
+ repeat_keywords,
83
+ type_keywords,
84
+ constant_keywords,
85
+ conditional_keywords,
86
+ other_keywords,
87
+
88
+ # Floats
89
+ (r'0x[0-9a-fA-F]+\.[0-9a-fA-F]+([pP][\-+]?[0-9a-fA-F]+)?', Number.Float),
90
+ (r'0x[0-9a-fA-F]+\.?[pP][\-+]?[0-9a-fA-F]+', Number.Float),
91
+ (r'[0-9]+\.[0-9]+([eE][-+]?[0-9]+)?', Number.Float),
92
+ (r'[0-9]+\.?[eE][-+]?[0-9]+', Number.Float),
93
+
94
+ # Integers
95
+ (r'0b[01]+', Number.Bin),
96
+ (r'0o[0-7]+', Number.Oct),
97
+ (r'0x[0-9a-fA-F]+', Number.Hex),
98
+ (r'[0-9]+', Number.Integer),
99
+
100
+ # Identifier
101
+ (r'@[a-zA-Z_]\w*', Name.Builtin),
102
+ (r'[a-zA-Z_]\w*', Name),
103
+
104
+ # Characters
105
+ (r'\'\\\'\'', String.Escape),
106
+ (r'\'\\(x[a-fA-F0-9]{2}|u[a-fA-F0-9]{4}|U[a-fA-F0-9]{6}|[nr\\t\'"])\'',
107
+ String.Escape),
108
+ (r'\'[^\\\']\'', String),
109
+
110
+ # Strings
111
+ (r'\\\\[^\n]*', String.Heredoc),
112
+ (r'c\\\\[^\n]*', String.Heredoc),
113
+ (r'c?"', String, 'string'),
114
+
115
+ # Operators, Punctuation
116
+ (r'[+%=><|^!?/\-*&~:]', Operator),
117
+ (r'[{}()\[\],.;]', Punctuation)
118
+ ],
119
+ 'string': [
120
+ (r'\\(x[a-fA-F0-9]{2}|u[a-fA-F0-9]{4}|U[a-fA-F0-9]{6}|[nr\\t\'"])',
121
+ String.Escape),
122
+ (r'[^\\"\n]+', String),
123
+ (r'"', String, '#pop')
124
+ ]
125
+ }
.cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments/modeline.py ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ pygments.modeline
3
+ ~~~~~~~~~~~~~~~~~
4
+
5
+ A simple modeline parser (based on pymodeline).
6
+
7
+ :copyright: Copyright 2006-present by the Pygments team, see AUTHORS.
8
+ :license: BSD, see LICENSE for details.
9
+ """
10
+
11
+ import re
12
+
13
+ __all__ = ['get_filetype_from_buffer']
14
+
15
+
16
+ modeline_re = re.compile(r'''
17
+ (?: vi | vim | ex ) (?: [<=>]? \d* )? :
18
+ .* (?: ft | filetype | syn | syntax ) = ( [^:\s]+ )
19
+ ''', re.VERBOSE)
20
+
21
+
22
+ def get_filetype_from_line(l): # noqa: E741
23
+ m = modeline_re.search(l)
24
+ if m:
25
+ return m.group(1)
26
+
27
+
28
+ def get_filetype_from_buffer(buf, max_lines=5):
29
+ """
30
+ Scan the buffer for modelines and return filetype if one is found.
31
+ """
32
+ lines = buf.splitlines()
33
+ for line in lines[-1:-max_lines-1:-1]:
34
+ ret = get_filetype_from_line(line)
35
+ if ret:
36
+ return ret
37
+ for i in range(max_lines, -1, -1):
38
+ if i < len(lines):
39
+ ret = get_filetype_from_line(lines[i])
40
+ if ret:
41
+ return ret
42
+
43
+ return None
.cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments/plugin.py ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ pygments.plugin
3
+ ~~~~~~~~~~~~~~~
4
+
5
+ Pygments plugin interface.
6
+
7
+ lexer plugins::
8
+
9
+ [pygments.lexers]
10
+ yourlexer = yourmodule:YourLexer
11
+
12
+ formatter plugins::
13
+
14
+ [pygments.formatters]
15
+ yourformatter = yourformatter:YourFormatter
16
+ /.ext = yourformatter:YourFormatter
17
+
18
+ As you can see, you can define extensions for the formatter
19
+ with a leading slash.
20
+
21
+ syntax plugins::
22
+
23
+ [pygments.styles]
24
+ yourstyle = yourstyle:YourStyle
25
+
26
+ filter plugin::
27
+
28
+ [pygments.filter]
29
+ yourfilter = yourfilter:YourFilter
30
+
31
+
32
+ :copyright: Copyright 2006-present by the Pygments team, see AUTHORS.
33
+ :license: BSD, see LICENSE for details.
34
+ """
35
+ import functools
36
+ from importlib.metadata import entry_points
37
+
38
+ LEXER_ENTRY_POINT = 'pygments.lexers'
39
+ FORMATTER_ENTRY_POINT = 'pygments.formatters'
40
+ STYLE_ENTRY_POINT = 'pygments.styles'
41
+ FILTER_ENTRY_POINT = 'pygments.filters'
42
+
43
+
44
+ @functools.cache
45
+ def iter_entry_points(group_name):
46
+ groups = entry_points()
47
+ if hasattr(groups, 'select'):
48
+ # New interface in Python 3.10 and newer versions of the
49
+ # importlib_metadata backport.
50
+ return groups.select(group=group_name)
51
+ else:
52
+ # Older interface, deprecated in Python 3.10 and recent
53
+ # importlib_metadata, but we need it in Python 3.8 and 3.9.
54
+ return groups.get(group_name, [])
55
+
56
+
57
+ def find_plugin_lexers():
58
+ for entrypoint in iter_entry_points(LEXER_ENTRY_POINT):
59
+ yield entrypoint.load()
60
+
61
+
62
+ def find_plugin_formatters():
63
+ for entrypoint in iter_entry_points(FORMATTER_ENTRY_POINT):
64
+ yield entrypoint.name, entrypoint.load()
65
+
66
+
67
+ def find_plugin_styles():
68
+ for entrypoint in iter_entry_points(STYLE_ENTRY_POINT):
69
+ yield entrypoint.name, entrypoint.load()
70
+
71
+
72
+ def find_plugin_filters():
73
+ for entrypoint in iter_entry_points(FILTER_ENTRY_POINT):
74
+ yield entrypoint.name, entrypoint.load()
.cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments/regexopt.py ADDED
@@ -0,0 +1,102 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ pygments.regexopt
3
+ ~~~~~~~~~~~~~~~~~
4
+
5
+ An algorithm that generates optimized regexes for matching long lists of
6
+ literal strings.
7
+
8
+ :copyright: Copyright 2006-present by the Pygments team, see AUTHORS.
9
+ :license: BSD, see LICENSE for details.
10
+ """
11
+
12
+ import re
13
+ from re import escape
14
+ from itertools import groupby
15
+ from operator import itemgetter
16
+
17
+ CS_ESCAPE = re.compile(r'[\[\^\\\-\]]')
18
+ FIRST_ELEMENT = itemgetter(0)
19
+
20
+
21
+ def commonprefix(m):
22
+ """Given an iterable of strings, returns the longest common leading substring"""
23
+ if not m:
24
+ return ""
25
+ s1 = min(m)
26
+ s2 = max(m)
27
+ for i, c in enumerate(s1):
28
+ if c != s2[i]:
29
+ return s1[:i]
30
+ return s1
31
+
32
+
33
+ def make_charset(letters):
34
+ return '[' + CS_ESCAPE.sub(lambda m: '\\' + m.group(), ''.join(letters)) + ']'
35
+
36
+
37
+ def regex_opt_inner(strings, open_paren):
38
+ """Return a regex that matches any string in the sorted list of strings."""
39
+ close_paren = open_paren and ')' or ''
40
+ # print strings, repr(open_paren)
41
+ if not strings:
42
+ # print '-> nothing left'
43
+ return ''
44
+ first = strings[0]
45
+ if len(strings) == 1:
46
+ # print '-> only 1 string'
47
+ return open_paren + escape(first) + close_paren
48
+ if not first:
49
+ # print '-> first string empty'
50
+ return open_paren + regex_opt_inner(strings[1:], '(?:') \
51
+ + '?' + close_paren
52
+ if len(first) == 1:
53
+ # multiple one-char strings? make a charset
54
+ oneletter = []
55
+ rest = []
56
+ for s in strings:
57
+ if len(s) == 1:
58
+ oneletter.append(s)
59
+ else:
60
+ rest.append(s)
61
+ if len(oneletter) > 1: # do we have more than one oneletter string?
62
+ if rest:
63
+ # print '-> 1-character + rest'
64
+ return open_paren + regex_opt_inner(rest, '') + '|' \
65
+ + make_charset(oneletter) + close_paren
66
+ # print '-> only 1-character'
67
+ return open_paren + make_charset(oneletter) + close_paren
68
+ prefix = commonprefix(strings)
69
+ if prefix:
70
+ plen = len(prefix)
71
+ # we have a prefix for all strings
72
+ # print '-> prefix:', prefix
73
+ return open_paren + escape(prefix) \
74
+ + regex_opt_inner([s[plen:] for s in strings], '(?:') \
75
+ + close_paren
76
+ # is there a suffix?
77
+ strings_rev = [s[::-1] for s in strings]
78
+ suffix = commonprefix(strings_rev)
79
+ if suffix:
80
+ slen = len(suffix)
81
+ # print '-> suffix:', suffix[::-1]
82
+ return open_paren \
83
+ + regex_opt_inner(sorted(s[:-slen] for s in strings), '(?:') \
84
+ + escape(suffix[::-1]) + close_paren
85
+ # recurse on common 1-string prefixes
86
+ # print '-> last resort'
87
+ return open_paren + \
88
+ '|'.join(regex_opt_inner(list(group[1]), '')
89
+ for group in groupby(strings, lambda s: s[0] == first[0])) \
90
+ + close_paren
91
+
92
+
93
+ def regex_opt(strings, prefix='', suffix=''):
94
+ """Return a compiled regex that matches any string in the given list.
95
+
96
+ The strings to match must be literal strings, not regexes. They will be
97
+ regex-escaped.
98
+
99
+ *prefix* and *suffix* are pre- and appended to the final regex.
100
+ """
101
+ strings = sorted(strings)
102
+ return prefix + regex_opt_inner(strings, '(') + suffix
.cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments/scanner.py ADDED
@@ -0,0 +1,104 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ pygments.scanner
3
+ ~~~~~~~~~~~~~~~~
4
+
5
+ This library implements a regex based scanner. Some languages
6
+ like Pascal are easy to parse but have some keywords that
7
+ depend on the context. Because of this it's impossible to lex
8
+ that just by using a regular expression lexer like the
9
+ `RegexLexer`.
10
+
11
+ Have a look at the `DelphiLexer` to get an idea of how to use
12
+ this scanner.
13
+
14
+ :copyright: Copyright 2006-present by the Pygments team, see AUTHORS.
15
+ :license: BSD, see LICENSE for details.
16
+ """
17
+ import re
18
+
19
+
20
+ class EndOfText(RuntimeError):
21
+ """
22
+ Raise if end of text is reached and the user
23
+ tried to call a match function.
24
+ """
25
+
26
+
27
+ class Scanner:
28
+ """
29
+ Simple scanner
30
+
31
+ All method patterns are regular expression strings (not
32
+ compiled expressions!)
33
+ """
34
+
35
+ def __init__(self, text, flags=0):
36
+ """
37
+ :param text: The text which should be scanned
38
+ :param flags: default regular expression flags
39
+ """
40
+ self.data = text
41
+ self.data_length = len(text)
42
+ self.start_pos = 0
43
+ self.pos = 0
44
+ self.flags = flags
45
+ self.last = None
46
+ self.match = None
47
+ self._re_cache = {}
48
+
49
+ def eos(self):
50
+ """`True` if the scanner reached the end of text."""
51
+ return self.pos >= self.data_length
52
+ eos = property(eos, eos.__doc__)
53
+
54
+ def check(self, pattern):
55
+ """
56
+ Apply `pattern` on the current position and return
57
+ the match object. (Doesn't touch pos). Use this for
58
+ lookahead.
59
+ """
60
+ if self.eos:
61
+ raise EndOfText()
62
+ if pattern not in self._re_cache:
63
+ self._re_cache[pattern] = re.compile(pattern, self.flags)
64
+ return self._re_cache[pattern].match(self.data, self.pos)
65
+
66
+ def test(self, pattern):
67
+ """Apply a pattern on the current position and check
68
+ if it patches. Doesn't touch pos.
69
+ """
70
+ return self.check(pattern) is not None
71
+
72
+ def scan(self, pattern):
73
+ """
74
+ Scan the text for the given pattern and update pos/match
75
+ and related fields. The return value is a boolean that
76
+ indicates if the pattern matched. The matched value is
77
+ stored on the instance as ``match``, the last value is
78
+ stored as ``last``. ``start_pos`` is the position of the
79
+ pointer before the pattern was matched, ``pos`` is the
80
+ end position.
81
+ """
82
+ if self.eos:
83
+ raise EndOfText()
84
+ if pattern not in self._re_cache:
85
+ self._re_cache[pattern] = re.compile(pattern, self.flags)
86
+ self.last = self.match
87
+ m = self._re_cache[pattern].match(self.data, self.pos)
88
+ if m is None:
89
+ return False
90
+ self.start_pos = m.start()
91
+ self.pos = m.end()
92
+ self.match = m.group()
93
+ return True
94
+
95
+ def get_char(self):
96
+ """Scan exactly one char."""
97
+ self.scan('.')
98
+
99
+ def __repr__(self):
100
+ return '<%s %d/%d>' % (
101
+ self.__class__.__name__,
102
+ self.pos,
103
+ self.data_length
104
+ )
.cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments/sphinxext.py ADDED
@@ -0,0 +1,247 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ pygments.sphinxext
3
+ ~~~~~~~~~~~~~~~~~~
4
+
5
+ Sphinx extension to generate automatic documentation of lexers,
6
+ formatters and filters.
7
+
8
+ :copyright: Copyright 2006-present by the Pygments team, see AUTHORS.
9
+ :license: BSD, see LICENSE for details.
10
+ """
11
+
12
+ import sys
13
+
14
+ from docutils import nodes
15
+ from docutils.statemachine import ViewList
16
+ from docutils.parsers.rst import Directive
17
+ from sphinx.util.nodes import nested_parse_with_titles
18
+
19
+
20
+ MODULEDOC = '''
21
+ .. module:: %s
22
+
23
+ %s
24
+ %s
25
+ '''
26
+
27
+ LEXERDOC = '''
28
+ .. class:: %s
29
+
30
+ :Short names: %s
31
+ :Filenames: %s
32
+ :MIME types: %s
33
+
34
+ %s
35
+
36
+ %s
37
+
38
+ '''
39
+
40
+ FMTERDOC = '''
41
+ .. class:: %s
42
+
43
+ :Short names: %s
44
+ :Filenames: %s
45
+
46
+ %s
47
+
48
+ '''
49
+
50
+ FILTERDOC = '''
51
+ .. class:: %s
52
+
53
+ :Name: %s
54
+
55
+ %s
56
+
57
+ '''
58
+
59
+
60
+ class PygmentsDoc(Directive):
61
+ """
62
+ A directive to collect all lexers/formatters/filters and generate
63
+ autoclass directives for them.
64
+ """
65
+ has_content = False
66
+ required_arguments = 1
67
+ optional_arguments = 0
68
+ final_argument_whitespace = False
69
+ option_spec = {}
70
+
71
+ def run(self):
72
+ self.filenames = set()
73
+ if self.arguments[0] == 'lexers':
74
+ out = self.document_lexers()
75
+ elif self.arguments[0] == 'formatters':
76
+ out = self.document_formatters()
77
+ elif self.arguments[0] == 'filters':
78
+ out = self.document_filters()
79
+ elif self.arguments[0] == 'lexers_overview':
80
+ out = self.document_lexers_overview()
81
+ else:
82
+ raise Exception('invalid argument for "pygmentsdoc" directive')
83
+ node = nodes.compound()
84
+ vl = ViewList(out.split('\n'), source='')
85
+ nested_parse_with_titles(self.state, vl, node)
86
+ for fn in self.filenames:
87
+ self.state.document.settings.record_dependencies.add(fn)
88
+ return node.children
89
+
90
+ def document_lexers_overview(self):
91
+ """Generate a tabular overview of all lexers.
92
+
93
+ The columns are the lexer name, the extensions handled by this lexer
94
+ (or "None"), the aliases and a link to the lexer class."""
95
+ from pygments.lexers._mapping import LEXERS
96
+ import pygments.lexers
97
+ out = []
98
+
99
+ table = []
100
+
101
+ def format_link(name, url):
102
+ if url:
103
+ return f'`{name} <{url}>`_'
104
+ return name
105
+
106
+ for classname, data in sorted(LEXERS.items(), key=lambda x: x[1][1].lower()):
107
+ lexer_cls = pygments.lexers.find_lexer_class(data[1])
108
+ extensions = lexer_cls.filenames + lexer_cls.alias_filenames
109
+
110
+ table.append({
111
+ 'name': format_link(data[1], lexer_cls.url),
112
+ 'extensions': ', '.join(extensions).replace('*', '\\*').replace('_', '\\') or 'None',
113
+ 'aliases': ', '.join(data[2]),
114
+ 'class': f'{data[0]}.{classname}'
115
+ })
116
+
117
+ column_names = ['name', 'extensions', 'aliases', 'class']
118
+ column_lengths = [max([len(row[column]) for row in table if row[column]])
119
+ for column in column_names]
120
+
121
+ def write_row(*columns):
122
+ """Format a table row"""
123
+ out = []
124
+ for length, col in zip(column_lengths, columns):
125
+ if col:
126
+ out.append(col.ljust(length))
127
+ else:
128
+ out.append(' '*length)
129
+
130
+ return ' '.join(out)
131
+
132
+ def write_seperator():
133
+ """Write a table separator row"""
134
+ sep = ['='*c for c in column_lengths]
135
+ return write_row(*sep)
136
+
137
+ out.append(write_seperator())
138
+ out.append(write_row('Name', 'Extension(s)', 'Short name(s)', 'Lexer class'))
139
+ out.append(write_seperator())
140
+ for row in table:
141
+ out.append(write_row(
142
+ row['name'],
143
+ row['extensions'],
144
+ row['aliases'],
145
+ f':class:`~{row["class"]}`'))
146
+ out.append(write_seperator())
147
+
148
+ return '\n'.join(out)
149
+
150
+ def document_lexers(self):
151
+ from pygments.lexers._mapping import LEXERS
152
+ import pygments
153
+ import inspect
154
+ import pathlib
155
+
156
+ out = []
157
+ modules = {}
158
+ moduledocstrings = {}
159
+ for classname, data in sorted(LEXERS.items(), key=lambda x: x[0]):
160
+ module = data[0]
161
+ mod = __import__(module, None, None, [classname])
162
+ self.filenames.add(mod.__file__)
163
+ cls = getattr(mod, classname)
164
+ if not cls.__doc__:
165
+ print(f"Warning: {classname} does not have a docstring.")
166
+ docstring = cls.__doc__
167
+ if isinstance(docstring, bytes):
168
+ docstring = docstring.decode('utf8')
169
+
170
+ example_file = getattr(cls, '_example', None)
171
+ if example_file:
172
+ p = pathlib.Path(inspect.getabsfile(pygments)).parent.parent /\
173
+ 'tests' / 'examplefiles' / example_file
174
+ content = p.read_text(encoding='utf-8')
175
+ if not content:
176
+ raise Exception(
177
+ f"Empty example file '{example_file}' for lexer "
178
+ f"{classname}")
179
+
180
+ if data[2]:
181
+ lexer_name = data[2][0]
182
+ docstring += '\n\n .. admonition:: Example\n'
183
+ docstring += f'\n .. code-block:: {lexer_name}\n\n'
184
+ for line in content.splitlines():
185
+ docstring += f' {line}\n'
186
+
187
+ if cls.version_added:
188
+ version_line = f'.. versionadded:: {cls.version_added}'
189
+ else:
190
+ version_line = ''
191
+
192
+ modules.setdefault(module, []).append((
193
+ classname,
194
+ ', '.join(data[2]) or 'None',
195
+ ', '.join(data[3]).replace('*', '\\*').replace('_', '\\') or 'None',
196
+ ', '.join(data[4]) or 'None',
197
+ docstring,
198
+ version_line))
199
+ if module not in moduledocstrings:
200
+ moddoc = mod.__doc__
201
+ if isinstance(moddoc, bytes):
202
+ moddoc = moddoc.decode('utf8')
203
+ moduledocstrings[module] = moddoc
204
+
205
+ for module, lexers in sorted(modules.items(), key=lambda x: x[0]):
206
+ if moduledocstrings[module] is None:
207
+ raise Exception(f"Missing docstring for {module}")
208
+ heading = moduledocstrings[module].splitlines()[4].strip().rstrip('.')
209
+ out.append(MODULEDOC % (module, heading, '-'*len(heading)))
210
+ for data in lexers:
211
+ out.append(LEXERDOC % data)
212
+
213
+ return ''.join(out)
214
+
215
+ def document_formatters(self):
216
+ from pygments.formatters import FORMATTERS
217
+
218
+ out = []
219
+ for classname, data in sorted(FORMATTERS.items(), key=lambda x: x[0]):
220
+ module = data[0]
221
+ mod = __import__(module, None, None, [classname])
222
+ self.filenames.add(mod.__file__)
223
+ cls = getattr(mod, classname)
224
+ docstring = cls.__doc__
225
+ if isinstance(docstring, bytes):
226
+ docstring = docstring.decode('utf8')
227
+ heading = cls.__name__
228
+ out.append(FMTERDOC % (heading, ', '.join(data[2]) or 'None',
229
+ ', '.join(data[3]).replace('*', '\\*') or 'None',
230
+ docstring))
231
+ return ''.join(out)
232
+
233
+ def document_filters(self):
234
+ from pygments.filters import FILTERS
235
+
236
+ out = []
237
+ for name, cls in FILTERS.items():
238
+ self.filenames.add(sys.modules[cls.__module__].__file__)
239
+ docstring = cls.__doc__
240
+ if isinstance(docstring, bytes):
241
+ docstring = docstring.decode('utf8')
242
+ out.append(FILTERDOC % (cls.__name__, name, docstring))
243
+ return ''.join(out)
244
+
245
+
246
+ def setup(app):
247
+ app.add_directive('pygmentsdoc', PygmentsDoc)
.cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments/style.py ADDED
@@ -0,0 +1,203 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ pygments.style
3
+ ~~~~~~~~~~~~~~
4
+
5
+ Basic style object.
6
+
7
+ :copyright: Copyright 2006-present by the Pygments team, see AUTHORS.
8
+ :license: BSD, see LICENSE for details.
9
+ """
10
+
11
+ from pygments.token import Token, STANDARD_TYPES
12
+
13
+ # Default mapping of ansixxx to RGB colors.
14
+ _ansimap = {
15
+ # dark
16
+ 'ansiblack': '000000',
17
+ 'ansired': '7f0000',
18
+ 'ansigreen': '007f00',
19
+ 'ansiyellow': '7f7fe0',
20
+ 'ansiblue': '00007f',
21
+ 'ansimagenta': '7f007f',
22
+ 'ansicyan': '007f7f',
23
+ 'ansigray': 'e5e5e5',
24
+ # normal
25
+ 'ansibrightblack': '555555',
26
+ 'ansibrightred': 'ff0000',
27
+ 'ansibrightgreen': '00ff00',
28
+ 'ansibrightyellow': 'ffff00',
29
+ 'ansibrightblue': '0000ff',
30
+ 'ansibrightmagenta': 'ff00ff',
31
+ 'ansibrightcyan': '00ffff',
32
+ 'ansiwhite': 'ffffff',
33
+ }
34
+ # mapping of deprecated #ansixxx colors to new color names
35
+ _deprecated_ansicolors = {
36
+ # dark
37
+ '#ansiblack': 'ansiblack',
38
+ '#ansidarkred': 'ansired',
39
+ '#ansidarkgreen': 'ansigreen',
40
+ '#ansibrown': 'ansiyellow',
41
+ '#ansidarkblue': 'ansiblue',
42
+ '#ansipurple': 'ansimagenta',
43
+ '#ansiteal': 'ansicyan',
44
+ '#ansilightgray': 'ansigray',
45
+ # normal
46
+ '#ansidarkgray': 'ansibrightblack',
47
+ '#ansired': 'ansibrightred',
48
+ '#ansigreen': 'ansibrightgreen',
49
+ '#ansiyellow': 'ansibrightyellow',
50
+ '#ansiblue': 'ansibrightblue',
51
+ '#ansifuchsia': 'ansibrightmagenta',
52
+ '#ansiturquoise': 'ansibrightcyan',
53
+ '#ansiwhite': 'ansiwhite',
54
+ }
55
+ ansicolors = set(_ansimap)
56
+
57
+
58
+ class StyleMeta(type):
59
+
60
+ def __new__(mcs, name, bases, dct):
61
+ obj = type.__new__(mcs, name, bases, dct)
62
+ for token in STANDARD_TYPES:
63
+ if token not in obj.styles:
64
+ obj.styles[token] = ''
65
+
66
+ def colorformat(text):
67
+ if text in ansicolors:
68
+ return text
69
+ if text[0:1] == '#':
70
+ col = text[1:]
71
+ if len(col) == 6:
72
+ return col
73
+ elif len(col) == 3:
74
+ return col[0] * 2 + col[1] * 2 + col[2] * 2
75
+ elif text == '':
76
+ return ''
77
+ elif text.startswith('var') or text.startswith('calc'):
78
+ return text
79
+ assert False, f"wrong color format {text!r}"
80
+
81
+ _styles = obj._styles = {}
82
+
83
+ for ttype in obj.styles:
84
+ for token in ttype.split():
85
+ if token in _styles:
86
+ continue
87
+ ndef = _styles.get(token.parent, None)
88
+ styledefs = obj.styles.get(token, '').split()
89
+ if not ndef or token is None:
90
+ ndef = ['', 0, 0, 0, '', '', 0, 0, 0]
91
+ elif 'noinherit' in styledefs and token is not Token:
92
+ ndef = _styles[Token][:]
93
+ else:
94
+ ndef = ndef[:]
95
+ _styles[token] = ndef
96
+ for styledef in obj.styles.get(token, '').split():
97
+ if styledef == 'noinherit':
98
+ pass
99
+ elif styledef == 'bold':
100
+ ndef[1] = 1
101
+ elif styledef == 'nobold':
102
+ ndef[1] = 0
103
+ elif styledef == 'italic':
104
+ ndef[2] = 1
105
+ elif styledef == 'noitalic':
106
+ ndef[2] = 0
107
+ elif styledef == 'underline':
108
+ ndef[3] = 1
109
+ elif styledef == 'nounderline':
110
+ ndef[3] = 0
111
+ elif styledef[:3] == 'bg:':
112
+ ndef[4] = colorformat(styledef[3:])
113
+ elif styledef[:7] == 'border:':
114
+ ndef[5] = colorformat(styledef[7:])
115
+ elif styledef == 'roman':
116
+ ndef[6] = 1
117
+ elif styledef == 'sans':
118
+ ndef[7] = 1
119
+ elif styledef == 'mono':
120
+ ndef[8] = 1
121
+ else:
122
+ ndef[0] = colorformat(styledef)
123
+
124
+ return obj
125
+
126
+ def style_for_token(cls, token):
127
+ t = cls._styles[token]
128
+ ansicolor = bgansicolor = None
129
+ color = t[0]
130
+ if color in _deprecated_ansicolors:
131
+ color = _deprecated_ansicolors[color]
132
+ if color in ansicolors:
133
+ ansicolor = color
134
+ color = _ansimap[color]
135
+ bgcolor = t[4]
136
+ if bgcolor in _deprecated_ansicolors:
137
+ bgcolor = _deprecated_ansicolors[bgcolor]
138
+ if bgcolor in ansicolors:
139
+ bgansicolor = bgcolor
140
+ bgcolor = _ansimap[bgcolor]
141
+
142
+ return {
143
+ 'color': color or None,
144
+ 'bold': bool(t[1]),
145
+ 'italic': bool(t[2]),
146
+ 'underline': bool(t[3]),
147
+ 'bgcolor': bgcolor or None,
148
+ 'border': t[5] or None,
149
+ 'roman': bool(t[6]) or None,
150
+ 'sans': bool(t[7]) or None,
151
+ 'mono': bool(t[8]) or None,
152
+ 'ansicolor': ansicolor,
153
+ 'bgansicolor': bgansicolor,
154
+ }
155
+
156
+ def list_styles(cls):
157
+ return list(cls)
158
+
159
+ def styles_token(cls, ttype):
160
+ return ttype in cls._styles
161
+
162
+ def __iter__(cls):
163
+ for token in cls._styles:
164
+ yield token, cls.style_for_token(token)
165
+
166
+ def __len__(cls):
167
+ return len(cls._styles)
168
+
169
+
170
+ class Style(metaclass=StyleMeta):
171
+
172
+ #: overall background color (``None`` means transparent)
173
+ background_color = '#ffffff'
174
+
175
+ #: highlight background color
176
+ highlight_color = '#ffffcc'
177
+
178
+ #: line number font color
179
+ line_number_color = 'inherit'
180
+
181
+ #: line number background color
182
+ line_number_background_color = 'transparent'
183
+
184
+ #: special line number font color
185
+ line_number_special_color = '#000000'
186
+
187
+ #: special line number background color
188
+ line_number_special_background_color = '#ffffc0'
189
+
190
+ #: Style definitions for individual token types.
191
+ styles = {}
192
+
193
+ #: user-friendly style name (used when selecting the style, so this
194
+ # should be all-lowercase, no spaces, hyphens)
195
+ name = 'unnamed'
196
+
197
+ aliases = []
198
+
199
+ # Attribute for lexers defined within Pygments. If set
200
+ # to True, the style is not shown in the style gallery
201
+ # on the website. This is intended for language-specific
202
+ # styles.
203
+ web_style_gallery_exclude = False
.cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments/styles/__init__.py ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ pygments.styles
3
+ ~~~~~~~~~~~~~~~
4
+
5
+ Contains built-in styles.
6
+
7
+ :copyright: Copyright 2006-present by the Pygments team, see AUTHORS.
8
+ :license: BSD, see LICENSE for details.
9
+ """
10
+
11
+ from pygments.plugin import find_plugin_styles
12
+ from pygments.util import ClassNotFound
13
+ from pygments.styles._mapping import STYLES
14
+
15
+ #: A dictionary of built-in styles, mapping style names to
16
+ #: ``'submodule::classname'`` strings.
17
+ #: This list is deprecated. Use `pygments.styles.STYLES` instead
18
+ STYLE_MAP = {v[1]: v[0].split('.')[-1] + '::' + k for k, v in STYLES.items()}
19
+
20
+ #: Internal reverse mapping to make `get_style_by_name` more efficient
21
+ _STYLE_NAME_TO_MODULE_MAP = {v[1]: (v[0], k) for k, v in STYLES.items()}
22
+
23
+
24
+ def get_style_by_name(name):
25
+ """
26
+ Return a style class by its short name. The names of the builtin styles
27
+ are listed in :data:`pygments.styles.STYLE_MAP`.
28
+
29
+ Will raise :exc:`pygments.util.ClassNotFound` if no style of that name is
30
+ found.
31
+ """
32
+ if name in _STYLE_NAME_TO_MODULE_MAP:
33
+ mod, cls = _STYLE_NAME_TO_MODULE_MAP[name]
34
+ builtin = "yes"
35
+ else:
36
+ for found_name, style in find_plugin_styles():
37
+ if name == found_name:
38
+ return style
39
+ # perhaps it got dropped into our styles package
40
+ builtin = ""
41
+ mod = 'pygments.styles.' + name
42
+ cls = name.title() + "Style"
43
+
44
+ try:
45
+ mod = __import__(mod, None, None, [cls])
46
+ except ImportError:
47
+ raise ClassNotFound(f"Could not find style module {mod!r}" +
48
+ (builtin and ", though it should be builtin")
49
+ + ".")
50
+ try:
51
+ return getattr(mod, cls)
52
+ except AttributeError:
53
+ raise ClassNotFound(f"Could not find style class {cls!r} in style module.")
54
+
55
+
56
+ def get_all_styles():
57
+ """Return a generator for all styles by name, both builtin and plugin."""
58
+ for v in STYLES.values():
59
+ yield v[1]
60
+ for name, _ in find_plugin_styles():
61
+ yield name
.cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments/styles/_mapping.py ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Automatically generated by scripts/gen_mapfiles.py.
2
+ # DO NOT EDIT BY HAND; run `tox -e mapfiles` instead.
3
+
4
+ STYLES = {
5
+ 'AbapStyle': ('pygments.styles.abap', 'abap', ()),
6
+ 'AlgolStyle': ('pygments.styles.algol', 'algol', ()),
7
+ 'Algol_NuStyle': ('pygments.styles.algol_nu', 'algol_nu', ()),
8
+ 'ArduinoStyle': ('pygments.styles.arduino', 'arduino', ()),
9
+ 'AutumnStyle': ('pygments.styles.autumn', 'autumn', ()),
10
+ 'BlackWhiteStyle': ('pygments.styles.bw', 'bw', ()),
11
+ 'BorlandStyle': ('pygments.styles.borland', 'borland', ()),
12
+ 'CoffeeStyle': ('pygments.styles.coffee', 'coffee', ()),
13
+ 'ColorfulStyle': ('pygments.styles.colorful', 'colorful', ()),
14
+ 'DefaultStyle': ('pygments.styles.default', 'default', ()),
15
+ 'DraculaStyle': ('pygments.styles.dracula', 'dracula', ()),
16
+ 'EmacsStyle': ('pygments.styles.emacs', 'emacs', ()),
17
+ 'FriendlyGrayscaleStyle': ('pygments.styles.friendly_grayscale', 'friendly_grayscale', ()),
18
+ 'FriendlyStyle': ('pygments.styles.friendly', 'friendly', ()),
19
+ 'FruityStyle': ('pygments.styles.fruity', 'fruity', ()),
20
+ 'GhDarkStyle': ('pygments.styles.gh_dark', 'github-dark', ()),
21
+ 'GruvboxDarkStyle': ('pygments.styles.gruvbox', 'gruvbox-dark', ()),
22
+ 'GruvboxLightStyle': ('pygments.styles.gruvbox', 'gruvbox-light', ()),
23
+ 'IgorStyle': ('pygments.styles.igor', 'igor', ()),
24
+ 'InkPotStyle': ('pygments.styles.inkpot', 'inkpot', ()),
25
+ 'LightbulbStyle': ('pygments.styles.lightbulb', 'lightbulb', ()),
26
+ 'LilyPondStyle': ('pygments.styles.lilypond', 'lilypond', ()),
27
+ 'LovelaceStyle': ('pygments.styles.lovelace', 'lovelace', ()),
28
+ 'ManniStyle': ('pygments.styles.manni', 'manni', ()),
29
+ 'MaterialStyle': ('pygments.styles.material', 'material', ()),
30
+ 'MonokaiStyle': ('pygments.styles.monokai', 'monokai', ()),
31
+ 'MurphyStyle': ('pygments.styles.murphy', 'murphy', ()),
32
+ 'NativeStyle': ('pygments.styles.native', 'native', ()),
33
+ 'NordDarkerStyle': ('pygments.styles.nord', 'nord-darker', ()),
34
+ 'NordStyle': ('pygments.styles.nord', 'nord', ()),
35
+ 'OneDarkStyle': ('pygments.styles.onedark', 'one-dark', ()),
36
+ 'ParaisoDarkStyle': ('pygments.styles.paraiso_dark', 'paraiso-dark', ()),
37
+ 'ParaisoLightStyle': ('pygments.styles.paraiso_light', 'paraiso-light', ()),
38
+ 'PastieStyle': ('pygments.styles.pastie', 'pastie', ()),
39
+ 'PerldocStyle': ('pygments.styles.perldoc', 'perldoc', ()),
40
+ 'RainbowDashStyle': ('pygments.styles.rainbow_dash', 'rainbow_dash', ()),
41
+ 'RrtStyle': ('pygments.styles.rrt', 'rrt', ()),
42
+ 'SasStyle': ('pygments.styles.sas', 'sas', ()),
43
+ 'SolarizedDarkStyle': ('pygments.styles.solarized', 'solarized-dark', ()),
44
+ 'SolarizedLightStyle': ('pygments.styles.solarized', 'solarized-light', ()),
45
+ 'StarofficeStyle': ('pygments.styles.staroffice', 'staroffice', ()),
46
+ 'StataDarkStyle': ('pygments.styles.stata_dark', 'stata-dark', ()),
47
+ 'StataLightStyle': ('pygments.styles.stata_light', 'stata-light', ()),
48
+ 'TangoStyle': ('pygments.styles.tango', 'tango', ()),
49
+ 'TracStyle': ('pygments.styles.trac', 'trac', ()),
50
+ 'VimStyle': ('pygments.styles.vim', 'vim', ()),
51
+ 'VisualStudioStyle': ('pygments.styles.vs', 'vs', ()),
52
+ 'XcodeStyle': ('pygments.styles.xcode', 'xcode', ()),
53
+ 'ZenburnStyle': ('pygments.styles.zenburn', 'zenburn', ()),
54
+ }
.cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments/styles/abap.py ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ pygments.styles.abap
3
+ ~~~~~~~~~~~~~~~~~~~~
4
+
5
+ ABAP workbench like style.
6
+
7
+ :copyright: Copyright 2006-present by the Pygments team, see AUTHORS.
8
+ :license: BSD, see LICENSE for details.
9
+ """
10
+
11
+ from pygments.style import Style
12
+ from pygments.token import Keyword, Name, Comment, String, Error, \
13
+ Number, Operator
14
+
15
+
16
+ __all__ = ['AbapStyle']
17
+
18
+
19
+ class AbapStyle(Style):
20
+ name = 'abap'
21
+
22
+ styles = {
23
+ Comment: 'italic #888',
24
+ Comment.Special: '#888',
25
+ Keyword: '#00f',
26
+ Operator.Word: '#00f',
27
+ Name: '#000',
28
+ Number: '#3af',
29
+ String: '#5a2',
30
+
31
+ Error: '#F00',
32
+ }
.cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments/styles/algol.py ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ pygments.styles.algol
3
+ ~~~~~~~~~~~~~~~~~~~~~
4
+
5
+ Algol publication style.
6
+
7
+ This style renders source code for publication of algorithms in
8
+ scientific papers and academic texts, where its format is frequently used.
9
+
10
+ It is based on the style of the revised Algol-60 language report[1].
11
+
12
+ o No colours, only black, white and shades of grey are used.
13
+ o Keywords are rendered in lowercase underline boldface.
14
+ o Builtins are rendered in lowercase boldface italic.
15
+ o Docstrings and pragmas are rendered in dark grey boldface.
16
+ o Library identifiers are rendered in dark grey boldface italic.
17
+ o Comments are rendered in grey italic.
18
+
19
+ To render keywords without underlining, refer to the `Algol_Nu` style.
20
+
21
+ For lowercase conversion of keywords and builtins in languages where
22
+ these are not or might not be lowercase, a supporting lexer is required.
23
+ The Algol and Modula-2 lexers automatically convert to lowercase whenever
24
+ this style is selected.
25
+
26
+ [1] `Revised Report on the Algorithmic Language Algol-60 <http://www.masswerk.at/algol60/report.htm>`
27
+
28
+ :copyright: Copyright 2006-present by the Pygments team, see AUTHORS.
29
+ :license: BSD, see LICENSE for details.
30
+ """
31
+
32
+ from pygments.style import Style
33
+ from pygments.token import Keyword, Name, Comment, String, Error, Operator
34
+
35
+
36
+ __all__ = ['AlgolStyle']
37
+
38
+
39
+ class AlgolStyle(Style):
40
+ name = 'algol'
41
+
42
+ background_color = "#ffffff"
43
+
44
+ styles = {
45
+ Comment: "italic #888",
46
+ Comment.Preproc: "bold noitalic #888",
47
+ Comment.Special: "bold noitalic #888",
48
+
49
+ Keyword: "underline bold",
50
+ Keyword.Declaration: "italic",
51
+
52
+ Name.Builtin: "bold italic",
53
+ Name.Builtin.Pseudo: "bold italic",
54
+ Name.Namespace: "bold italic #666",
55
+ Name.Class: "bold italic #666",
56
+ Name.Function: "bold italic #666",
57
+ Name.Variable: "bold italic #666",
58
+ Name.Constant: "bold italic #666",
59
+
60
+ Operator.Word: "bold",
61
+
62
+ String: "italic #666",
63
+
64
+ Error: "border:#FF0000"
65
+ }
.cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments/styles/algol_nu.py ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ pygments.styles.algol_nu
3
+ ~~~~~~~~~~~~~~~~~~~~~~~~
4
+
5
+ Algol publication style without underlining of keywords.
6
+
7
+ This style renders source code for publication of algorithms in
8
+ scientific papers and academic texts, where its format is frequently used.
9
+
10
+ It is based on the style of the revised Algol-60 language report[1].
11
+
12
+ o No colours, only black, white and shades of grey are used.
13
+ o Keywords are rendered in lowercase boldface.
14
+ o Builtins are rendered in lowercase boldface italic.
15
+ o Docstrings and pragmas are rendered in dark grey boldface.
16
+ o Library identifiers are rendered in dark grey boldface italic.
17
+ o Comments are rendered in grey italic.
18
+
19
+ To render keywords with underlining, refer to the `Algol` style.
20
+
21
+ For lowercase conversion of keywords and builtins in languages where
22
+ these are not or might not be lowercase, a supporting lexer is required.
23
+ The Algol and Modula-2 lexers automatically convert to lowercase whenever
24
+ this style is selected.
25
+
26
+ [1] `Revised Report on the Algorithmic Language Algol-60 <http://www.masswerk.at/algol60/report.htm>`
27
+
28
+ :copyright: Copyright 2006-present by the Pygments team, see AUTHORS.
29
+ :license: BSD, see LICENSE for details.
30
+ """
31
+
32
+ from pygments.style import Style
33
+ from pygments.token import Keyword, Name, Comment, String, Error, Operator
34
+
35
+
36
+ __all__ = ['Algol_NuStyle']
37
+
38
+
39
+ class Algol_NuStyle(Style):
40
+ name = 'algol_nu'
41
+
42
+ background_color = "#ffffff"
43
+
44
+ styles = {
45
+ Comment: "italic #888",
46
+ Comment.Preproc: "bold noitalic #888",
47
+ Comment.Special: "bold noitalic #888",
48
+
49
+ Keyword: "bold",
50
+ Keyword.Declaration: "italic",
51
+
52
+ Name.Builtin: "bold italic",
53
+ Name.Builtin.Pseudo: "bold italic",
54
+ Name.Namespace: "bold italic #666",
55
+ Name.Class: "bold italic #666",
56
+ Name.Function: "bold italic #666",
57
+ Name.Variable: "bold italic #666",
58
+ Name.Constant: "bold italic #666",
59
+
60
+ Operator.Word: "bold",
61
+
62
+ String: "italic #666",
63
+
64
+ Error: "border:#FF0000"
65
+ }
.cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments/styles/arduino.py ADDED
@@ -0,0 +1,100 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ pygments.styles.arduino
3
+ ~~~~~~~~~~~~~~~~~~~~~~~
4
+
5
+ Arduino® Syntax highlighting style.
6
+
7
+ :copyright: Copyright 2006-present by the Pygments team, see AUTHORS.
8
+ :license: BSD, see LICENSE for details.
9
+ """
10
+
11
+ from pygments.style import Style
12
+ from pygments.token import Keyword, Name, Comment, String, Error, \
13
+ Number, Operator, Generic, Whitespace
14
+
15
+
16
+ __all__ = ['ArduinoStyle']
17
+
18
+
19
+ class ArduinoStyle(Style):
20
+ """
21
+ The Arduino® language style. This style is designed to highlight the
22
+ Arduino source code, so expect the best results with it.
23
+ """
24
+ name = 'arduino'
25
+
26
+ background_color = "#ffffff"
27
+
28
+ styles = {
29
+ Whitespace: "", # class: 'w'
30
+ Error: "#a61717", # class: 'err'
31
+
32
+ Comment: "#95a5a6", # class: 'c'
33
+ Comment.Multiline: "", # class: 'cm'
34
+ Comment.Preproc: "#728E00", # class: 'cp'
35
+ Comment.Single: "", # class: 'c1'
36
+ Comment.Special: "", # class: 'cs'
37
+
38
+ Keyword: "#728E00", # class: 'k'
39
+ Keyword.Constant: "#00979D", # class: 'kc'
40
+ Keyword.Declaration: "", # class: 'kd'
41
+ Keyword.Namespace: "", # class: 'kn'
42
+ Keyword.Pseudo: "#00979D", # class: 'kp'
43
+ Keyword.Reserved: "#00979D", # class: 'kr'
44
+ Keyword.Type: "#00979D", # class: 'kt'
45
+
46
+ Operator: "#728E00", # class: 'o'
47
+ Operator.Word: "", # class: 'ow'
48
+
49
+ Name: "#434f54", # class: 'n'
50
+ Name.Attribute: "", # class: 'na'
51
+ Name.Builtin: "#728E00", # class: 'nb'
52
+ Name.Builtin.Pseudo: "", # class: 'bp'
53
+ Name.Class: "", # class: 'nc'
54
+ Name.Constant: "", # class: 'no'
55
+ Name.Decorator: "", # class: 'nd'
56
+ Name.Entity: "", # class: 'ni'
57
+ Name.Exception: "", # class: 'ne'
58
+ Name.Function: "#D35400", # class: 'nf'
59
+ Name.Property: "", # class: 'py'
60
+ Name.Label: "", # class: 'nl'
61
+ Name.Namespace: "", # class: 'nn'
62
+ Name.Other: "#728E00", # class: 'nx'
63
+ Name.Tag: "", # class: 'nt'
64
+ Name.Variable: "", # class: 'nv'
65
+ Name.Variable.Class: "", # class: 'vc'
66
+ Name.Variable.Global: "", # class: 'vg'
67
+ Name.Variable.Instance: "", # class: 'vi'
68
+
69
+ Number: "#8A7B52", # class: 'm'
70
+ Number.Float: "", # class: 'mf'
71
+ Number.Hex: "", # class: 'mh'
72
+ Number.Integer: "", # class: 'mi'
73
+ Number.Integer.Long: "", # class: 'il'
74
+ Number.Oct: "", # class: 'mo'
75
+
76
+ String: "#7F8C8D", # class: 's'
77
+ String.Backtick: "", # class: 'sb'
78
+ String.Char: "", # class: 'sc'
79
+ String.Doc: "", # class: 'sd'
80
+ String.Double: "", # class: 's2'
81
+ String.Escape: "", # class: 'se'
82
+ String.Heredoc: "", # class: 'sh'
83
+ String.Interpol: "", # class: 'si'
84
+ String.Other: "", # class: 'sx'
85
+ String.Regex: "", # class: 'sr'
86
+ String.Single: "", # class: 's1'
87
+ String.Symbol: "", # class: 'ss'
88
+
89
+ Generic: "", # class: 'g'
90
+ Generic.Deleted: "", # class: 'gd',
91
+ Generic.Emph: "", # class: 'ge'
92
+ Generic.Error: "", # class: 'gr'
93
+ Generic.Heading: "", # class: 'gh'
94
+ Generic.Inserted: "", # class: 'gi'
95
+ Generic.Output: "", # class: 'go'
96
+ Generic.Prompt: "", # class: 'gp'
97
+ Generic.Strong: "", # class: 'gs'
98
+ Generic.Subheading: "", # class: 'gu'
99
+ Generic.Traceback: "", # class: 'gt'
100
+ }
.cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments/styles/autumn.py ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ pygments.styles.autumn
3
+ ~~~~~~~~~~~~~~~~~~~~~~
4
+
5
+ A colorful style, inspired by the terminal highlighting style.
6
+
7
+ :copyright: Copyright 2006-present by the Pygments team, see AUTHORS.
8
+ :license: BSD, see LICENSE for details.
9
+ """
10
+
11
+ from pygments.style import Style
12
+ from pygments.token import Keyword, Name, Comment, String, Error, \
13
+ Number, Operator, Generic, Whitespace
14
+
15
+
16
+ __all__ = ['AutumnStyle']
17
+
18
+
19
+ class AutumnStyle(Style):
20
+ """
21
+ A colorful style, inspired by the terminal highlighting style.
22
+ """
23
+ name = 'autumn'
24
+
25
+ styles = {
26
+ Whitespace: '#bbbbbb',
27
+
28
+ Comment: 'italic #aaaaaa',
29
+ Comment.Preproc: 'noitalic #4c8317',
30
+ Comment.Special: 'italic #0000aa',
31
+
32
+ Keyword: '#0000aa',
33
+ Keyword.Type: '#00aaaa',
34
+
35
+ Operator.Word: '#0000aa',
36
+
37
+ Name.Builtin: '#00aaaa',
38
+ Name.Function: '#00aa00',
39
+ Name.Class: 'underline #00aa00',
40
+ Name.Namespace: 'underline #00aaaa',
41
+ Name.Variable: '#aa0000',
42
+ Name.Constant: '#aa0000',
43
+ Name.Entity: 'bold #800',
44
+ Name.Attribute: '#1e90ff',
45
+ Name.Tag: 'bold #1e90ff',
46
+ Name.Decorator: '#888888',
47
+
48
+ String: '#aa5500',
49
+ String.Symbol: '#0000aa',
50
+ String.Regex: '#009999',
51
+
52
+ Number: '#009999',
53
+
54
+ Generic.Heading: 'bold #000080',
55
+ Generic.Subheading: 'bold #800080',
56
+ Generic.Deleted: '#aa0000',
57
+ Generic.Inserted: '#00aa00',
58
+ Generic.Error: '#aa0000',
59
+ Generic.Emph: 'italic',
60
+ Generic.Strong: 'bold',
61
+ Generic.EmphStrong: 'bold italic',
62
+ Generic.Prompt: '#555555',
63
+ Generic.Output: '#888888',
64
+ Generic.Traceback: '#aa0000',
65
+
66
+ Error: '#F00 bg:#FAA'
67
+ }
.cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments/styles/borland.py ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ pygments.styles.borland
3
+ ~~~~~~~~~~~~~~~~~~~~~~~
4
+
5
+ Style similar to the style used in the Borland IDEs.
6
+
7
+ :copyright: Copyright 2006-present by the Pygments team, see AUTHORS.
8
+ :license: BSD, see LICENSE for details.
9
+ """
10
+
11
+ from pygments.style import Style
12
+ from pygments.token import Keyword, Name, Comment, String, Error, \
13
+ Number, Operator, Generic, Whitespace
14
+
15
+
16
+ __all__ = ['BorlandStyle']
17
+
18
+
19
+ class BorlandStyle(Style):
20
+ """
21
+ Style similar to the style used in the borland IDEs.
22
+ """
23
+ name = 'borland'
24
+
25
+ styles = {
26
+ Whitespace: '#bbbbbb',
27
+
28
+ Comment: 'italic #008800',
29
+ Comment.Preproc: 'noitalic #008080',
30
+ Comment.Special: 'noitalic bold',
31
+
32
+ String: '#0000FF',
33
+ String.Char: '#800080',
34
+ Number: '#0000FF',
35
+ Keyword: 'bold #000080',
36
+ Operator.Word: 'bold',
37
+ Name.Tag: 'bold #000080',
38
+ Name.Attribute: '#FF0000',
39
+
40
+ Generic.Heading: '#999999',
41
+ Generic.Subheading: '#aaaaaa',
42
+ Generic.Deleted: 'bg:#ffdddd #000000',
43
+ Generic.Inserted: 'bg:#ddffdd #000000',
44
+ Generic.Error: '#aa0000',
45
+ Generic.Emph: 'italic',
46
+ Generic.Strong: 'bold',
47
+ Generic.EmphStrong: 'bold italic',
48
+ Generic.Prompt: '#555555',
49
+ Generic.Output: '#888888',
50
+ Generic.Traceback: '#aa0000',
51
+
52
+ Error: 'bg:#e3d2d2 #a61717'
53
+ }
.cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments/styles/bw.py ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ pygments.styles.bw
3
+ ~~~~~~~~~~~~~~~~~~
4
+
5
+ Simple black/white only style.
6
+
7
+ :copyright: Copyright 2006-present by the Pygments team, see AUTHORS.
8
+ :license: BSD, see LICENSE for details.
9
+ """
10
+
11
+ from pygments.style import Style
12
+ from pygments.token import Keyword, Name, Comment, String, Error, \
13
+ Operator, Generic
14
+
15
+
16
+ __all__ = ['BlackWhiteStyle']
17
+
18
+
19
+ class BlackWhiteStyle(Style):
20
+ name = 'bw'
21
+
22
+ background_color = "#ffffff"
23
+
24
+ styles = {
25
+ Comment: "italic",
26
+ Comment.Preproc: "noitalic",
27
+
28
+ Keyword: "bold",
29
+ Keyword.Pseudo: "nobold",
30
+ Keyword.Type: "nobold",
31
+
32
+ Operator.Word: "bold",
33
+
34
+ Name.Class: "bold",
35
+ Name.Namespace: "bold",
36
+ Name.Exception: "bold",
37
+ Name.Entity: "bold",
38
+ Name.Tag: "bold",
39
+
40
+ String: "italic",
41
+ String.Interpol: "bold",
42
+ String.Escape: "bold",
43
+
44
+ Generic.Heading: "bold",
45
+ Generic.Subheading: "bold",
46
+ Generic.Emph: "italic",
47
+ Generic.Strong: "bold",
48
+ Generic.EmphStrong: "bold italic",
49
+ Generic.Prompt: "bold",
50
+
51
+ Error: "border:#FF0000"
52
+ }
.cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments/styles/coffee.py ADDED
@@ -0,0 +1,80 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ pygments.styles.coffee
3
+ ~~~~~~~~~~~~~~~~~~~~~~
4
+
5
+ A warm and cozy theme based off gruvbox
6
+
7
+ :copyright: Copyright 2006-present by the Pygments team, see AUTHORS.
8
+ :license: BSD, see LICENSE for details.
9
+ """
10
+
11
+ from pygments.style import Style
12
+ from pygments.token import (Comment, Error, Generic, Keyword, Literal, Name,
13
+ Number, Operator, Punctuation, String, Token)
14
+
15
+ __all__ = ["CoffeeStyle"]
16
+
17
+
18
+ class CoffeeStyle(Style):
19
+ """
20
+ A warm and cozy theme based off gruvbox
21
+ """
22
+
23
+ name = "coffee"
24
+
25
+ background_color = "#262220"
26
+ highlight_color = "#ddd0c0"
27
+
28
+ line_number_color = "#4e4e4e"
29
+ line_number_special_color = "#8f9494"
30
+
31
+ styles = {
32
+ Comment: "#70757A",
33
+ Comment.Hashbang: "#8f9f9f",
34
+ Comment.Preproc: "#fdd0c0",
35
+ Comment.PreprocFile: "#c9b98f",
36
+ Comment.Special: "#af5f5f",
37
+ Error: "#af5f5f",
38
+ Generic.Deleted: "#bb6868",
39
+ Generic.Emph: "italic",
40
+ Generic.Error: "#af5f5f",
41
+ Generic.Inserted: "#849155",
42
+ Generic.Output: "#ddd0c0",
43
+ Generic.Strong: "bold",
44
+ Generic.Traceback: "#af5f5f",
45
+ Keyword: "#919191",
46
+ Keyword.Constant: "#875f5f",
47
+ Keyword.Declaration: "#875f5f",
48
+ Keyword.Namespace: "#875f5f",
49
+ Keyword.Reserved: "#b46276",
50
+ Keyword.Type: "#af875f",
51
+ Literal: "#af875f",
52
+ Name: "#ddd0c0",
53
+ Name.Attribute: "#ddd0c0",
54
+ Name.Builtin: "#ddd0c0",
55
+ Name.Builtin.Pseudo: "#87afaf",
56
+ Name.Class: "#875f5f",
57
+ Name.Constant: "#af8787",
58
+ Name.Decorator: "#fdd0c0",
59
+ Name.Entity: "#ddd0c0",
60
+ Name.Exception: "#877575",
61
+ Name.Function: "#fdd0c0",
62
+ Name.Function.Magic: "#fdd0c0",
63
+ Name.Other: "#ddd0c0",
64
+ Name.Property: "#dfaf87",
65
+ Name.Tag: "#87afaf",
66
+ Name.Variable: "#ddd0c0",
67
+ Number: "#87afaf",
68
+ Operator: "#878787",
69
+ Operator.Word: "#878787",
70
+ Punctuation: "#ddd0c0",
71
+ String: "#c9b98f",
72
+ String.Affix: "#dfaf87",
73
+ String.Doc: "#878787",
74
+ String.Escape: "#af5f5f",
75
+ String.Interpol: "#af5f5f",
76
+ String.Other: "#fdd0c0",
77
+ String.Regex: "#af5f5f",
78
+ String.Symbol: "#af5f5f",
79
+ Token: "#ddd0c0",
80
+ }
.cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments/styles/colorful.py ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ pygments.styles.colorful
3
+ ~~~~~~~~~~~~~~~~~~~~~~~~
4
+
5
+ A colorful style, inspired by CodeRay.
6
+
7
+ :copyright: Copyright 2006-present by the Pygments team, see AUTHORS.
8
+ :license: BSD, see LICENSE for details.
9
+ """
10
+
11
+ from pygments.style import Style
12
+ from pygments.token import Keyword, Name, Comment, String, Error, \
13
+ Number, Operator, Generic, Whitespace
14
+
15
+
16
+ __all__ = ['ColorfulStyle']
17
+
18
+
19
+ class ColorfulStyle(Style):
20
+ """
21
+ A colorful style, inspired by CodeRay.
22
+ """
23
+ name = 'colorful'
24
+
25
+ styles = {
26
+ Whitespace: "#bbbbbb",
27
+
28
+ Comment: "#888",
29
+ Comment.Preproc: "#579",
30
+ Comment.Special: "bold #cc0000",
31
+
32
+ Keyword: "bold #080",
33
+ Keyword.Pseudo: "#038",
34
+ Keyword.Type: "#339",
35
+
36
+ Operator: "#333",
37
+ Operator.Word: "bold #000",
38
+
39
+ Name.Builtin: "#007020",
40
+ Name.Function: "bold #06B",
41
+ Name.Class: "bold #B06",
42
+ Name.Namespace: "bold #0e84b5",
43
+ Name.Exception: "bold #F00",
44
+ Name.Variable: "#963",
45
+ Name.Variable.Instance: "#33B",
46
+ Name.Variable.Class: "#369",
47
+ Name.Variable.Global: "bold #d70",
48
+ Name.Constant: "bold #036",
49
+ Name.Label: "bold #970",
50
+ Name.Entity: "bold #800",
51
+ Name.Attribute: "#00C",
52
+ Name.Tag: "#070",
53
+ Name.Decorator: "bold #555",
54
+
55
+ String: "bg:#fff0f0",
56
+ String.Char: "#04D bg:",
57
+ String.Doc: "#D42 bg:",
58
+ String.Interpol: "bg:#eee",
59
+ String.Escape: "bold #666",
60
+ String.Regex: "bg:#fff0ff #000",
61
+ String.Symbol: "#A60 bg:",
62
+ String.Other: "#D20",
63
+
64
+ Number: "bold #60E",
65
+ Number.Integer: "bold #00D",
66
+ Number.Float: "bold #60E",
67
+ Number.Hex: "bold #058",
68
+ Number.Oct: "bold #40E",
69
+
70
+ Generic.Heading: "bold #000080",
71
+ Generic.Subheading: "bold #800080",
72
+ Generic.Deleted: "#A00000",
73
+ Generic.Inserted: "#00A000",
74
+ Generic.Error: "#FF0000",
75
+ Generic.Emph: "italic",
76
+ Generic.Strong: "bold",
77
+ Generic.EmphStrong: "bold italic",
78
+ Generic.Prompt: "bold #c65d09",
79
+ Generic.Output: "#888",
80
+ Generic.Traceback: "#04D",
81
+
82
+ Error: "#F00 bg:#FAA"
83
+ }
.cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments/styles/default.py ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ pygments.styles.default
3
+ ~~~~~~~~~~~~~~~~~~~~~~~
4
+
5
+ The default highlighting style.
6
+
7
+ :copyright: Copyright 2006-present by the Pygments team, see AUTHORS.
8
+ :license: BSD, see LICENSE for details.
9
+ """
10
+
11
+ from pygments.style import Style
12
+ from pygments.token import Keyword, Name, Comment, String, Error, \
13
+ Number, Operator, Generic, Whitespace
14
+
15
+
16
+ __all__ = ['DefaultStyle']
17
+
18
+
19
+ class DefaultStyle(Style):
20
+ """
21
+ The default style (inspired by Emacs 22).
22
+ """
23
+ name = 'default'
24
+
25
+ background_color = "#f8f8f8"
26
+
27
+ styles = {
28
+ Whitespace: "#bbbbbb",
29
+ Comment: "italic #3D7B7B",
30
+ Comment.Preproc: "noitalic #9C6500",
31
+
32
+ #Keyword: "bold #AA22FF",
33
+ Keyword: "bold #008000",
34
+ Keyword.Pseudo: "nobold",
35
+ Keyword.Type: "nobold #B00040",
36
+
37
+ Operator: "#666666",
38
+ Operator.Word: "bold #AA22FF",
39
+
40
+ Name.Builtin: "#008000",
41
+ Name.Function: "#0000FF",
42
+ Name.Class: "bold #0000FF",
43
+ Name.Namespace: "bold #0000FF",
44
+ Name.Exception: "bold #CB3F38",
45
+ Name.Variable: "#19177C",
46
+ Name.Constant: "#880000",
47
+ Name.Label: "#767600",
48
+ Name.Entity: "bold #717171",
49
+ Name.Attribute: "#687822",
50
+ Name.Tag: "bold #008000",
51
+ Name.Decorator: "#AA22FF",
52
+
53
+ String: "#BA2121",
54
+ String.Doc: "italic",
55
+ String.Interpol: "bold #A45A77",
56
+ String.Escape: "bold #AA5D1F",
57
+ String.Regex: "#A45A77",
58
+ #String.Symbol: "#B8860B",
59
+ String.Symbol: "#19177C",
60
+ String.Other: "#008000",
61
+ Number: "#666666",
62
+
63
+ Generic.Heading: "bold #000080",
64
+ Generic.Subheading: "bold #800080",
65
+ Generic.Deleted: "#A00000",
66
+ Generic.Inserted: "#008400",
67
+ Generic.Error: "#E40000",
68
+ Generic.Emph: "italic",
69
+ Generic.Strong: "bold",
70
+ Generic.EmphStrong: "bold italic",
71
+ Generic.Prompt: "bold #000080",
72
+ Generic.Output: "#717171",
73
+ Generic.Traceback: "#04D",
74
+
75
+ Error: "border:#FF0000"
76
+ }
.cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments/styles/dracula.py ADDED
@@ -0,0 +1,90 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ pygments.styles.dracula
3
+ ~~~~~~~~~~~~~~~~~~~~~~~
4
+
5
+ Pygments version of `Dracula` from https://github.com/dracula/dracula-theme.
6
+
7
+ Based on the Dracula Theme for pygments by Chris Bracco.
8
+ See https://github.com/dracula/pygments/tree/fee9ed5613d1086bc01b9d0a5a0e9867a009f571
9
+
10
+ :copyright: Copyright 2006-present by the Pygments team, see AUTHORS.
11
+ :license: BSD, see LICENSE for details.
12
+ """
13
+
14
+ from pygments.style import Style
15
+ from pygments.token import Keyword, Name, Comment, String, Error, Literal, \
16
+ Number, Operator, Other, Punctuation, Text, Generic, Whitespace
17
+
18
+
19
+ __all__ = ['DraculaStyle']
20
+
21
+ background = "#282a36"
22
+ foreground = "#f8f8f2"
23
+ selection = "#44475a"
24
+ comment = "#6272a4"
25
+ cyan = "#8be9fd"
26
+ green = "#50fa7b"
27
+ orange = "#ffb86c"
28
+ pink = "#ff79c6"
29
+ purple = "#bd93f9"
30
+ red = "#ff5555"
31
+ yellow = "#f1fa8c"
32
+
33
+ deletion = "#8b080b"
34
+
35
+ class DraculaStyle(Style):
36
+ name = 'dracula'
37
+
38
+ background_color = background
39
+ highlight_color = selection
40
+ line_number_color = yellow
41
+ line_number_background_color = selection
42
+ line_number_special_color = green
43
+ line_number_special_background_color = comment
44
+
45
+ styles = {
46
+ Whitespace: foreground,
47
+
48
+ Comment: comment,
49
+ Comment.Preproc: pink,
50
+
51
+ Generic: foreground,
52
+ Generic.Deleted: deletion,
53
+ Generic.Emph: "underline",
54
+ Generic.Heading: "bold",
55
+ Generic.Inserted: "bold",
56
+ Generic.Output: selection,
57
+ Generic.EmphStrong: "underline",
58
+ Generic.Subheading: "bold",
59
+
60
+ Error: foreground,
61
+
62
+ Keyword: pink,
63
+ Keyword.Constant: pink,
64
+ Keyword.Declaration: cyan + " italic",
65
+ Keyword.Type: cyan,
66
+
67
+ Literal: foreground,
68
+
69
+ Name: foreground,
70
+ Name.Attribute: green,
71
+ Name.Builtin: cyan + " italic",
72
+ Name.Builtin.Pseudo: foreground,
73
+ Name.Class: green,
74
+ Name.Function: green,
75
+ Name.Label: cyan + " italic",
76
+ Name.Tag: pink,
77
+ Name.Variable: cyan + " italic",
78
+
79
+ Number: orange,
80
+
81
+ Operator: pink,
82
+
83
+ Other: foreground,
84
+
85
+ Punctuation: foreground,
86
+
87
+ String: purple,
88
+
89
+ Text: foreground,
90
+ }
.cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments/styles/emacs.py ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ pygments.styles.emacs
3
+ ~~~~~~~~~~~~~~~~~~~~~
4
+
5
+ A highlighting style for Pygments, inspired by Emacs.
6
+
7
+ :copyright: Copyright 2006-present by the Pygments team, see AUTHORS.
8
+ :license: BSD, see LICENSE for details.
9
+ """
10
+
11
+ from pygments.style import Style
12
+ from pygments.token import Keyword, Name, Comment, String, Error, \
13
+ Number, Operator, Generic, Whitespace
14
+
15
+
16
+ __all__ = ['EmacsStyle']
17
+
18
+
19
+ class EmacsStyle(Style):
20
+ """
21
+ The default style (inspired by Emacs 22).
22
+ """
23
+ name = 'emacs'
24
+
25
+ background_color = "#f8f8f8"
26
+
27
+ styles = {
28
+ Whitespace: "#bbbbbb",
29
+ Comment: "italic #008800",
30
+ Comment.Preproc: "noitalic",
31
+ Comment.Special: "noitalic bold",
32
+
33
+ Keyword: "bold #AA22FF",
34
+ Keyword.Pseudo: "nobold",
35
+ Keyword.Type: "bold #00BB00",
36
+
37
+ Operator: "#666666",
38
+ Operator.Word: "bold #AA22FF",
39
+
40
+ Name.Builtin: "#AA22FF",
41
+ Name.Function: "#00A000",
42
+ Name.Class: "#0000FF",
43
+ Name.Namespace: "bold #0000FF",
44
+ Name.Exception: "bold #D2413A",
45
+ Name.Variable: "#B8860B",
46
+ Name.Constant: "#880000",
47
+ Name.Label: "#A0A000",
48
+ Name.Entity: "bold #999999",
49
+ Name.Attribute: "#BB4444",
50
+ Name.Tag: "bold #008000",
51
+ Name.Decorator: "#AA22FF",
52
+
53
+ String: "#BB4444",
54
+ String.Doc: "italic",
55
+ String.Interpol: "bold #BB6688",
56
+ String.Escape: "bold #BB6622",
57
+ String.Regex: "#BB6688",
58
+ String.Symbol: "#B8860B",
59
+ String.Other: "#008000",
60
+ Number: "#666666",
61
+
62
+ Generic.Heading: "bold #000080",
63
+ Generic.Subheading: "bold #800080",
64
+ Generic.Deleted: "#A00000",
65
+ Generic.Inserted: "#00A000",
66
+ Generic.Error: "#FF0000",
67
+ Generic.Emph: "italic",
68
+ Generic.Strong: "bold",
69
+ Generic.EmphStrong: "bold italic",
70
+ Generic.Prompt: "bold #000080",
71
+ Generic.Output: "#888",
72
+ Generic.Traceback: "#04D",
73
+
74
+ Error: "border:#FF0000"
75
+ }
.cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments/styles/friendly.py ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ pygments.styles.friendly
3
+ ~~~~~~~~~~~~~~~~~~~~~~~~
4
+
5
+ A modern style based on the VIM pyte theme.
6
+
7
+ :copyright: Copyright 2006-present by the Pygments team, see AUTHORS.
8
+ :license: BSD, see LICENSE for details.
9
+ """
10
+
11
+ from pygments.style import Style
12
+ from pygments.token import Keyword, Name, Comment, String, Error, \
13
+ Number, Operator, Generic, Whitespace
14
+
15
+
16
+ __all__ = ['FriendlyStyle']
17
+
18
+
19
+ class FriendlyStyle(Style):
20
+ """
21
+ A modern style based on the VIM pyte theme.
22
+ """
23
+ name = 'friendly'
24
+
25
+ background_color = "#f0f0f0"
26
+ line_number_color = "#666666"
27
+
28
+ styles = {
29
+ Whitespace: "#bbbbbb",
30
+ Comment: "italic #60a0b0",
31
+ Comment.Preproc: "noitalic #007020",
32
+ Comment.Special: "noitalic bg:#fff0f0",
33
+
34
+ Keyword: "bold #007020",
35
+ Keyword.Pseudo: "nobold",
36
+ Keyword.Type: "nobold #902000",
37
+
38
+ Operator: "#666666",
39
+ Operator.Word: "bold #007020",
40
+
41
+ Name.Builtin: "#007020",
42
+ Name.Function: "#06287e",
43
+ Name.Class: "bold #0e84b5",
44
+ Name.Namespace: "bold #0e84b5",
45
+ Name.Exception: "#007020",
46
+ Name.Variable: "#bb60d5",
47
+ Name.Constant: "#60add5",
48
+ Name.Label: "bold #002070",
49
+ Name.Entity: "bold #d55537",
50
+ Name.Attribute: "#4070a0",
51
+ Name.Tag: "bold #062873",
52
+ Name.Decorator: "bold #555555",
53
+
54
+ String: "#4070a0",
55
+ String.Doc: "italic",
56
+ String.Interpol: "italic #70a0d0",
57
+ String.Escape: "bold #4070a0",
58
+ String.Regex: "#235388",
59
+ String.Symbol: "#517918",
60
+ String.Other: "#c65d09",
61
+ Number: "#40a070",
62
+
63
+ Generic.Heading: "bold #000080",
64
+ Generic.Subheading: "bold #800080",
65
+ Generic.Deleted: "#A00000",
66
+ Generic.Inserted: "#00A000",
67
+ Generic.Error: "#FF0000",
68
+ Generic.Emph: "italic",
69
+ Generic.Strong: "bold",
70
+ Generic.EmphStrong: "bold italic",
71
+ Generic.Prompt: "bold #c65d09",
72
+ Generic.Output: "#888",
73
+ Generic.Traceback: "#04D",
74
+
75
+ Error: "border:#FF0000"
76
+ }
.cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments/styles/friendly_grayscale.py ADDED
@@ -0,0 +1,80 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ pygments.styles.friendly_grayscale
3
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4
+
5
+ A style based on friendly style.
6
+ The color values of the friendly style have been converted to grayscale
7
+ using the luminosity value calculated by
8
+ http://www.workwithcolor.com/color-converter-01.htm
9
+
10
+ :copyright: Copyright 2006-present by the Pygments team, see AUTHORS.
11
+ :license: BSD, see LICENSE for details.
12
+ """
13
+
14
+ from pygments.style import Style
15
+ from pygments.token import Keyword, Name, Comment, String, Error, \
16
+ Number, Operator, Generic, Whitespace
17
+
18
+
19
+ __all__ = ['FriendlyGrayscaleStyle']
20
+
21
+
22
+ class FriendlyGrayscaleStyle(Style):
23
+ """
24
+ A modern grayscale style based on the friendly style.
25
+
26
+ .. versionadded:: 2.11
27
+ """
28
+ name = 'friendly_grayscale'
29
+
30
+ background_color = "#f0f0f0"
31
+
32
+ styles = {
33
+ Whitespace: "#bbbbbb",
34
+ Comment: "italic #959595",
35
+ Comment.Preproc: "noitalic #575757",
36
+ Comment.Special: "noitalic bg:#F4F4F4",
37
+
38
+ Keyword: "bold #575757",
39
+ Keyword.Pseudo: "nobold",
40
+ Keyword.Type: "nobold #4F4F4F",
41
+
42
+ Operator: "#666666",
43
+ Operator.Word: "bold #575757",
44
+
45
+ Name.Builtin: "#575757",
46
+ Name.Function: "#3F3F3F",
47
+ Name.Class: "bold #7E7E7E",
48
+ Name.Namespace: "bold #7E7E7E",
49
+ Name.Exception: "#575757",
50
+ Name.Variable: "#9A9A9A",
51
+ Name.Constant: "#A5A5A5",
52
+ Name.Label: "bold #363636",
53
+ Name.Entity: "bold #848484",
54
+ Name.Attribute: "#707070",
55
+ Name.Tag: "bold #3B3B3B",
56
+ Name.Decorator: "bold #555555",
57
+
58
+ String: "#717171",
59
+ String.Doc: "italic",
60
+ String.Interpol: "italic #9F9F9F",
61
+ String.Escape: "bold #717171",
62
+ String.Regex: "#575757",
63
+ String.Symbol: "#676767",
64
+ String.Other: "#7E7E7E",
65
+ Number: "#888888",
66
+
67
+ Generic.Heading: "bold #373737",
68
+ Generic.Subheading: "bold #5A5A5A",
69
+ Generic.Deleted: "#545454",
70
+ Generic.Inserted: "#7D7D7D",
71
+ Generic.Error: "#898989",
72
+ Generic.Emph: "italic",
73
+ Generic.Strong: "bold",
74
+ Generic.EmphStrong: "bold italic",
75
+ Generic.Prompt: "bold #7E7E7E",
76
+ Generic.Output: "#888888",
77
+ Generic.Traceback: "#6D6D6D",
78
+
79
+ Error: "border:#898989"
80
+ }
.cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments/styles/fruity.py ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ pygments.styles.fruity
3
+ ~~~~~~~~~~~~~~~~~~~~~~
4
+
5
+ pygments version of my "fruity" vim theme.
6
+
7
+ :copyright: Copyright 2006-present by the Pygments team, see AUTHORS.
8
+ :license: BSD, see LICENSE for details.
9
+ """
10
+
11
+ from pygments.style import Style
12
+ from pygments.token import Token, Comment, Name, Keyword, \
13
+ Generic, Number, String, Whitespace
14
+
15
+
16
+ __all__ = ['FruityStyle']
17
+
18
+
19
+ class FruityStyle(Style):
20
+ """
21
+ Pygments version of the "native" vim theme.
22
+ """
23
+
24
+ name = 'fruity'
25
+
26
+ background_color = '#111111'
27
+ highlight_color = '#333333'
28
+
29
+ styles = {
30
+ Whitespace: '#888888',
31
+ Token: '#ffffff',
32
+ Generic.Output: '#444444 bg:#222222',
33
+ Keyword: '#fb660a bold',
34
+ Keyword.Pseudo: 'nobold',
35
+ Number: '#0086f7 bold',
36
+ Name.Tag: '#fb660a bold',
37
+ Name.Variable: '#fb660a',
38
+ Comment: '#008800 bg:#0f140f italic',
39
+ Name.Attribute: '#ff0086 bold',
40
+ String: '#0086d2',
41
+ Name.Function: '#ff0086 bold',
42
+ Generic.Heading: '#ffffff bold',
43
+ Keyword.Type: '#cdcaa9 bold',
44
+ Generic.Subheading: '#ffffff bold',
45
+ Name.Constant: '#0086d2',
46
+ Comment.Preproc: '#ff0007 bold'
47
+ }
.cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments/styles/gh_dark.py ADDED
@@ -0,0 +1,113 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ pygments.styles.gh_dark
3
+ ~~~~~~~~~~~~~~~~~~~~~~~
4
+
5
+ Github's Dark-Colorscheme based theme for Pygments
6
+ Colors extracted from https://github.com/primer/primitives
7
+
8
+ :copyright: Copyright 2006-present by the Pygments team, see AUTHORS.
9
+ :license: BSD, see LICENSE for details.
10
+ """
11
+
12
+ from pygments.style import Style
13
+ from pygments.token import Keyword, Name, Comment, Error, Number, Operator, \
14
+ Generic, Text, Literal, String, Token
15
+
16
+
17
+ __all__ = ['GhDarkStyle']
18
+
19
+
20
+ # vars are defined to match the defs in
21
+ # - [GitHub's VS Code theme](https://github.com/primer/github-vscode-theme) and
22
+ # - [Primer styles](https://github.com/primer/primitives)
23
+ RED_2 = "#ffa198"
24
+ RED_3 = "#ff7b72"
25
+ RED_9 = "#490202"
26
+ ORANGE_2 = "#ffa657"
27
+ ORANGE_3 = "#f0883e"
28
+ GREEN_1 = "#7ee787"
29
+ GREEN_2 = "#56d364"
30
+ GREEN_7 = "#0f5323"
31
+ BLUE_1 = "#a5d6ff"
32
+ BLUE_2 = "#79c0ff"
33
+ PURPLE_2 = "#d2a8ff"
34
+ GRAY_3 = "#8b949e"
35
+ GRAY_4 = "#6e7681"
36
+ FG_SUBTLE = "#6e7681"
37
+ FG_DEFAULT = "#e6edf3"
38
+ BG_DEFAULT = "#0d1117"
39
+ DANGER_FG = "#f85149"
40
+
41
+
42
+ class GhDarkStyle(Style):
43
+ """
44
+ Github's Dark-Colorscheme based theme for Pygments
45
+ """
46
+
47
+ name = 'github-dark'
48
+
49
+ background_color = BG_DEFAULT
50
+
51
+ # has transparency in VS Code theme as `colors.codemirror.activelineBg`
52
+ highlight_color = GRAY_4
53
+
54
+ line_number_special_color = FG_DEFAULT
55
+ line_number_special_background_color = FG_SUBTLE
56
+
57
+ line_number_color = GRAY_4
58
+ line_number_background_color = BG_DEFAULT
59
+
60
+ styles = {
61
+ Token: FG_DEFAULT,
62
+
63
+ Error: DANGER_FG,
64
+
65
+ Keyword: RED_3,
66
+ Keyword.Constant: BLUE_2,
67
+ Keyword.Pseudo: BLUE_2,
68
+
69
+ Name: FG_DEFAULT,
70
+ Name.Class: "bold "+ORANGE_3,
71
+ Name.Constant: "bold "+BLUE_2,
72
+ Name.Decorator: 'bold '+PURPLE_2,
73
+ Name.Entity: ORANGE_2,
74
+ Name.Exception: "bold "+ORANGE_3,
75
+ Name.Function: 'bold '+PURPLE_2,
76
+ Name.Label: "bold "+BLUE_2,
77
+ Name.Namespace: RED_3,
78
+ Name.Property: BLUE_2,
79
+ Name.Tag: GREEN_1,
80
+ Name.Variable: BLUE_2,
81
+
82
+ Literal: BLUE_1,
83
+ Literal.Date: BLUE_2,
84
+ String: BLUE_1,
85
+ String.Affix: BLUE_2,
86
+ String.Delimiter: BLUE_2,
87
+ String.Escape: BLUE_2,
88
+ String.Heredoc: BLUE_2,
89
+ String.Regex: BLUE_2,
90
+ Number: BLUE_1,
91
+
92
+ Comment: 'italic '+GRAY_3,
93
+ Comment.Preproc: "bold " + GRAY_3,
94
+ Comment.Special: "bold italic " + GRAY_3,
95
+
96
+ Operator: 'bold ' + RED_3,
97
+
98
+ Generic: FG_DEFAULT,
99
+ Generic.Deleted: f"bg:{RED_9} {RED_2}",
100
+ Generic.Emph: "italic",
101
+ Generic.Error: RED_2,
102
+ Generic.Heading: "bold "+BLUE_2,
103
+ Generic.Inserted: f'bg:{GREEN_7} {GREEN_2}',
104
+ Generic.Output: GRAY_3,
105
+ Generic.Prompt: GRAY_3,
106
+ Generic.Strong: "bold",
107
+ Generic.EmphStrong: "bold italic",
108
+ Generic.Subheading: BLUE_2,
109
+ Generic.Traceback: RED_3,
110
+ Generic.Underline: "underline",
111
+
112
+ Text.Whitespace: FG_SUBTLE,
113
+ }
.cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments/styles/gruvbox.py ADDED
@@ -0,0 +1,118 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ pygments.styles.gruvbox
3
+ ~~~~~~~~~~~~~~~~~~~~~~~
4
+
5
+ pygments version of the "gruvbox" vim theme.
6
+ https://github.com/morhetz/gruvbox
7
+
8
+ :copyright: Copyright 2006-present by the Pygments team, see AUTHORS.
9
+ :license: BSD, see LICENSE for details.
10
+ """
11
+
12
+ from pygments.style import Style
13
+ from pygments.token import Token, Keyword, Name, Comment, String, Error, \
14
+ Number, Operator, Generic
15
+
16
+
17
+ __all__ = ['GruvboxDarkStyle', 'GruvboxLightStyle']
18
+
19
+
20
+ class GruvboxDarkStyle(Style):
21
+ """
22
+ Pygments version of the "gruvbox" dark vim theme.
23
+ """
24
+
25
+ name = 'gruvbox-dark'
26
+
27
+ background_color = '#282828'
28
+ highlight_color = '#ebdbb2'
29
+
30
+ styles = {
31
+ Token: '#dddddd',
32
+
33
+ Comment: 'italic #928374',
34
+ Comment.PreProc: '#8ec07c',
35
+ Comment.Special: 'bold italic #ebdbb2',
36
+
37
+ Keyword: '#fb4934',
38
+ Operator.Word: '#fb4934',
39
+
40
+ String: '#b8bb26',
41
+ String.Escape: '#fe8019',
42
+
43
+ Number: '#d3869b',
44
+
45
+ Name.Builtin: '#fe8019',
46
+ Name.Variable: '#83a598',
47
+ Name.Constant: '#d3869b',
48
+ Name.Class: '#8ec07c',
49
+ Name.Function: '#8ec07c',
50
+ Name.Namespace: '#8ec07c',
51
+ Name.Exception: '#fb4934',
52
+ Name.Tag: '#8ec07c',
53
+ Name.Attribute: '#fabd2f',
54
+ Name.Decorator: '#fb4934',
55
+
56
+ Generic.Heading: 'bold #ebdbb2',
57
+ Generic.Subheading: 'underline #ebdbb2',
58
+ Generic.Deleted: 'bg:#fb4934 #282828',
59
+ Generic.Inserted: 'bg:#b8bb26 #282828',
60
+ Generic.Error: '#fb4934',
61
+ Generic.Emph: 'italic',
62
+ Generic.Strong: 'bold',
63
+ Generic.EmphStrong: 'bold italic',
64
+ Generic.Prompt: '#a89984',
65
+ Generic.Output: '#f2e5bc',
66
+ Generic.Traceback: '#fb4934',
67
+
68
+ Error: 'bg:#fb4934 #282828'
69
+ }
70
+
71
+
72
+ class GruvboxLightStyle(Style):
73
+ """
74
+ Pygments version of the "gruvbox" Light vim theme.
75
+ """
76
+
77
+ name = 'gruvbox-light'
78
+
79
+ background_color = '#fbf1c7'
80
+ highlight_color = '#3c3836'
81
+
82
+ styles = {
83
+ Comment: 'italic #928374',
84
+ Comment.PreProc: '#427b58',
85
+ Comment.Special: 'bold italic #3c3836',
86
+
87
+ Keyword: '#9d0006',
88
+ Operator.Word: '#9d0006',
89
+
90
+ String: '#79740e',
91
+ String.Escape: '#af3a03',
92
+
93
+ Number: '#8f3f71',
94
+
95
+ Name.Builtin: '#af3a03',
96
+ Name.Variable: '#076678',
97
+ Name.Constant: '#8f3f71',
98
+ Name.Class: '#427b58',
99
+ Name.Function: '#427b58',
100
+ Name.Namespace: '#427b58',
101
+ Name.Exception: '#9d0006',
102
+ Name.Tag: '#427b58',
103
+ Name.Attribute: '#b57614',
104
+ Name.Decorator: '#9d0006',
105
+
106
+ Generic.Heading: 'bold #3c3836',
107
+ Generic.Subheading: 'underline #3c3836',
108
+ Generic.Deleted: 'bg:#9d0006 #fbf1c7',
109
+ Generic.Inserted: 'bg:#79740e #fbf1c7',
110
+ Generic.Error: '#9d0006',
111
+ Generic.Emph: 'italic',
112
+ Generic.Strong: 'bold',
113
+ Generic.Prompt: '#7c6f64',
114
+ Generic.Output: '#32302f',
115
+ Generic.Traceback: '#9d0006',
116
+
117
+ Error: 'bg:#9d0006 #fbf1c7'
118
+ }
.cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments/styles/igor.py ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ pygments.styles.igor
3
+ ~~~~~~~~~~~~~~~~~~~~
4
+
5
+ Igor Pro default style.
6
+
7
+ :copyright: Copyright 2006-present by the Pygments team, see AUTHORS.
8
+ :license: BSD, see LICENSE for details.
9
+ """
10
+
11
+ from pygments.style import Style
12
+ from pygments.token import Keyword, Name, Comment, String
13
+
14
+
15
+ __all__ = ['IgorStyle']
16
+
17
+
18
+ class IgorStyle(Style):
19
+ """
20
+ Pygments version of the official colors for Igor Pro procedures.
21
+ """
22
+
23
+ name = 'igor'
24
+
25
+ styles = {
26
+ Comment: 'italic #FF0000',
27
+ Keyword: '#0000FF',
28
+ Name.Function: '#C34E00',
29
+ Name.Decorator: '#CC00A3',
30
+ Name.Class: '#007575',
31
+ String: '#009C00'
32
+ }
.cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments/styles/inkpot.py ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ pygments.styles.inkpot
3
+ ~~~~~~~~~~~~~~~~~~~~~~
4
+
5
+ A highlighting style for Pygments, inspired by the Inkpot theme for VIM.
6
+
7
+ :copyright: Copyright 2006-present by the Pygments team, see AUTHORS.
8
+ :license: BSD, see LICENSE for details.
9
+ """
10
+
11
+ from pygments.style import Style
12
+ from pygments.token import Text, Other, Keyword, Name, Comment, String, \
13
+ Error, Number, Operator, Generic, Whitespace, Punctuation
14
+
15
+
16
+ __all__ = ['InkPotStyle']
17
+
18
+
19
+ class InkPotStyle(Style):
20
+ name = 'inkpot'
21
+
22
+ background_color = "#1e1e27"
23
+
24
+ styles = {
25
+ Text: "#cfbfad",
26
+ Other: "#cfbfad",
27
+ Whitespace: "#434357",
28
+ Comment: "#cd8b00",
29
+ Comment.Preproc: "#409090",
30
+ Comment.PreprocFile: "bg:#404040 #ffcd8b",
31
+ Comment.Special: "#808bed",
32
+
33
+ Keyword: "#808bed",
34
+ Keyword.Pseudo: "nobold",
35
+ Keyword.Type: "#ff8bff",
36
+
37
+ Operator: "#666666",
38
+
39
+ Punctuation: "#cfbfad",
40
+
41
+ Name: "#cfbfad",
42
+ Name.Attribute: "#cfbfad",
43
+ Name.Builtin.Pseudo: '#ffff00',
44
+ Name.Builtin: "#808bed",
45
+ Name.Class: "#ff8bff",
46
+ Name.Constant: "#409090",
47
+ Name.Decorator: "#409090",
48
+ Name.Exception: "#ff0000",
49
+ Name.Function: "#c080d0",
50
+ Name.Label: "#808bed",
51
+ Name.Namespace: "#ff0000",
52
+ Name.Variable: "#cfbfad",
53
+
54
+ String: "bg:#404040 #ffcd8b",
55
+ String.Doc: "#808bed",
56
+
57
+ Number: "#f0ad6d",
58
+
59
+ Generic.Heading: "bold #000080",
60
+ Generic.Subheading: "bold #800080",
61
+ Generic.Deleted: "#A00000",
62
+ Generic.Inserted: "#00A000",
63
+ Generic.Error: "#FF0000",
64
+ Generic.Emph: "italic",
65
+ Generic.Strong: "bold",
66
+ Generic.EmphStrong: "bold italic",
67
+ Generic.Prompt: "bold #000080",
68
+ Generic.Output: "#888",
69
+ Generic.Traceback: "#04D",
70
+
71
+ Error: "bg:#6e2e2e #ffffff"
72
+ }
.cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments/styles/lightbulb.py ADDED
@@ -0,0 +1,110 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ pygments.styles.lightbulb
3
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
4
+
5
+ A minimal dark theme based on the Lightbulb theme for VSCode.
6
+
7
+ :copyright: Copyright 2006-present by the Pygments team, see AUTHORS.
8
+ :license: BSD, see LICENSE for details.
9
+ """
10
+
11
+ from pygments.style import Style
12
+ from pygments.token import (
13
+ Comment,
14
+ Error,
15
+ Generic,
16
+ Keyword,
17
+ Literal,
18
+ Name,
19
+ Number,
20
+ Operator,
21
+ Punctuation,
22
+ String,
23
+ Token,
24
+ )
25
+
26
+
27
+ __all__ = ['LightbulbStyle']
28
+
29
+
30
+ COLORS = {
31
+ "bg": "#1d2331",
32
+ "blue_1": "#73D0FF",
33
+ "gray_1": "#7e8aa1",
34
+ "gray_2": "#3c4354",
35
+ "gray_3": "#6e7681",
36
+ "red_1": "#f88f7f",
37
+ "red_2": "#3d1e20",
38
+ "orange_1": "#FFAD66",
39
+ "orange_2": "#F29E74",
40
+ "yellow_1": "#FFD173",
41
+ "white": "#d4d2c8",
42
+ "magenta_1": "#DFBFFF",
43
+ "green_1": "#D5FF80",
44
+ "green_2": "#19362c",
45
+ "cyan_1": "#95E6CB",
46
+ }
47
+
48
+
49
+ class LightbulbStyle(Style):
50
+ """
51
+ A minimal dark theme based on the Lightbulb theme for VSCode.
52
+ """
53
+
54
+ name = 'lightbulb'
55
+
56
+ background_color = COLORS['bg']
57
+ highlight_color = COLORS['gray_3']
58
+
59
+ line_number_color = COLORS['gray_2']
60
+ line_number_special_color = COLORS['gray_2']
61
+
62
+ styles = {
63
+ Comment: COLORS["gray_1"],
64
+ Comment.Hashbang: "italic " + COLORS['red_1'],
65
+ Comment.Preproc: "bold " + COLORS['orange_1'],
66
+ Comment.Special: "italic " + COLORS['gray_1'],
67
+ Error: COLORS['red_1'],
68
+ Generic.Deleted: f"bg:{COLORS['red_2']} #f88f7f",
69
+ Generic.Emph: "italic",
70
+ Generic.Error: "#f88f7f",
71
+ Generic.Inserted: f"bg:{COLORS['green_2']} #6ad4af",
72
+ Generic.Output: COLORS['gray_1'],
73
+ Generic.Strong: "bold",
74
+ Generic.Traceback: COLORS['red_1'],
75
+ Keyword: COLORS['orange_1'],
76
+ Keyword.Constant: COLORS['orange_1'],
77
+ Keyword.Declaration: COLORS['orange_1'],
78
+ Keyword.Namespace: COLORS['orange_1'],
79
+ Keyword.Reserved: COLORS['orange_1'],
80
+ Keyword.Type: COLORS['blue_1'],
81
+ Literal: COLORS['green_1'],
82
+ Name: COLORS['white'],
83
+ Name.Attribute: COLORS['yellow_1'],
84
+ Name.Builtin: COLORS['yellow_1'],
85
+ Name.Builtin.Pseudo: "#5CCFE6",
86
+ Name.Class: COLORS['blue_1'],
87
+ Name.Constant: COLORS['yellow_1'],
88
+ Name.Decorator: "bold italic " + COLORS['gray_1'],
89
+ Name.Entity: COLORS['cyan_1'],
90
+ Name.Exception: COLORS['blue_1'],
91
+ Name.Function: COLORS['yellow_1'],
92
+ Name.Function.Magic: COLORS['yellow_1'],
93
+ Name.Other: COLORS['white'],
94
+ Name.Property: COLORS['yellow_1'],
95
+ Name.Tag: "#5CCFE6",
96
+ Name.Variable: COLORS['white'],
97
+ Number: COLORS['magenta_1'],
98
+ Operator: COLORS['orange_1'],
99
+ Operator.Word: COLORS['orange_1'],
100
+ Punctuation: COLORS['white'],
101
+ String: COLORS['green_1'],
102
+ String.Affix: COLORS['orange_2'],
103
+ String.Doc: COLORS['gray_1'],
104
+ String.Escape: COLORS['cyan_1'],
105
+ String.Interpol: COLORS['cyan_1'],
106
+ String.Other: COLORS['cyan_1'],
107
+ String.Regex: COLORS['cyan_1'],
108
+ String.Symbol: COLORS['magenta_1'],
109
+ Token: COLORS['white'],
110
+ }
.cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments/styles/lilypond.py ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ pygments.styles.lilypond
3
+ ~~~~~~~~~~~~~~~~~~~~~~~~
4
+
5
+ LilyPond-specific style.
6
+
7
+ :copyright: Copyright 2006-present by the Pygments team, see AUTHORS.
8
+ :license: BSD, see LICENSE for details.
9
+ """
10
+
11
+ from pygments.style import Style
12
+ from pygments.token import Token
13
+
14
+
15
+ __all__ = ['LilyPondStyle']
16
+
17
+
18
+ class LilyPondStyle(Style):
19
+ """
20
+ Style for the LilyPond language.
21
+
22
+ .. versionadded:: 2.11
23
+ """
24
+
25
+ name = 'lilypond'
26
+
27
+ # Don't show it in the gallery, it's intended for LilyPond
28
+ # input only and doesn't show good output on Python code.
29
+ web_style_gallery_exclude = True
30
+
31
+ styles = {
32
+ Token.Text: "",
33
+ Token.Keyword: "bold",
34
+ Token.Comment: "italic #A3AAB2",
35
+ Token.String: "#AB0909",
36
+ Token.String.Escape: "#C46C6C",
37
+ Token.String.Symbol: "noinherit",
38
+ Token.Pitch: "", #"#911520",
39
+ Token.Number: "#976806", # includes durations
40
+ # A bare 11 is not distinguishable from a number, so we highlight
41
+ # the same.
42
+ Token.ChordModifier: "#976806",
43
+ Token.Name.Lvalue: "#08547A",
44
+ Token.Name.BackslashReference: "#08547A",
45
+ Token.Name.Builtin.MusicCommand: "bold #08547A",
46
+ Token.Name.Builtin.PaperVariable: "bold #6C5A05",
47
+ Token.Name.Builtin.HeaderVariable: "bold #6C5A05",
48
+ Token.Name.Builtin.MusicFunction: "bold #08547A",
49
+ Token.Name.Builtin.Clef: "bold #08547A",
50
+ Token.Name.Builtin.Scale: "bold #08547A",
51
+ Token.Name.Builtin.RepeatType: "#08547A",
52
+ Token.Name.Builtin.Dynamic: "#68175A",
53
+ Token.Name.Builtin.Articulation: "#68175A",
54
+ Token.Name.Builtin.SchemeFunction: "bold #A83401",
55
+ Token.Name.Builtin.SchemeBuiltin: "bold",
56
+ Token.Name.Builtin.MarkupCommand: "bold #831E71",
57
+ Token.Name.Builtin.Context: "bold #038B8B",
58
+ Token.Name.Builtin.ContextProperty: "#038B8B",
59
+ Token.Name.Builtin.Grob: "bold #0C7441",
60
+ Token.Name.Builtin.GrobProperty: "#0C7441",
61
+ Token.Name.Builtin.Translator: "bold #6200A4",
62
+ }
.cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments/styles/lovelace.py ADDED
@@ -0,0 +1,100 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ pygments.styles.lovelace
3
+ ~~~~~~~~~~~~~~~~~~~~~~~~
4
+
5
+ Lovelace by Miikka Salminen
6
+
7
+ Pygments style by Miikka Salminen (https://github.com/miikkas)
8
+ A desaturated, somewhat subdued style created for the Lovelace interactive
9
+ learning environment.
10
+
11
+ :copyright: Copyright 2006-present by the Pygments team, see AUTHORS.
12
+ :license: BSD, see LICENSE for details.
13
+ """
14
+
15
+ from pygments.style import Style
16
+ from pygments.token import Keyword, Name, Comment, String, Error, \
17
+ Number, Operator, Punctuation, Generic, Whitespace
18
+
19
+
20
+ __all__ = ['LovelaceStyle']
21
+
22
+
23
+ class LovelaceStyle(Style):
24
+ """
25
+ The style used in Lovelace interactive learning environment. Tries to avoid
26
+ the "angry fruit salad" effect with desaturated and dim colours.
27
+ """
28
+ name = 'lovelace'
29
+
30
+ _KW_BLUE = '#2838b0'
31
+ _NAME_GREEN = '#388038'
32
+ _DOC_ORANGE = '#b85820'
33
+ _OW_PURPLE = '#a848a8'
34
+ _FUN_BROWN = '#785840'
35
+ _STR_RED = '#b83838'
36
+ _CLS_CYAN = '#287088'
37
+ _ESCAPE_LIME = '#709030'
38
+ _LABEL_CYAN = '#289870'
39
+ _EXCEPT_YELLOW = '#908828'
40
+
41
+ styles = {
42
+ Whitespace: '#a89028',
43
+ Comment: 'italic #888888',
44
+ Comment.Hashbang: _CLS_CYAN,
45
+ Comment.Multiline: '#888888',
46
+ Comment.Preproc: 'noitalic '+_LABEL_CYAN,
47
+
48
+ Keyword: _KW_BLUE,
49
+ Keyword.Constant: 'italic #444444',
50
+ Keyword.Declaration: 'italic',
51
+ Keyword.Type: 'italic',
52
+
53
+ Operator: '#666666',
54
+ Operator.Word: _OW_PURPLE,
55
+
56
+ Punctuation: '#888888',
57
+
58
+ Name.Attribute: _NAME_GREEN,
59
+ Name.Builtin: _NAME_GREEN,
60
+ Name.Builtin.Pseudo: 'italic',
61
+ Name.Class: _CLS_CYAN,
62
+ Name.Constant: _DOC_ORANGE,
63
+ Name.Decorator: _CLS_CYAN,
64
+ Name.Entity: _ESCAPE_LIME,
65
+ Name.Exception: _EXCEPT_YELLOW,
66
+ Name.Function: _FUN_BROWN,
67
+ Name.Function.Magic: _DOC_ORANGE,
68
+ Name.Label: _LABEL_CYAN,
69
+ Name.Namespace: _LABEL_CYAN,
70
+ Name.Tag: _KW_BLUE,
71
+ Name.Variable: '#b04040',
72
+ Name.Variable.Global:_EXCEPT_YELLOW,
73
+ Name.Variable.Magic: _DOC_ORANGE,
74
+
75
+ String: _STR_RED,
76
+ String.Affix: '#444444',
77
+ String.Char: _OW_PURPLE,
78
+ String.Delimiter: _DOC_ORANGE,
79
+ String.Doc: 'italic '+_DOC_ORANGE,
80
+ String.Escape: _ESCAPE_LIME,
81
+ String.Interpol: 'underline',
82
+ String.Other: _OW_PURPLE,
83
+ String.Regex: _OW_PURPLE,
84
+
85
+ Number: '#444444',
86
+
87
+ Generic.Deleted: '#c02828',
88
+ Generic.Emph: 'italic',
89
+ Generic.Error: '#c02828',
90
+ Generic.Heading: '#666666',
91
+ Generic.Subheading: '#444444',
92
+ Generic.Inserted: _NAME_GREEN,
93
+ Generic.Output: '#666666',
94
+ Generic.Prompt: '#444444',
95
+ Generic.Strong: 'bold',
96
+ Generic.EmphStrong: 'bold italic',
97
+ Generic.Traceback: _KW_BLUE,
98
+
99
+ Error: 'bg:'+_OW_PURPLE,
100
+ }
.cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments/styles/manni.py ADDED
@@ -0,0 +1,79 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ pygments.styles.manni
3
+ ~~~~~~~~~~~~~~~~~~~~~
4
+
5
+ A colorful style, inspired by the terminal highlighting style.
6
+
7
+ This is a port of the style used in the `php port`_ of pygments
8
+ by Manni. The style is called 'default' there.
9
+
10
+ :copyright: Copyright 2006-present by the Pygments team, see AUTHORS.
11
+ :license: BSD, see LICENSE for details.
12
+ """
13
+
14
+ from pygments.style import Style
15
+ from pygments.token import Keyword, Name, Comment, String, Error, \
16
+ Number, Operator, Generic, Whitespace
17
+
18
+
19
+ __all__ = ['ManniStyle']
20
+
21
+
22
+ class ManniStyle(Style):
23
+ """
24
+ A colorful style, inspired by the terminal highlighting style.
25
+ """
26
+ name = 'manni'
27
+
28
+ background_color = '#f0f3f3'
29
+
30
+ styles = {
31
+ Whitespace: '#bbbbbb',
32
+ Comment: 'italic #0099FF',
33
+ Comment.Preproc: 'noitalic #009999',
34
+ Comment.Special: 'bold',
35
+
36
+ Keyword: 'bold #006699',
37
+ Keyword.Pseudo: 'nobold',
38
+ Keyword.Type: '#007788',
39
+
40
+ Operator: '#555555',
41
+ Operator.Word: 'bold #000000',
42
+
43
+ Name.Builtin: '#336666',
44
+ Name.Function: '#CC00FF',
45
+ Name.Class: 'bold #00AA88',
46
+ Name.Namespace: 'bold #00CCFF',
47
+ Name.Exception: 'bold #CC0000',
48
+ Name.Variable: '#003333',
49
+ Name.Constant: '#336600',
50
+ Name.Label: '#9999FF',
51
+ Name.Entity: 'bold #999999',
52
+ Name.Attribute: '#330099',
53
+ Name.Tag: 'bold #330099',
54
+ Name.Decorator: '#9999FF',
55
+
56
+ String: '#CC3300',
57
+ String.Doc: 'italic',
58
+ String.Interpol: '#AA0000',
59
+ String.Escape: 'bold #CC3300',
60
+ String.Regex: '#33AAAA',
61
+ String.Symbol: '#FFCC33',
62
+ String.Other: '#CC3300',
63
+
64
+ Number: '#FF6600',
65
+
66
+ Generic.Heading: 'bold #003300',
67
+ Generic.Subheading: 'bold #003300',
68
+ Generic.Deleted: 'border:#CC0000 bg:#FFCCCC',
69
+ Generic.Inserted: 'border:#00CC00 bg:#CCFFCC',
70
+ Generic.Error: '#FF0000',
71
+ Generic.Emph: 'italic',
72
+ Generic.Strong: 'bold',
73
+ Generic.EmphStrong: 'bold italic',
74
+ Generic.Prompt: 'bold #000099',
75
+ Generic.Output: '#AAAAAA',
76
+ Generic.Traceback: '#99CC66',
77
+
78
+ Error: 'bg:#FFAAAA #AA0000'
79
+ }
.cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments/styles/material.py ADDED
@@ -0,0 +1,124 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ pygments.styles.material
3
+ ~~~~~~~~~~~~~~~~~~~~~~~~
4
+
5
+ Mimic the Material theme color scheme.
6
+
7
+ https://github.com/material-theme/vsc-material-theme
8
+
9
+ :copyright: Copyright 2006-present by the Pygments team, see AUTHORS.
10
+ :license: BSD, see LICENSE for details.
11
+ """
12
+
13
+ from pygments.style import Style
14
+ from pygments.token import Keyword, Name, Comment, String, Escape, \
15
+ Error, Text, Number, Operator, Generic, Punctuation, Literal
16
+
17
+
18
+ __all__ = ['MaterialStyle']
19
+
20
+
21
+ class MaterialStyle(Style):
22
+ """
23
+ This style mimics the Material Theme color scheme.
24
+ """
25
+ name = 'material'
26
+
27
+ dark_teal = '#263238'
28
+ white = '#FFFFFF'
29
+ black = '#000000'
30
+ red = '#FF5370'
31
+ orange = '#F78C6C'
32
+ yellow = '#FFCB6B'
33
+ green = '#C3E88D'
34
+ cyan = '#89DDFF'
35
+ blue = '#82AAFF'
36
+ paleblue = '#B2CCD6'
37
+ purple = '#C792EA'
38
+ brown = '#C17E70'
39
+ pink = '#F07178'
40
+ violet = '#BB80B3'
41
+ foreground = '#EEFFFF'
42
+ faded = '#546E7A'
43
+
44
+ background_color = dark_teal
45
+ highlight_color = '#2C3B41'
46
+ line_number_color = '#37474F'
47
+ line_number_background_color = dark_teal
48
+ line_number_special_color = '#607A86'
49
+ line_number_special_background_color = dark_teal
50
+
51
+ styles = {
52
+ Text: foreground,
53
+ Escape: cyan,
54
+ Error: red,
55
+
56
+ Keyword: violet,
57
+ Keyword.Constant: cyan,
58
+ Keyword.Declaration: violet,
59
+ Keyword.Namespace: 'italic ' + cyan,
60
+ Keyword.Pseudo: cyan,
61
+ Keyword.Type: violet,
62
+
63
+ Name: foreground,
64
+ Name.Attribute: violet,
65
+ Name.Builtin: blue,
66
+ Name.Builtin.Pseudo: cyan,
67
+ Name.Class: yellow,
68
+ Name.Constant: foreground,
69
+ Name.Decorator: blue,
70
+ Name.Entity: cyan,
71
+ Name.Exception: yellow,
72
+ Name.Function: blue,
73
+ Name.Function.Magic: blue,
74
+ Name.Label: blue,
75
+ Name.Property: yellow,
76
+ Name.Namespace: yellow,
77
+ Name.Other: foreground,
78
+ Name.Tag: red,
79
+ Name.Variable: cyan,
80
+ Name.Variable.Class: cyan,
81
+ Name.Variable.Global: cyan,
82
+ Name.Variable.Instance: cyan,
83
+ Name.Variable.Magic: blue,
84
+
85
+ Literal: green,
86
+ Literal.Date: green,
87
+
88
+ String: green,
89
+ String.Affix: violet,
90
+ String.Backtick: green,
91
+ String.Char: green,
92
+ String.Delimiter: foreground,
93
+ String.Doc: 'italic ' + faded,
94
+ String.Double: green,
95
+ String.Escape: foreground,
96
+ String.Heredoc: green,
97
+ String.Interpol: cyan,
98
+ String.Other: green,
99
+ String.Regex: cyan,
100
+ String.Single: green,
101
+ String.Symbol: cyan,
102
+
103
+ Number: orange,
104
+
105
+ Operator: cyan,
106
+ Operator.Word: 'italic ' + cyan,
107
+
108
+ Punctuation: cyan,
109
+
110
+ Comment: 'italic ' + faded,
111
+
112
+ Generic: foreground,
113
+ Generic.Deleted: red,
114
+ Generic.Emph: cyan,
115
+ Generic.Error: red,
116
+ Generic.Heading: green,
117
+ Generic.Inserted: green,
118
+ Generic.Output: faded,
119
+ Generic.Prompt: yellow,
120
+ Generic.Strong: red,
121
+ Generic.EmphStrong: yellow,
122
+ Generic.Subheading: cyan,
123
+ Generic.Traceback: red,
124
+ }
.cache/uv/archive-v0/8HXDPXsFSToj27nOg3aiO/pygments/styles/monokai.py ADDED
@@ -0,0 +1,112 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ pygments.styles.monokai
3
+ ~~~~~~~~~~~~~~~~~~~~~~~
4
+
5
+ Mimic the Monokai color scheme. Based on tango.py.
6
+
7
+ http://www.monokai.nl/blog/2006/07/15/textmate-color-theme/
8
+
9
+ :copyright: Copyright 2006-present by the Pygments team, see AUTHORS.
10
+ :license: BSD, see LICENSE for details.
11
+ """
12
+
13
+ from pygments.style import Style
14
+ from pygments.token import Keyword, Name, Comment, String, Error, Token, \
15
+ Number, Operator, Generic, Whitespace, Punctuation, Other, Literal
16
+
17
+
18
+ __all__ = ['MonokaiStyle']
19
+
20
+
21
+ class MonokaiStyle(Style):
22
+ """
23
+ This style mimics the Monokai color scheme.
24
+ """
25
+ name = 'monokai'
26
+
27
+ background_color = "#272822"
28
+ highlight_color = "#49483e"
29
+
30
+ styles = {
31
+ # No corresponding class for the following:
32
+ Token: "#f8f8f2", # class: ''
33
+ Whitespace: "", # class: 'w'
34
+ Error: "#ed007e bg:#1e0010", # class: 'err'
35
+ Other: "", # class 'x'
36
+
37
+ Comment: "#959077", # class: 'c'
38
+ Comment.Multiline: "", # class: 'cm'
39
+ Comment.Preproc: "", # class: 'cp'
40
+ Comment.Single: "", # class: 'c1'
41
+ Comment.Special: "", # class: 'cs'
42
+
43
+ Keyword: "#66d9ef", # class: 'k'
44
+ Keyword.Constant: "", # class: 'kc'
45
+ Keyword.Declaration: "", # class: 'kd'
46
+ Keyword.Namespace: "#ff4689", # class: 'kn'
47
+ Keyword.Pseudo: "", # class: 'kp'
48
+ Keyword.Reserved: "", # class: 'kr'
49
+ Keyword.Type: "", # class: 'kt'
50
+
51
+ Operator: "#ff4689", # class: 'o'
52
+ Operator.Word: "", # class: 'ow' - like keywords
53
+
54
+ Punctuation: "#f8f8f2", # class: 'p'
55
+
56
+ Name: "#f8f8f2", # class: 'n'
57
+ Name.Attribute: "#a6e22e", # class: 'na' - to be revised
58
+ Name.Builtin: "", # class: 'nb'
59
+ Name.Builtin.Pseudo: "", # class: 'bp'
60
+ Name.Class: "#a6e22e", # class: 'nc' - to be revised
61
+ Name.Constant: "#66d9ef", # class: 'no' - to be revised
62
+ Name.Decorator: "#a6e22e", # class: 'nd' - to be revised
63
+ Name.Entity: "", # class: 'ni'
64
+ Name.Exception: "#a6e22e", # class: 'ne'
65
+ Name.Function: "#a6e22e", # class: 'nf'
66
+ Name.Property: "", # class: 'py'
67
+ Name.Label: "", # class: 'nl'
68
+ Name.Namespace: "", # class: 'nn' - to be revised
69
+ Name.Other: "#a6e22e", # class: 'nx'
70
+ Name.Tag: "#ff4689", # class: 'nt' - like a keyword
71
+ Name.Variable: "", # class: 'nv' - to be revised
72
+ Name.Variable.Class: "", # class: 'vc' - to be revised
73
+ Name.Variable.Global: "", # class: 'vg' - to be revised
74
+ Name.Variable.Instance: "", # class: 'vi' - to be revised
75
+
76
+ Number: "#ae81ff", # class: 'm'
77
+ Number.Float: "", # class: 'mf'
78
+ Number.Hex: "", # class: 'mh'
79
+ Number.Integer: "", # class: 'mi'
80
+ Number.Integer.Long: "", # class: 'il'
81
+ Number.Oct: "", # class: 'mo'
82
+
83
+ Literal: "#ae81ff", # class: 'l'
84
+ Literal.Date: "#e6db74", # class: 'ld'
85
+
86
+ String: "#e6db74", # class: 's'
87
+ String.Backtick: "", # class: 'sb'
88
+ String.Char: "", # class: 'sc'
89
+ String.Doc: "", # class: 'sd' - like a comment
90
+ String.Double: "", # class: 's2'
91
+ String.Escape: "#ae81ff", # class: 'se'
92
+ String.Heredoc: "", # class: 'sh'
93
+ String.Interpol: "", # class: 'si'
94
+ String.Other: "", # class: 'sx'
95
+ String.Regex: "", # class: 'sr'
96
+ String.Single: "", # class: 's1'
97
+ String.Symbol: "", # class: 'ss'
98
+
99
+
100
+ Generic: "", # class: 'g'
101
+ Generic.Deleted: "#ff4689", # class: 'gd',
102
+ Generic.Emph: "italic", # class: 'ge'
103
+ Generic.Error: "", # class: 'gr'
104
+ Generic.Heading: "", # class: 'gh'
105
+ Generic.Inserted: "#a6e22e", # class: 'gi'
106
+ Generic.Output: "#66d9ef", # class: 'go'
107
+ Generic.Prompt: "bold #ff4689", # class: 'gp'
108
+ Generic.Strong: "bold", # class: 'gs'
109
+ Generic.EmphStrong: "bold italic", # class: 'ges'
110
+ Generic.Subheading: "#959077", # class: 'gu'
111
+ Generic.Traceback: "", # class: 'gt'
112
+ }