@@ -183,6 +183,30 @@ class Difflib(ThemeSection):
183
183
reset : str = ANSIColors .RESET
184
184
185
185
186
+ @dataclass (frozen = True , kw_only = True )
187
+ class FancyCompleter (ThemeSection ):
188
+ # functions and methods
189
+ function : str = ANSIColors .BOLD_BLUE
190
+ builtin_function_or_method : str = ANSIColors .BOLD_BLUE
191
+ method : str = ANSIColors .BOLD_CYAN
192
+ method_wrapper : str = ANSIColors .BOLD_CYAN
193
+ wrapper_descriptor : str = ANSIColors .BOLD_CYAN
194
+ method_descriptor : str = ANSIColors .BOLD_CYAN
195
+
196
+ # numbers
197
+ int : str = ANSIColors .BOLD_YELLOW
198
+ float : str = ANSIColors .BOLD_YELLOW
199
+ complex : str = ANSIColors .BOLD_YELLOW
200
+ bool : str = ANSIColors .BOLD_YELLOW
201
+
202
+ # others
203
+ type : str = ANSIColors .BOLD_MAGENTA
204
+ module : str = ANSIColors .CYAN
205
+ NoneType : str = ANSIColors .GREY
206
+ bytes : str = ANSIColors .BOLD_GREEN
207
+ str : str = ANSIColors .BOLD_GREEN
208
+
209
+
186
210
@dataclass (frozen = True , kw_only = True )
187
211
class Syntax (ThemeSection ):
188
212
prompt : str = ANSIColors .BOLD_MAGENTA
@@ -219,30 +243,6 @@ class Unittest(ThemeSection):
219
243
reset : str = ANSIColors .RESET
220
244
221
245
222
- @dataclass (frozen = True , kw_only = True )
223
- class FancyCompleter (ThemeSection ):
224
- # functions and methods
225
- function : str = ANSIColors .BOLD_BLUE
226
- builtin_function_or_method : str = ANSIColors .BOLD_BLUE
227
- method : str = ANSIColors .BOLD_CYAN
228
- method_wrapper : str = ANSIColors .BOLD_CYAN
229
- wrapper_descriptor : str = ANSIColors .BOLD_CYAN
230
- method_descriptor : str = ANSIColors .BOLD_CYAN
231
-
232
- # numbers
233
- int : str = ANSIColors .BOLD_YELLOW
234
- float : str = ANSIColors .BOLD_YELLOW
235
- complex : str = ANSIColors .BOLD_YELLOW
236
- bool : str = ANSIColors .BOLD_YELLOW
237
-
238
- # others
239
- type : str = ANSIColors .BOLD_MAGENTA
240
- module : str = ANSIColors .CYAN
241
- NoneType : str = ANSIColors .GREY
242
- bytes : str = ANSIColors .BOLD_GREEN
243
- str : str = ANSIColors .BOLD_GREEN
244
-
245
-
246
246
@dataclass (frozen = True , kw_only = True )
247
247
class Theme :
248
248
"""A suite of themes for all sections of Python.
@@ -252,20 +252,20 @@ class Theme:
252
252
"""
253
253
argparse : Argparse = field (default_factory = Argparse )
254
254
difflib : Difflib = field (default_factory = Difflib )
255
+ fancycompleter : FancyCompleter = field (default_factory = FancyCompleter )
255
256
syntax : Syntax = field (default_factory = Syntax )
256
257
traceback : Traceback = field (default_factory = Traceback )
257
258
unittest : Unittest = field (default_factory = Unittest )
258
- fancycompleter : FancyCompleter = field (default_factory = FancyCompleter )
259
259
260
260
def copy_with (
261
261
self ,
262
262
* ,
263
263
argparse : Argparse | None = None ,
264
264
difflib : Difflib | None = None ,
265
+ fancycompleter : FancyCompleter | None = None ,
265
266
syntax : Syntax | None = None ,
266
267
traceback : Traceback | None = None ,
267
268
unittest : Unittest | None = None ,
268
- fancycompleter : FancyCompleter | None = None ,
269
269
) -> Self :
270
270
"""Return a new Theme based on this instance with some sections replaced.
271
271
@@ -275,10 +275,10 @@ def copy_with(
275
275
return type (self )(
276
276
argparse = argparse or self .argparse ,
277
277
difflib = difflib or self .difflib ,
278
+ fancycompleter = fancycompleter or self .fancycompleter ,
278
279
syntax = syntax or self .syntax ,
279
280
traceback = traceback or self .traceback ,
280
281
unittest = unittest or self .unittest ,
281
- fancycompleter = fancycompleter or self .fancycompleter ,
282
282
)
283
283
284
284
@classmethod
@@ -292,10 +292,10 @@ def no_colors(cls) -> Self:
292
292
return cls (
293
293
argparse = Argparse .no_colors (),
294
294
difflib = Difflib .no_colors (),
295
+ fancycompleter = FancyCompleter .no_colors (),
295
296
syntax = Syntax .no_colors (),
296
297
traceback = Traceback .no_colors (),
297
298
unittest = Unittest .no_colors (),
298
- fancycompleter = FancyCompleter .no_colors (),
299
299
)
300
300
301
301
0 commit comments