File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -558,8 +558,10 @@ def shufflish(x, pct=0.04):
558
558
def console_help (
559
559
libname :str ): # name of library for console script listing
560
560
"Show help for all console scripts from `libname`"
561
+ from fastcore .style import S
561
562
from pkg_resources import iter_entry_points as ep
562
563
for e in ep ('console_scripts' ):
563
- if e .module_name .startswith (libname + '.' ):
564
- nm = f' \033 [1m \033 [94m { e .name } \033 [0m'
564
+ if e .module_name == libname or e . module_name .startswith (libname + '.' ):
565
+ nm = S . bold . light_blue ( e .name )
565
566
print (f'{ nm :45} { e .load ().__doc__ } ' )
567
+
Original file line number Diff line number Diff line change 2356
2356
" def console_help(\n " ,
2357
2357
" libname:str): # name of library for console script listing\n " ,
2358
2358
" \" Show help for all console scripts from `libname`\"\n " ,
2359
+ " from fastcore.style import S\n " ,
2359
2360
" from pkg_resources import iter_entry_points as ep\n " ,
2360
2361
" for e in ep('console_scripts'): \n " ,
2361
- " if e.module_name.startswith(libname+'.'): \n " ,
2362
- " nm = f' \\ 033[1m \\ 033[94m{ e.name} \\ 033[0m' \n " ,
2363
- " print(f'{nm:45}{e.load().__doc__}')"
2362
+ " if e.module_name == libname or e.module_name .startswith(libname+'.'): \n " ,
2363
+ " nm = S.bold.light_blue( e.name) \n " ,
2364
+ " print(f'{nm:45}{e.load().__doc__}')\n "
2364
2365
]
2365
2366
},
2366
2367
{
You can’t perform that action at this time.
0 commit comments