MCPcopy
hub / github.com/httpie/cli / main

Function main

httpie/core.py:146–167  ·  view source on GitHub ↗

The main function. Pre-process args, handle some special types of invocations, and run the main program with error handling. Return exit status code.

(
    args: List[Union[str, bytes]] = sys.argv,
    env: Environment = Environment()
)

Source from the content-addressed store, hash-verified

144
145
146def main(
147 args: List[Union[str, bytes]] = sys.argv,
148 env: Environment = Environment()
149) -> ExitStatus:
150 """
151 The main function.
152
153 Pre-process args, handle some special types of invocations,
154 and run the main program with error handling.
155
156 Return exit status code.
157
158 """
159
160 from .cli.definition import parser
161
162 return raw_main(
163 parser=parser,
164 main_program=program,
165 args=args,
166 env=env
167 )
168
169
170def program(args: argparse.Namespace, env: Environment) -> ExitStatus:

Callers 3

mainFunction · 0.90
__main__.pyFile · 0.90
_spawn_posixFunction · 0.90

Calls 2

raw_mainFunction · 0.85
EnvironmentClass · 0.70

Tested by

no test coverage detected