MCPcopy
hub / github.com/scrapy/scrapy / _print_commands

Function _print_commands

scrapy/cmdline.py:109–128  ·  view source on GitHub ↗
(settings: BaseSettings, inproject: bool)

Source from the content-addressed store, hash-verified

107
108
109def _print_commands(settings: BaseSettings, inproject: bool) -> None:
110 _print_header(settings, inproject)
111 print(
112 "Usage:\n",
113 " scrapy <command> [options] [args]\n",
114 "Available commands:\n",
115 )
116 cmds = _get_commands_dict(settings, inproject)
117 print(
118 "\n".join(
119 f" {cmdname:<13} {cmdclass.short_desc()}"
120 for cmdname, cmdclass in sorted(cmds.items())
121 )
122 )
123 if not inproject:
124 print(
125 "\n",
126 " [ more ] More commands available when run from project directory",
127 )
128 print("\n", 'Use "scrapy <command> -h" to see more info about a command')
129
130
131def _print_unknown_command_msg(

Callers 1

executeFunction · 0.85

Calls 5

_print_headerFunction · 0.85
_get_commands_dictFunction · 0.85
itemsMethod · 0.80
joinMethod · 0.45
short_descMethod · 0.45

Tested by

no test coverage detected