MCPcopy Index your code
hub / github.com/fluentpython/example-code-2e / initial_report

Function initial_report

20-executors/getflags/flags2_common.py:36–49  ·  view source on GitHub ↗
(cc_list: list[str],
                   actual_req: int,
                   server_label: str)

Source from the content-addressed store, hash-verified

34
35
36def initial_report(cc_list: list[str],
37 actual_req: int,
38 server_label: str) -> None:
39 if len(cc_list) <= 10:
40 cc_msg = ', '.join(cc_list)
41 else:
42 cc_msg = f'from {cc_list[0]} to {cc_list[-1]}'
43 print(f'{server_label} site: {SERVERS[server_label]}')
44 plural = 's' if len(cc_list) != 1 else ''
45 print(f'Searching for {len(cc_list)} flag{plural}: {cc_msg}')
46 if actual_req == 1:
47 print('1 connection will be used.')
48 else:
49 print(f'{actual_req} concurrent connections will be used.')
50
51
52def final_report(cc_list: list[str],

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected