MCPcopy
hub / github.com/scrapy/scrapy / process_options

Method process_options

scrapy/commands/__init__.py:181–196  ·  view source on GitHub ↗
(self, args: list[str], opts: argparse.Namespace)

Source from the content-addressed store, hash-verified

179 )
180
181 def process_options(self, args: list[str], opts: argparse.Namespace) -> None:
182 super().process_options(args, opts)
183 try:
184 opts.spargs = arglist_to_dict(opts.spargs)
185 except ValueError:
186 raise UsageError(
187 "Invalid -a value, use -a NAME=VALUE", print_help=False
188 ) from None
189 if opts.output or opts.overwrite_output:
190 assert self.settings is not None
191 feeds = feed_process_params_from_cli(
192 self.settings,
193 opts.output,
194 overwrite_output=opts.overwrite_output,
195 )
196 self.settings.set("FEEDS", feeds, priority="cmdline")
197
198
199class ScrapyHelpFormatter(argparse.HelpFormatter):

Callers

nothing calls this directly

Calls 5

arglist_to_dictFunction · 0.90
UsageErrorClass · 0.90
process_optionsMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected