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):
558558def console_help (
559559 libname :str ): # name of library for console script listing
560560 "Show help for all console scripts from `libname`"
561+ from fastcore .style import S
561562 from pkg_resources import iter_entry_points as ep
562563 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 )
565566 print (f'{ nm :45} { e .load ().__doc__ } ' )
567+
Original file line number Diff line number Diff line change 23572357 " def console_help(\n " ,
23582358 " libname:str): # name of library for console script listing\n " ,
23592359 " \" Show help for all console scripts from `libname`\"\n " ,
2360+ " from fastcore.style import S\n " ,
23602361 " from pkg_resources import iter_entry_points as ep\n " ,
23612362 " for e in ep('console_scripts'): \n " ,
2362- " if e.module_name.startswith(libname+'.'): \n " ,
2363- " nm = f' \\ 033[1m \\ 033[94m{ e.name} \\ 033[0m' \n " ,
2364- " print(f'{nm:45}{e.load().__doc__}')"
2363+ " if e.module_name == libname or e.module_name .startswith(libname+'.'): \n " ,
2364+ " nm = S.bold.light_blue( e.name) \n " ,
2365+ " print(f'{nm:45}{e.load().__doc__}')\n "
23652366 ]
23662367 },
23672368 {
You can’t perform that action at this time.
0 commit comments