@@ -207,6 +207,8 @@ def iter_last(values: Iterable[T]) -> Iterable[Tuple[bool, T]]:
207
207
208
208
209
209
if __name__ == "__main__" : # pragma: no cover
210
+ from pip ._vendor .rich .panel import Panel
211
+
210
212
console = Console (
211
213
file = io .StringIO (),
212
214
force_terminal = True ,
@@ -227,47 +229,17 @@ def iter_last(values: Iterable[T]) -> Iterable[Tuple[bool, T]]:
227
229
c = Console (record = True )
228
230
c .print (test_card )
229
231
230
- print (f"rendered in { pre_cache_taken } ms (cold cache)" )
231
- print (f"rendered in { taken } ms (warm cache)" )
232
-
233
- from pip ._vendor .rich .panel import Panel
234
-
235
232
console = Console ()
236
-
237
- sponsor_message = Table .grid (padding = 1 )
238
- sponsor_message .add_column (style = "green" , justify = "right" )
239
- sponsor_message .add_column (no_wrap = True )
240
-
241
- sponsor_message .add_row (
242
- "Textualize" ,
243
- "[u blue link=https://github.com/textualize]https://github.com/textualize" ,
244
- )
245
- sponsor_message .add_row (
246
- "Twitter" ,
247
- "[u blue link=https://twitter.com/willmcgugan]https://twitter.com/willmcgugan" ,
248
- )
249
-
250
- intro_message = Text .from_markup (
251
- """\
252
- We hope you enjoy using Rich!
253
-
254
- Rich is maintained with [red]:heart:[/] by [link=https://www.textualize.io]Textualize.io[/]
255
-
256
- - Will McGugan"""
257
- )
258
-
259
- message = Table .grid (padding = 2 )
260
- message .add_column ()
261
- message .add_column (no_wrap = True )
262
- message .add_row (intro_message , sponsor_message )
263
-
233
+ console .print (f"[dim]rendered in [not dim]{ pre_cache_taken } ms[/] (cold cache)" )
234
+ console .print (f"[dim]rendered in [not dim]{ taken } ms[/] (warm cache)" )
235
+ console .print ()
264
236
console .print (
265
237
Panel .fit (
266
- message ,
267
- box = box . ROUNDED ,
268
- padding = ( 1 , 2 ),
269
- title = "[b red]Thanks for trying out Rich! " ,
270
- border_style = "bright_blue " ,
271
- ) ,
272
- justify = "center" ,
238
+ "[b magenta]Hope you enjoy using Rich![/] \n \n "
239
+ "Please consider sponsoring me if you get value from my work. \n \n "
240
+ "Even the price of a ☕ can brighten my day! \n \n "
241
+ "https://github.com/sponsors/willmcgugan " ,
242
+ border_style = "red " ,
243
+ title = "Help ensure Rich is maintained" ,
244
+ )
273
245
)
0 commit comments