MCPcopy Index your code
hub / github.com/httpie/cli / runner

Function runner

tests/utils/plugins_cli.py:211–224  ·  view source on GitHub ↗
(*args, cli_mode: bool = True)

Source from the content-addressed store, hash-verified

209 from httpie.plugins.registry import plugin_manager
210
211 def runner(*args, cli_mode: bool = True):
212 args = list(args)
213 if cli_mode:
214 args.insert(0, 'cli')
215 args.insert(cli_mode, 'plugins')
216
217 # Prevent installed plugins from showing up.
218 original_plugins = plugin_manager.copy()
219 clean_sys_path = set(sys.path).difference(site.getsitepackages())
220 with patch('sys.path', list(clean_sys_path)):
221 response = httpie(*args, env=interface.environment)
222 plugin_manager.clear()
223 plugin_manager.extend(original_plugins)
224 return response
225
226 return runner
227

Callers

nothing calls this directly

Calls 2

httpieFunction · 0.85
httpie_pluginsFunction · 0.85

Tested by

no test coverage detected