MCPcopy
hub / github.com/scrapy/scrapy / check_valid_format

Function check_valid_format

scrapy/utils/conf.py:159–166  ·  view source on GitHub ↗
(output_format: str)

Source from the content-addressed store, hash-verified

157 ).keys()
158
159 def check_valid_format(output_format: str) -> None:
160 if output_format not in valid_output_formats:
161 raise UsageError(
162 f"Unrecognized output format '{output_format}'. "
163 f"Set a supported one ({tuple(valid_output_formats)}) "
164 "after a colon at the end of the output URI (i.e. -o/-O "
165 "<URI>:<FORMAT>) or as a file extension."
166 )
167
168 overwrite = False
169 if overwrite_output:

Callers 1

Calls 1

UsageErrorClass · 0.90

Tested by

no test coverage detected