project_name
string
class_name
string
class_modifiers
string
class_implements
int64
class_extends
int64
function_name
string
function_body
string
cyclomatic_complexity
int64
NLOC
int64
num_parameter
int64
num_token
int64
num_variable
int64
start_line
int64
end_line
int64
function_index
int64
function_params
string
function_variable
string
function_return_type
string
function_body_line_type
string
function_num_functions
int64
function_num_lines
int64
outgoing_function_count
int64
outgoing_function_names
string
incoming_function_count
int64
incoming_function_names
string
lexical_representation
string
Sema4AI_actions
public
public
0
0
build_subprocess_kwargs
def build_subprocess_kwargs(cwd, env, **kwargs) -> dict:startupinfo = Noneif sys.platform == "win32":# We don't want to show the shell on windows!startupinfo = subprocess.STARTUPINFO()startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOWstartupinfo.wShowWindow = subprocess.SW_HIDEstartupinfo = startupinfoif cwd:kwargs...
4
13
3
72
1
16
30
16
cwd,env,**kwargs
['startupinfo']
dict
{"Assign": 7, "AugAssign": 1, "If": 3, "Return": 1}
1
15
1
["subprocess.STARTUPINFO"]
6
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server._actions_process_pool_py.ProcessHandle.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.act...
The function (build_subprocess_kwargs) defined within the public class called public.The function start at line 16 and ends at 30. It contains 13 lines of code and it has a cyclomatic complexity of 4. It takes 3 parameters, represented as [16.0] and does not return any value. It declare 1.0 function, It has 1.0 functio...
Sema4AI_actions
IRccWorkspace
public
1
1
workspace_id
def workspace_id(self) -> str:pass
1
2
1
8
0
46
47
46
self
[]
str
{}
0
2
0
[]
0
[]
The function (workspace_id) defined within the public class called IRccWorkspace, implement an interface, and it inherit another class.The function start at line 46 and ends at 47. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any valu...
Sema4AI_actions
IRccWorkspace
public
1
1
workspace_name
def workspace_name(self) -> str:pass
1
2
1
8
0
50
51
50
self
[]
str
{}
0
2
0
[]
0
[]
The function (workspace_name) defined within the public class called IRccWorkspace, implement an interface, and it inherit another class.The function start at line 50 and ends at 51. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any va...
Sema4AI_actions
IRccWorkspace
public
1
1
organization_name
def organization_name(self) -> str:pass
1
2
1
8
0
54
55
54
self
[]
str
{}
0
2
0
[]
0
[]
The function (organization_name) defined within the public class called IRccWorkspace, implement an interface, and it inherit another class.The function start at line 54 and ends at 55. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any...
Sema4AI_actions
RccWorkspace
public
0
1
__init__
def __init__(self, workspace_id: str, workspace_name: str, organization_name: str):self._workspace_id = workspace_idself._workspace_name = workspace_nameself._organization_name = organization_name
1
4
4
32
0
59
62
59
self,workspace_id,workspace_name,organization_name
[]
None
{"Assign": 3}
0
4
0
[]
6,243
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.AlertCollector_py.AlertCollector.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.ClusterAlertCollector_py.ClusterAlertCollec...
The function (__init__) defined within the public class called RccWorkspace, that inherit another class.The function start at line 59 and ends at 62. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [59.0] and does not return any value. It has 6243.0 functions c...
Sema4AI_actions
IRccWorkspace
public
1
1
workspace_id
def workspace_id(self) -> str:return self._workspace_id
1
2
1
11
0
65
66
65
self
[]
str
{}
0
2
0
[]
0
[]
The function (workspace_id) defined within the public class called IRccWorkspace, implement an interface, and it inherit another class.The function start at line 65 and ends at 66. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any valu...
Sema4AI_actions
IRccWorkspace
public
1
1
workspace_name
def workspace_name(self) -> str:return self._workspace_name
1
2
1
11
0
69
70
69
self
[]
str
{}
0
2
0
[]
0
[]
The function (workspace_name) defined within the public class called IRccWorkspace, implement an interface, and it inherit another class.The function start at line 69 and ends at 70. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any va...
Sema4AI_actions
IRccWorkspace
public
1
1
organization_name
def organization_name(self) -> str:return self._organization_name
1
2
1
11
0
73
74
73
self
[]
str
{}
0
2
0
[]
0
[]
The function (organization_name) defined within the public class called IRccWorkspace, implement an interface, and it inherit another class.The function start at line 73 and ends at 74. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any...
Sema4AI_actions
RccWorkspace
public
0
1
__init__
def __init__(self, success: bool, message: Optional[str] = None, result: Optional[T] = None):self.success = successself.message = messageself.result = result
1
6
4
42
0
100
105
100
self,workspace_id,workspace_name,organization_name
[]
None
{"Assign": 3}
0
4
0
[]
6,243
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.AlertCollector_py.AlertCollector.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.ClusterAlertCollector_py.ClusterAlertCollec...
The function (__init__) defined within the public class called RccWorkspace, that inherit another class.The function start at line 100 and ends at 105. It contains 6 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [100.0] and does not return any value. It has 6243.0 function...
Sema4AI_actions
ActionResult
public
0
1
as_dict
def as_dict(self) -> ActionResultDict:return {"success": self.success, "message": self.message, "result": self.result}
1
2
1
27
0
107
108
107
self
[]
ActionResultDict
{"Return": 1}
0
2
0
[]
44
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3511986_dart_archive_pub_dartlang.app.handlers.api.package_versions_py.PackageVersions.show", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3670790_opencivicdata_pupa.pupa.tests.importers.test_base_importer_py.test_...
The function (as_dict) defined within the public class called ActionResult, that inherit another class.The function start at line 107 and ends at 108. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It has 44.0 functions calli...
Sema4AI_actions
ActionResult
public
0
1
__str__
def __str__(self):return f"ActionResult(success={self.success!r}, message={self.message!r}, result={self.result!r})"
1
2
1
8
0
110
111
110
self
[]
Returns
{"Return": 1}
0
2
0
[]
83
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3675814_usyd_blockchain_vandal.src.evm_cfg_py.EVMBasicBlock.__str__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3675814_usyd_blockchain_vandal.src.tac_cfg_py.TACBasicBlock.__str__", "_.content.gdrive.MyDrive.Phd...
The function (__str__) defined within the public class called ActionResult, that inherit another class.The function start at line 110 and ends at 111. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It has 83.0 functions c...
Sema4AI_actions
RccWorkspace
public
0
1
__init__
def __init__(self,command_line: str,success: bool,message: Optional[str] = None,result: Optional[str] = None,):ActionResult.__init__(self, success, message, result)self.command_line = command_line
1
9
5
49
0
120
128
120
self,workspace_id,workspace_name,organization_name
[]
None
{"Assign": 3}
0
4
0
[]
6,243
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.AlertCollector_py.AlertCollector.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.ClusterAlertCollector_py.ClusterAlertCollec...
The function (__init__) defined within the public class called RccWorkspace, that inherit another class.The function start at line 120 and ends at 128. It contains 9 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [120.0] and does not return any value. It has 6243.0 function...
Sema4AI_actions
RccWorkspace
public
0
1
__init__
def __init__(self, rcc_location: str, sema4ai_home: str, endpoint: str) -> None:self.rcc_location = rcc_locationself.sema4ai_home = sema4ai_homeself.config_location = os.environ.get("S4_ACTION_SERVER_RCC_CONFIG_LOCATION", "")self.endpoint = endpointself._last_verified_account_info: Optional[AccountInfo] = None
1
8
4
58
0
136
143
136
self,workspace_id,workspace_name,organization_name
[]
None
{"Assign": 3}
0
4
0
[]
6,243
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.AlertCollector_py.AlertCollector.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.ClusterAlertCollector_py.ClusterAlertCollec...
The function (__init__) defined within the public class called RccWorkspace, that inherit another class.The function start at line 136 and ends at 143. It contains 8 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [136.0] and does not return any value. It has 6243.0 function...
Sema4AI_actions
Rcc
public
0
1
_run_rcc
def _run_rcc(self,args: List[str],timeout: float = 35,error_msg: str = "",cwd: Optional[str] = None,log_errors=True,stderr=_SENTINEL,hide_in_log: Optional[str] = None,) -> RCCActionResult:"""Returns an ActionResult where the result is the stdout of the executed command.:param log_errors:If false, errors won't be logged...
18
77
8
502
0
145
253
145
self,args,timeout,error_msg,cwd,log_errors,stderr,hide_in_log
[]
RCCActionResult
{"AnnAssign": 2, "Assign": 24, "Expr": 18, "If": 11, "Return": 5, "Try": 1}
36
109
36
["os.environ.copy", "env.pop", "env.pop", "env.pop", "build_subprocess_kwargs", "list2cmdline", "str", "msg.replace", "log.debug", "time.monotonic", "check_output", "e.stdout.decode", "e.stderr.decode", "msg.replace", "log.exception", "RCCActionResult", "additional_info.append", "additional_info.append", "additional_in...
0
[]
The function (_run_rcc) defined within the public class called Rcc, that inherit another class.The function start at line 145 and ends at 253. It contains 77 lines of code and it has a cyclomatic complexity of 18. It takes 8 parameters, represented as [145.0] and does not return any value. It declares 36.0 functions, a...
Sema4AI_actions
Rcc
public
0
1
_add_config_to_args
def _add_config_to_args(self, args: List[str]) -> List[str]:config_location = self.config_locationif config_location:args.append("--config")args.append(config_location)return args
2
6
2
39
0
255
260
255
self,args
[]
List[str]
{"Assign": 1, "Expr": 2, "If": 1, "Return": 1}
2
6
2
["args.append", "args.append"]
0
[]
The function (_add_config_to_args) defined within the public class called Rcc, that inherit another class.The function start at line 255 and ends at 260. It contains 6 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [255.0] and does not return any value. It declares 2.0 func...
Sema4AI_actions
Rcc
public
0
1
add_credentials
def add_credentials(self, credential: str) -> ActionResult:self._last_verified_account_info = Noneargs = ["config", "credentials"]endpoint = self.endpointif endpoint:args.append("--endpoint")args.append(endpoint)args = self._add_config_to_args(args)args.append("--account")args.append(ACCOUNT_NAME)args.append(credential...
2
12
2
80
0
262
276
262
self,credential
[]
ActionResult
{"Assign": 4, "Expr": 5, "If": 1, "Return": 1}
7
15
7
["args.append", "args.append", "self._add_config_to_args", "args.append", "args.append", "args.append", "self._run_rcc"]
0
[]
The function (add_credentials) defined within the public class called Rcc, that inherit another class.The function start at line 262 and ends at 276. It contains 12 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [262.0] and does not return any value. It declares 7.0 functio...
Sema4AI_actions
Rcc
public
0
1
credentials_valid
def credentials_valid(self) -> bool:account = self.get_valid_account_info()return account is not None
1
3
1
19
0
278
280
278
self
[]
bool
{"Assign": 1, "Return": 1}
1
3
1
["self.get_valid_account_info"]
0
[]
The function (credentials_valid) defined within the public class called Rcc, that inherit another class.The function start at line 278 and ends at 280. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, a...
Sema4AI_actions
Rcc
public
0
1
get_valid_account_info
def get_valid_account_info(self) -> Optional[AccountInfo]:self._last_verified_account_info = Noneargs = ["config","credentials","-j","--verified",# Note: it doesn't really filter in this case, so, filter it# manually afterwards.# "--account",# ACCOUNT_NAME,]endpoint = self.endpointif endpoint:args.append("--endpoint")a...
11
49
1
239
0
282
343
282
self
[]
Optional[AccountInfo]
{"Assign": 17, "Expr": 5, "For": 1, "If": 5, "Return": 4, "Try": 1}
19
62
19
["args.append", "args.append", "self._add_config_to_args", "self._run_rcc", "log.critical", "log.critical", "json.loads", "lower", "credential.get", "credential.get", "int", "credential.get", "isinstance", "str", "details.get", "details.get", "details.get", "AccountInfo", "log.exception"]
0
[]
The function (get_valid_account_info) defined within the public class called Rcc, that inherit another class.The function start at line 282 and ends at 343. It contains 49 lines of code and it has a cyclomatic complexity of 11. The function does not take any parameters and does not return any value. It declares 19.0 fu...
Sema4AI_actions
Rcc
public
0
1
_add_account_to_args
def _add_account_to_args(self, args: List[str]) -> Optional[ActionResult]:"""Adds the account to the args.Returns an error ActionResult if unable to get a valid account."""account_info = self._last_verified_account_infoif account_info is None:account_info = self.get_valid_account_info()if account_info is None:return Ac...
3
9
2
63
0
345
359
345
self,args
[]
Optional[ActionResult]
{"Assign": 2, "Expr": 3, "If": 2, "Return": 2}
4
15
4
["self.get_valid_account_info", "ActionResult", "args.append", "args.append"]
0
[]
The function (_add_account_to_args) defined within the public class called Rcc, that inherit another class.The function start at line 345 and ends at 359. It contains 9 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [345.0] and does not return any value. It declares 4.0 fun...
Sema4AI_actions
Rcc
public
0
1
cloud_authorize_token
def cloud_authorize_token(self, workspace_id, timeout=15, graceperiod=15) -> ActionResult[AuthorizeTokenDict]:args = ["cloud", "authorize"]args = self._add_config_to_args(args)args.append("--workspace")args.append(workspace_id)args.append("--minutes")args.append(f"{round(timeout)}")args.append("--graceperiod")args.appe...
5
32
4
186
0
361
401
361
self,workspace_id,timeout,graceperiod
[]
ActionResult[AuthorizeTokenDict]
{"Assign": 7, "Expr": 7, "If": 3, "Return": 5, "Try": 1}
17
41
17
["self._add_config_to_args", "args.append", "args.append", "args.append", "args.append", "round", "args.append", "args.append", "round", "self._add_account_to_args", "self._run_rcc", "ActionResult", "ActionResult", "json.loads", "log.exception", "ActionResult", "ActionResult"]
0
[]
The function (cloud_authorize_token) defined within the public class called Rcc, that inherit another class.The function start at line 361 and ends at 401. It contains 32 lines of code and it has a cyclomatic complexity of 5. It takes 4 parameters, represented as [361.0] and does not return any value. It declares 17.0 ...
Sema4AI_actions
Rcc
public
0
1
cloud_list_workspaces
def cloud_list_workspaces(self) -> ActionResult[List[IRccWorkspace]]:ret: List[IRccWorkspace] = []args = ["cloud", "workspace"]args = self._add_config_to_args(args)error_action_result = self._add_account_to_args(args)if error_action_result is not None:return error_action_resultresult = self._run_rcc(args)if not result....
8
42
1
205
0
403
449
403
self
[]
ActionResult[List[IRccWorkspace]]
{"AnnAssign": 1, "Assign": 7, "Expr": 3, "For": 1, "If": 5, "Return": 5, "Try": 1}
16
47
16
["self._add_config_to_args", "self._add_account_to_args", "self._run_rcc", "ActionResult", "ActionResult", "json.loads", "log.exception", "ActionResult", "workspace_info.get", "isinstance", "permissions.get", "log.info", "ret.append", "RccWorkspace", "workspace_info.get", "ActionResult"]
0
[]
The function (cloud_list_workspaces) defined within the public class called Rcc, that inherit another class.The function start at line 403 and ends at 449. It contains 42 lines of code and it has a cyclomatic complexity of 8. The function does not take any parameters and does not return any value. It declares 16.0 func...
Sema4AI_actions
public
public
0
0
_validate_collected_actions
def _validate_collected_actions(actions: list[IAction]):from sema4ai.actions._exceptions import ActionsCollectErrorfrom sema4ai.mcp._validate_prompt import _validate_promptfrom sema4ai.mcp._validate_resource import _validate_resourceerrors = []for action in actions:kind = (action.options and action.options.get("kind"))...
8
17
1
121
2
30
49
30
actions
['errors', 'kind']
None
{"Assign": 2, "Expr": 2, "For": 1, "If": 4}
10
20
10
["action.options.get", "errors.extend", "_validate_resource", "errors.extend", "_validate_prompt", "len", "ActionsCollectError", "ActionsCollectError", "len", "join"]
0
[]
The function (_validate_collected_actions) defined within the public class called public.The function start at line 30 and ends at 49. It contains 17 lines of code and it has a cyclomatic complexity of 8. The function does not take any parameters and does not return any value. It declares 10.0 functions, and It has 10...
Sema4AI_actions
public
public
0
0
tool
def tool(func: Callable) -> Callable:...
1
2
1
10
0
56
57
56
func
[]
Callable
{"Expr": 1}
0
2
0
[]
4
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3675202_galaxyproject_galaxy_lib.galaxy.tools.cwl.parser_py.to_cwl_workflow_object", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3720440_openstack_oslo_policy.oslo_policy.shell_py.main", "_.content.gdrive.MyDrive....
The function (tool) defined within the public class called public.The function start at line 56 and ends at 57. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It has 4.0 functions calling this function which are ["_.content.g...
Sema4AI_actions
public
public
0
0
tool
def tool(*,title: str | None = None,read_only_hint: bool = False,destructive_hint: bool = True,idempotent_hint: bool = False,open_world_hint: bool = True,) -> Callable:"""Decorator for tools which can be used by AI agents to perform actions.Args:title: A human-readable title for the tool.read_only_hint: If true, the to...
1
8
5
41
0
61
88
61
func
[]
Callable
{"Expr": 1}
0
2
0
[]
4
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3675202_galaxyproject_galaxy_lib.galaxy.tools.cwl.parser_py.to_cwl_workflow_object", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3720440_openstack_oslo_policy.oslo_policy.shell_py.main", "_.content.gdrive.MyDrive....
The function (tool) defined within the public class called public.The function start at line 61 and ends at 88. It contains 8 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [61.0] and does not return any value. It has 4.0 functions calling this function which are ["_.conten...
Sema4AI_actions
public
public
0
0
tool.decorator
def decorator(func, **kwargs):from sema4ai.actions import _hookstitle = kwargs.pop("title", None)if title is not None:if not isinstance(title, str):raise ValueError("Expected 'title' argument to be a str.")read_only_hint = kwargs.pop("read_only_hint", False)if not isinstance(read_only_hint, bool):raise ValueError("Expe...
8
34
2
187
0
138
183
138
null
[]
None
null
0
0
0
null
0
null
The function (tool.decorator) defined within the public class called public.The function start at line 138 and ends at 183. It contains 34 lines of code and it has a cyclomatic complexity of 8. It takes 2 parameters, represented as [138.0] and does not return any value..
Sema4AI_actions
public
public
0
0
tool
def tool(*args, **kwargs):"""Decorator for tools which can be used by AI agents to perform actions.Args:title: A human-readable title for the tool.read_only_hint: If true, the tool does not modify its environment (default: False).destructive_hint: If true, the tool may perform destructive updates to its environment (de...
3
5
2
45
5
91
188
91
func
['destructive_hint', 'idempotent_hint', 'title', 'read_only_hint', 'open_world_hint']
Callable
{"Expr": 1}
0
2
0
[]
4
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3675202_galaxyproject_galaxy_lib.galaxy.tools.cwl.parser_py.to_cwl_workflow_object", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3720440_openstack_oslo_policy.oslo_policy.shell_py.main", "_.content.gdrive.MyDrive....
The function (tool) defined within the public class called public.The function start at line 91 and ends at 188. It contains 5 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [91.0] and does not return any value. It has 4.0 functions calling this function which are ["_.conte...
Sema4AI_actions
public
public
0
0
resource
def resource(func: Callable) -> Callable:...
1
2
1
10
0
192
193
192
func
[]
Callable
{"Expr": 1}
0
2
0
[]
84
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3687273_internap_netman.netman.api.switch_api_py.SwitchApi.add_bond", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3687273_internap_netman.netman.api.switch_api_py.SwitchApi.add_bond_trunk_vlan", "_.content.gdrive....
The function (resource) defined within the public class called public.The function start at line 192 and ends at 193. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It has 84.0 functions calling this function which are ["_.co...
Sema4AI_actions
public
public
0
0
resource
def resource(uri: str = "",*,mime_type: str | None = None,size: int | None = None,) -> Callable:...
1
7
3
31
0
197
203
197
func
[]
Callable
{"Expr": 1}
0
2
0
[]
84
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3687273_internap_netman.netman.api.switch_api_py.SwitchApi.add_bond", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3687273_internap_netman.netman.api.switch_api_py.SwitchApi.add_bond_trunk_vlan", "_.content.gdrive....
The function (resource) defined within the public class called public.The function start at line 197 and ends at 203. It contains 7 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [197.0] and does not return any value. It has 84.0 functions calling this function which are ["...
Sema4AI_actions
public
public
0
0
resource.decorator
def decorator(func, *args, **kwargs):import inspectfrom sema4ai.actions import _hooksif args:uri = args[0]if not isinstance(uri, str):raise ValueError("Expected 'uri' argument to be a str.")if len(args) > 1:raise ValueError("Expected only one argument (uri). Found: " + ", ".join(args))else:uri = kwargs.pop("uri", "")if...
8
35
3
177
0
255
300
255
null
[]
None
null
0
0
0
null
0
null
The function (resource.decorator) defined within the public class called public.The function start at line 255 and ends at 300. It contains 35 lines of code and it has a cyclomatic complexity of 8. It takes 3 parameters, represented as [255.0] and does not return any value..
Sema4AI_actions
public
public
0
0
resource
def resource(*args, **kwargs) -> Callable:"""Decorator for resources which provide data to the LLM.Resources may be simple or templates.Templates are resources with `{placeholder}` indications in the uri, according to RFC 6570.Args:uri: The URI of the resource (may be a template or a simple resource).If not provided, a...
3
5
2
57
4
206
305
206
func
['size', 'mime_type', 'signature', 'uri']
Callable
{"Expr": 1}
0
2
0
[]
84
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3687273_internap_netman.netman.api.switch_api_py.SwitchApi.add_bond", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3687273_internap_netman.netman.api.switch_api_py.SwitchApi.add_bond_trunk_vlan", "_.content.gdrive....
The function (resource) defined within the public class called public.The function start at line 206 and ends at 305. It contains 5 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [206.0] and does not return any value. It has 84.0 functions calling this function which are ["...
Sema4AI_actions
public
public
0
0
prompt
def prompt(func: Callable) -> Callable:...
1
2
1
10
0
309
310
309
func
[]
Callable
{"Expr": 1}
0
2
0
[]
32
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3670790_opencivicdata_pupa.pupa.cli.commands.init_py.Command.handle", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3689772_zalando_stups_senza.senza.templates.bgapp_py.gather_user_variables", "_.content.gdrive.MyDr...
The function (prompt) defined within the public class called public.The function start at line 309 and ends at 310. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It has 32.0 functions calling this function which are ["_.cont...
Sema4AI_actions
public
public
0
0
prompt
def prompt() -> Callable:...
1
2
0
7
0
314
315
314
func
[]
Callable
{"Expr": 1}
0
2
0
[]
32
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3670790_opencivicdata_pupa.pupa.cli.commands.init_py.Command.handle", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3689772_zalando_stups_senza.senza.templates.bgapp_py.gather_user_variables", "_.content.gdrive.MyDr...
The function (prompt) defined within the public class called public.The function start at line 314 and ends at 315. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It has 32.0 functions calling this function which are ["_.cont...
Sema4AI_actions
public
public
0
0
prompt.decorator
def decorator(func):from sema4ai.actions import _hooks_hooks.on_action_func_found(func,options={"kind": "prompt",},)return func
1
9
1
29
0
351
361
351
null
[]
None
null
0
0
0
null
0
null
The function (prompt.decorator) defined within the public class called public.The function start at line 351 and ends at 361. It contains 9 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
Sema4AI_actions
public
public
0
0
prompt
def prompt(*args, **kwargs):"""Decorator for functions that generate prompts for the LLM.No arguments are accepted by this decorator.The description of the prompt is gotten from the docstring.Note that each argument in the function signature is automatically addedas a required argument in the prompt (the argument descr...
3
5
2
45
0
318
366
318
func
[]
Callable
{"Expr": 1}
0
2
0
[]
32
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3670790_opencivicdata_pupa.pupa.cli.commands.init_py.Command.handle", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3689772_zalando_stups_senza.senza.templates.bgapp_py.gather_user_variables", "_.content.gdrive.MyDr...
The function (prompt) defined within the public class called public.The function start at line 318 and ends at 366. It contains 5 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [318.0] and does not return any value. It has 32.0 functions calling this function which are ["_....
Sema4AI_actions
public
public
0
0
_is_valid_type
def _is_valid_type(t: Any) -> bool:from types import NoneType, UnionTypeif t in (str, int, float, bool, inspect.Parameter.empty, NoneType):return Trueif get_origin(t) is UnionType:return all(_is_valid_type(arg) for arg in get_args(t))return False
4
7
1
63
0
7
14
7
t
[]
bool
{"If": 2, "Return": 3}
4
8
4
["get_origin", "all", "_is_valid_type", "get_args"]
2
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.mcp.src.sema4ai.mcp._validate_prompt_py._is_valid_type", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.mcp.src.sema4ai.mcp._validate_prompt_py._validate_prompt"]
The function (_is_valid_type) defined within the public class called public.The function start at line 7 and ends at 14. It contains 7 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters and does not return any value. It declares 4.0 functions, It has 4.0 functions called in...
Sema4AI_actions
public
public
0
0
_validate_prompt.add_file_info
def add_file_info(msg: str) -> str:return f"{msg}\nFile: {action.filename}:{action.lineno}: in {action.name}"
1
2
1
12
0
21
22
21
null
[]
None
null
0
0
0
null
0
null
The function (_validate_prompt.add_file_info) defined within the public class called public.The function start at line 21 and ends at 22. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
Sema4AI_actions
public
public
0
0
_validate_prompt
def _validate_prompt(action: IAction) -> list[str]:"""Validate that prompt parameters use basic types (str, int, float, bool)."""errors: list[str] = []def add_file_info(msg: str) -> str:return f"{msg}\nFile: {action.filename}:{action.lineno}: in {action.name}"signature = inspect.signature(action.method)params = signatu...
6
20
1
111
5
17
48
17
action
['managed_params', 'signature', 'params', 'msg', 'param_type']
list[str]
{"AnnAssign": 2, "Assign": 5, "Expr": 2, "For": 1, "If": 4, "Return": 2}
5
32
5
["inspect.signature", "params.items", "_is_valid_type", "errors.append", "add_file_info"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.mcp.src.sema4ai.mcp.__init___py._validate_collected_actions"]
The function (_validate_prompt) defined within the public class called public.The function start at line 17 and ends at 48. It contains 20 lines of code and it has a cyclomatic complexity of 6. The function does not take any parameters and does not return any value. It declares 5.0 functions, It has 5.0 functions calle...
Sema4AI_actions
public
public
0
0
_resource_template_matches
def _resource_template_matches(uri_template: str, uri: str) -> dict[str, Any] | None:"""Check if URI matches template and extract parameters."""# Same logic as https://github.com/modelcontextprotocol/python-sdk/blob/v1.9.4/src/mcp/server/fastmcp/resources/templates.py#L54# Convert template to regex patternpattern = uri...
2
6
2
60
2
8
18
8
uri_template,uri
['pattern', 'match']
dict[str, Any] | None
{"Assign": 2, "Expr": 1, "If": 1, "Return": 2}
4
11
4
["replace", "uri_template.replace", "re.match", "match.groupdict"]
0
[]
The function (_resource_template_matches) defined within the public class called public.The function start at line 8 and ends at 18. It contains 6 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [8.0] and does not return any value. It declares 4.0 functions, and It has 4.0 ...
Sema4AI_actions
public
public
0
0
_validate_resource.add_file_info
def add_file_info(msg: str) -> str:return f"{msg}\nFile: {action.filename}:{action.lineno}: in {action.name}"
1
2
1
12
0
25
26
25
null
[]
None
null
0
0
0
null
0
null
The function (_validate_resource.add_file_info) defined within the public class called public.The function start at line 25 and ends at 26. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
Sema4AI_actions
public
public
0
0
_validate_resource
def _validate_resource(action: IAction) -> list[str]:# Resource may be regular or template resources depending on the uri.# If the URI follows the RFC 6570 template syntax, it's a template resource.def add_file_info(msg: str) -> str:return f"{msg}\nFile: {action.filename}:{action.lineno}: in {action.name}"errors = []op...
14
43
1
256
11
21
84
21
action
['use_name', 'has_uri_params', 'errors', 'signature', 'managed_params', 'has_func_params', 'msg', 'params', 'options', 'uri', 'param_type']
list[str]
{"AnnAssign": 3, "Assign": 12, "Expr": 4, "For": 1, "If": 8, "Return": 4}
17
64
17
["errors.append", "add_file_info", "options.get", "errors.append", "add_file_info", "inspect.signature", "bool", "set", "re.findall", "params.keys", "sorted", "sorted", "errors.append", "add_file_info", "params.items", "errors.append", "add_file_info"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.mcp.src.sema4ai.mcp.__init___py._validate_collected_actions"]
The function (_validate_resource) defined within the public class called public.The function start at line 21 and ends at 84. It contains 43 lines of code and it has a cyclomatic complexity of 14. The function does not take any parameters and does not return any value. It declares 17.0 functions, It has 17.0 functions ...
Sema4AI_actions
public
public
0
0
test_mcp_tool_run
def test_mcp_tool_run(datadir, data_regression):from devutils.fixtures import sema4ai_actions_runresult = sema4ai_actions_run(["run","-a","create_ticket","--console-colors=plain","--","--title","my ticket title","--description","my ticket description",],returncode=0,cwd=str(datadir),)output = result.stdout.decode("utf-...
1
21
2
69
2
1
22
1
datadir,data_regression
['result', 'output']
None
{"Assign": 2}
3
22
3
["sema4ai_actions_run", "str", "result.stdout.decode"]
0
[]
The function (test_mcp_tool_run) defined within the public class called public.The function start at line 1 and ends at 22. It contains 21 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [1.0] and does not return any value. It declares 3.0 functions, and It has 3.0 function...
Sema4AI_actions
public
public
0
0
test_mcp_prompt_run
def test_mcp_prompt_run(datadir, data_regression):from devutils.fixtures import sema4ai_actions_runresult = sema4ai_actions_run(["run","-a","generate_ticket_summary","--console-colors=plain","--","--ticket_id","123",],returncode=0,cwd=str(datadir),)output = result.stdout.decode("utf-8")assert ("generate_ticket_summary ...
1
19
2
65
2
25
44
25
datadir,data_regression
['result', 'output']
None
{"Assign": 2}
3
20
3
["sema4ai_actions_run", "str", "result.stdout.decode"]
0
[]
The function (test_mcp_prompt_run) defined within the public class called public.The function start at line 25 and ends at 44. It contains 19 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [25.0] and does not return any value. It declares 3.0 functions, and It has 3.0 func...
Sema4AI_actions
public
public
0
0
test_mcp_resource_run
def test_mcp_resource_run(datadir, data_regression):from devutils.fixtures import sema4ai_actions_runresult = sema4ai_actions_run(["run","-a","get_ticket_details","--console-colors=plain","--","--ticket_id","123",],returncode=0,cwd=str(datadir),)output = result.stdout.decode("utf-8")assert ("get_ticket_details status: ...
1
19
2
65
2
47
66
47
datadir,data_regression
['result', 'output']
None
{"Assign": 2}
3
20
3
["sema4ai_actions_run", "str", "result.stdout.decode"]
0
[]
The function (test_mcp_resource_run) defined within the public class called public.The function start at line 47 and ends at 66. It contains 19 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [47.0] and does not return any value. It declares 3.0 functions, and It has 3.0 fu...
Sema4AI_actions
public
public
0
0
test_collect_metadata
def test_collect_metadata(datadir, data_regression):import jsonfrom devutils.fixtures import sema4ai_actions_runresult = sema4ai_actions_run(["metadata","--skip-lint",],returncode=0,cwd=str(datadir),)output = result.stdout.decode("utf-8")metadata = json.loads(output)use_file_basename(metadata)data_regression.check(meta...
1
15
2
66
3
69
86
69
datadir,data_regression
['result', 'metadata', 'output']
None
{"Assign": 3, "Expr": 2}
6
18
6
["sema4ai_actions_run", "str", "result.stdout.decode", "json.loads", "use_file_basename", "data_regression.check"]
0
[]
The function (test_collect_metadata) defined within the public class called public.The function start at line 69 and ends at 86. It contains 15 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [69.0] and does not return any value. It declares 6.0 functions, and It has 6.0 fu...
Sema4AI_actions
public
public
0
0
use_file_basename
def use_file_basename(obj):import os.pathif isinstance(obj, dict):for key, value in obj.items():if key == "file" and isinstance(value, str):obj[key] = os.path.basename(value)else:use_file_basename(value)elif isinstance(obj, list):for item in obj:use_file_basename(item)
7
11
1
76
0
89
100
89
obj
[]
None
{"Assign": 1, "Expr": 2, "For": 2, "If": 3}
7
12
7
["isinstance", "obj.items", "isinstance", "os.path.basename", "use_file_basename", "isinstance", "use_file_basename"]
2
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.mcp.tests.mcp_tests.test_mcp_py.test_collect_metadata", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.mcp.tests.mcp_tests.test_mcp_py.use_file_basename"]
The function (use_file_basename) defined within the public class called public.The function start at line 89 and ends at 100. It contains 11 lines of code and it has a cyclomatic complexity of 7. The function does not take any parameters and does not return any value. It declares 7.0 functions, It has 7.0 functions cal...
Sema4AI_actions
public
public
0
0
test_errors
def test_errors(datadir):from devutils.fixtures import sema4ai_actions_runresult = sema4ai_actions_run(["metadata","--skip-lint",],cwd=str(datadir),returncode="error",)errors = result.stderr.decode("utf-8")output = result.stdout.decode("utf-8")assert ("When collecting @resource, the parameters in the uri (found: ['foo'...
1
27
1
90
3
1
28
1
datadir
['result', 'errors', 'output']
None
{"Assign": 3}
4
28
4
["sema4ai_actions_run", "str", "result.stderr.decode", "result.stdout.decode"]
0
[]
The function (test_errors) defined within the public class called public.The function start at line 1 and ends at 28. It contains 27 lines of code and it has a cyclomatic complexity of 1. It take 1 parameter, represented as [1.0] and does not return any value. It declares 4.0 functions, and It has 4.0 functions called...
Sema4AI_actions
public
public
0
0
_generate_ticket_id
def _generate_ticket_id() -> str:"""Generate a unique ticket ID."""return f"TICKET-{uuid.uuid4().hex[:8].upper()}"
1
2
0
10
0
36
38
36
[]
str
{"Expr": 1, "Return": 1}
2
3
2
["upper", "uuid.uuid4"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.mcp.tests.mcp_tests.test_mcp.sample_mcp_action_py.create_ticket"]
The function (_generate_ticket_id) defined within the public class called public.The function start at line 36 and ends at 38. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2.0 functions, It has 2.0 functions cal...
Sema4AI_actions
public
public
0
0
create_ticket
def create_ticket(title: str, description: str, priority: str = "medium") -> Ticket:"""Create a new ticket in the system.Args:title: The title of the ticketdescription: Detailed description of the ticketpriority: Priority level (low, medium, high)Returns:Dictionary containing the created ticket information"""ticket_id ...
1
13
3
76
1
43
66
43
title,description,priority
['ticket_id']
Ticket
{"AnnAssign": 1, "Assign": 2, "Expr": 1, "Return": 1}
5
24
5
["_generate_ticket_id", "Ticket", "isoformat", "datetime.utcnow", "tool"]
2
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3695233_trigger_trigger.tests.acceptance.data.settings_py.create_cm_ticket", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95087271_open_schools_open_schools_platform.open_schools_platform.ticket_management.tickets....
The function (create_ticket) defined within the public class called public.The function start at line 43 and ends at 66. It contains 13 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [43.0] and does not return any value. It declares 5.0 functions, It has 5.0 functions calle...
Sema4AI_actions
public
public
0
0
get_ticket_details
def get_ticket_details(ticket_id: str) -> Ticket:"""Get detailed information about a specific ticket.Args:ticket_id: The ID of the ticket to retrieveReturns:Dictionary containing the ticket details"""if ticket_id not in TICKETS:raise ValueError(f"Ticket {ticket_id} not found. Available tickets: {TICKETS.keys()}")return...
2
6
1
27
0
71
85
71
ticket_id
[]
Ticket
{"Expr": 1, "If": 1, "Return": 1}
3
15
3
["ValueError", "TICKETS.keys", "resource"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.mcp.tests.mcp_tests.test_mcp.sample_mcp_action_py.generate_ticket_summary"]
The function (get_ticket_details) defined within the public class called public.The function start at line 71 and ends at 85. It contains 6 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 3.0 functions, It has 3.0 functions call...
Sema4AI_actions
public
public
0
0
get_ticket_status
def get_ticket_status(ticket_id: str) -> str:"""Get the status of a ticket.Args:ticket_id: The ID of the ticket to retrieveReturns:The status of the ticket"""return TICKETS[ticket_id].status
1
2
1
17
0
89
99
89
ticket_id
[]
str
{"Expr": 1, "Return": 1}
0
11
0
[]
0
[]
The function (get_ticket_status) defined within the public class called public.The function start at line 89 and ends at 99. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
Sema4AI_actions
public
public
0
0
get_number_of_tickets
def get_number_of_tickets() -> int:"""Get the number of tickets in the system."""return len(TICKETS)
1
2
0
12
0
103
107
103
[]
int
{"Expr": 1, "Return": 1}
1
5
1
["len"]
0
[]
The function (get_number_of_tickets) defined within the public class called public.The function start at line 103 and ends at 107. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, and It has 1.0 functi...
Sema4AI_actions
public
public
0
0
generate_ticket_summary
def generate_ticket_summary(ticket_id: str) -> str:"""Generate a human-readable summary of a ticket.Args:ticket_id: The ID of the ticket to generate a summary forReturns:A formatted string containing the ticket summary"""ticket_data = get_ticket_details(ticket_id)return f"""Please provide a concise summary of the follo...
1
2
1
19
1
111
136
111
ticket_id
['ticket_data']
str
{"Assign": 1, "Expr": 1, "Return": 1}
1
26
1
["get_ticket_details"]
0
[]
The function (generate_ticket_summary) defined within the public class called public.The function start at line 111 and ends at 136. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, and It has 1.0 func...
Sema4AI_actions
public
public
0
0
find_next_ticket_to_work_on
def find_next_ticket_to_work_on(description: str | None = None) -> str:"""Generate a human-readable summary of a ticket.Args:description: The description of the ticket to find nextsteps for. If not provided, the next ticket will befound based on the current priorities.Returns:A formatted string containing the ticket su...
2
5
1
24
0
140
156
140
description
[]
str
{"Expr": 1, "If": 1, "Return": 2}
0
17
0
[]
0
[]
The function (find_next_ticket_to_work_on) defined within the public class called public.The function start at line 140 and ends at 156. It contains 5 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value..
Sema4AI_actions
public
public
0
0
update_ticket_status
def update_ticket_status(ticket_id: str, new_status: str) -> Ticket:"""Update the status of an existing ticket.Args:ticket_id: The ID of the ticket to updatenew_status: The new status to set (e.g., 'open', 'in_progress', 'closed')Returns:The updated ticket informationRaises:ValueError: If the ticket is not found"""if t...
2
9
2
45
1
162
184
162
ticket_id,new_status
['ticket']
Ticket
{"Assign": 3, "Expr": 1, "If": 1, "Return": 1}
3
23
3
["ValueError", "TICKETS.keys", "tool"]
0
[]
The function (update_ticket_status) defined within the public class called public.The function start at line 162 and ends at 184. It contains 9 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [162.0] and does not return any value. It declares 3.0 functions, and It has 3.0 f...
Sema4AI_actions
public
public
0
0
get_foo
def get_foo() -> str:return "foo"
1
2
0
8
0
8
9
8
[]
str
{"Return": 1}
1
2
1
["resource"]
0
[]
The function (get_foo) defined within the public class called public.The function start at line 8 and ends at 9. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, and It has 1.0 function called inside w...
Sema4AI_actions
public
public
0
0
get_foo2
def get_foo2(foo: list[str]) -> str:return str(foo)
1
2
1
17
0
14
15
14
foo
[]
str
{"Return": 1}
2
2
2
["str", "resource"]
0
[]
The function (get_foo2) defined within the public class called public.The function start at line 14 and ends at 15. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2.0 functions, and It has 2.0 functions called in...
Sema4AI_actions
public
public
0
0
get_foo3
def get_foo3(foo: str, untyped, secret: Secret) -> str:return foo
1
2
3
17
0
20
21
20
foo,untyped,secret
[]
str
{"Return": 1}
1
2
1
["resource"]
0
[]
The function (get_foo3) defined within the public class called public.The function start at line 20 and ends at 21. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [20.0] and does not return any value. It declare 1.0 function, and It has 1.0 function called in...
Sema4AI_actions
public
public
0
0
my_prompt
def my_prompt(text: str) -> str:return text
1
2
1
11
0
26
27
26
text
[]
str
{"Return": 1}
0
2
0
[]
0
[]
The function (my_prompt) defined within the public class called public.The function start at line 26 and ends at 27. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
Sema4AI_actions
public
public
0
0
my_prompt2
def my_prompt2(text: list[str]) -> str:return "prompt result"
1
2
1
14
0
32
33
32
text
[]
str
{"Return": 1}
0
2
0
[]
0
[]
The function (my_prompt2) defined within the public class called public.The function start at line 32 and ends at 33. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
Sema4AI_actions
_SSLContextFactory
protected
0
0
__init__
def __init__(self, config: ProfileType | None = None) -> None:self.config = config or {}
2
2
2
23
0
25
26
25
self,config
[]
None
{"Assign": 1}
0
2
0
[]
6,243
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.AlertCollector_py.AlertCollector.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.ClusterAlertCollector_py.ClusterAlertCollec...
The function (__init__) defined within the protected class called _SSLContextFactory.The function start at line 25 and ends at 26. It contains 2 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [25.0] and does not return any value. It has 6243.0 functions calling this functio...
Sema4AI_actions
_SSLContextFactory
protected
0
0
build_ssl_context
def build_ssl_context(self,protocol: int | None,enable_legacy_server_connect: bool | None = None,) -> ssl.SSLContext:import truststoreprotocol = ssl.PROTOCOL_TLS_CLIENT if protocol is None else protocolssl_context = truststore.SSLContext(protocol)self._configure_ssl_verification(ssl_context)if enable_legacy_server_conn...
3
12
3
62
0
28
43
28
self,protocol,enable_legacy_server_connect
[]
ssl.SSLContext
{"Assign": 2, "Expr": 2, "If": 1, "Return": 1}
3
16
3
["truststore.SSLContext", "self._configure_ssl_verification", "self._configure_tls_renegociation"]
2
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.sema4ai_http_helper.src.sema4ai_http.__init___py._NetworkConfig.get_ssl_context", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.sema4ai_http_helper.src.sema4ai_http....
The function (build_ssl_context) defined within the protected class called _SSLContextFactory.The function start at line 28 and ends at 43. It contains 12 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [28.0] and does not return any value. It declares 3.0 functions, It has ...
Sema4AI_actions
_SSLContextFactory
protected
0
0
_configure_ssl_verification
def _configure_ssl_verification(self, ssl_context: ssl.SSLContext) -> None:disable_ssl = self.config.get("disable-ssl", False)ssl_context.verify_mode = ssl.CERT_NONE if disable_ssl else ssl.CERT_REQUIRED
2
3
2
38
0
45
47
45
self,ssl_context
[]
None
{"Assign": 2}
1
3
1
["self.config.get"]
0
[]
The function (_configure_ssl_verification) defined within the protected class called _SSLContextFactory.The function start at line 45 and ends at 47. It contains 3 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [45.0] and does not return any value. It declare 1.0 function, ...
Sema4AI_actions
_SSLContextFactory
protected
0
0
_configure_tls_renegociation
def _configure_tls_renegociation(self, ssl_context: ssl.SSLContext) -> None:if sys.version_info < (3, 12):_SSL_LEGACY_SERVER_CONNECT = 0x4else:_SSL_LEGACY_SERVER_CONNECT = ssl.OP_LEGACY_SERVER_CONNECTssl_context.options |= _SSL_LEGACY_SERVER_CONNECT
2
6
2
39
0
49
54
49
self,ssl_context
[]
None
{"Assign": 2, "AugAssign": 1, "If": 1}
0
6
0
[]
0
[]
The function (_configure_tls_renegociation) defined within the protected class called _SSLContextFactory.The function start at line 49 and ends at 54. It contains 6 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [49.0] and does not return any value..
Sema4AI_actions
_SSLContextFactory
protected
0
0
__init__
def __init__(self) -> None:self.connection_pool = self._build_connection_pool()
1
2
1
16
0
58
59
58
self,config
[]
None
{"Assign": 1}
0
2
0
[]
6,243
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.AlertCollector_py.AlertCollector.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.ClusterAlertCollector_py.ClusterAlertCollec...
The function (__init__) defined within the protected class called _SSLContextFactory.The function start at line 58 and ends at 59. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It has 6243.0 functions calling this function w...
Sema4AI_actions
_NetworkConfig
protected
0
0
profile_config
def profile_config(self) -> "ProfileType":config_file = self._get_network_settings_path()if not config_file.exists():return {}import yamltry:config_content = config_file.read_text()except Exception as e:_DEFAULT_LOGGER.error(f"Failed to read configuration file {config_file}: {e}")return {}try:config = typing.cast(Netwo...
8
34
1
168
0
62
104
62
self
[]
'ProfileType'
{"Assign": 5, "Expr": 5, "For": 1, "If": 4, "Return": 6, "Try": 2}
15
43
15
["self._get_network_settings_path", "config_file.exists", "config_file.read_text", "_DEFAULT_LOGGER.error", "typing.cast", "yaml.safe_load", "_DEFAULT_LOGGER.error", "isinstance", "_DEFAULT_LOGGER.error", "config.get", "config.get", "isinstance", "_DEFAULT_LOGGER.warning", "profile.get", "_DEFAULT_LOGGER.error"]
0
[]
The function (profile_config) defined within the protected class called _NetworkConfig.The function start at line 62 and ends at 104. It contains 34 lines of code and it has a cyclomatic complexity of 8. The function does not take any parameters and does not return any value. It declares 15.0 functions, and It has 15....
Sema4AI_actions
_NetworkConfig
protected
0
0
_get_network_settings_path
def _get_network_settings_path() -> Path:if sys.platform == "win32":localappdata = os.environ.get("LOCALAPPDATA")if not localappdata:raise RuntimeError("Error. LOCALAPPDATA not defined in environment!")sema4_home = Path(localappdata) / "sema4ai"else:# Linux/Macsema4_home = Path("~/.sema4ai").expanduser()return sema4_ho...
3
9
0
56
0
107
117
107
[]
Path
{"Assign": 3, "If": 2, "Return": 1}
5
11
5
["os.environ.get", "RuntimeError", "Path", "expanduser", "Path"]
0
[]
The function (_get_network_settings_path) defined within the protected class called _NetworkConfig.The function start at line 107 and ends at 117. It contains 9 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value. It declares 5.0 functions, and ...
Sema4AI_actions
_NetworkConfig
protected
0
0
get_ssl_context
def get_ssl_context(self) -> ssl.SSLContext:return _SSLContextFactory(self.profile_config).build_ssl_context(ssl.PROTOCOL_TLS_CLIENT)
1
4
1
23
0
119
122
119
self
[]
ssl.SSLContext
{"Return": 1}
2
4
2
["build_ssl_context", "_SSLContextFactory"]
0
[]
The function (get_ssl_context) defined within the protected class called _NetworkConfig.The function start at line 119 and ends at 122. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2.0 functions, and It has 2.0...
Sema4AI_actions
_NetworkConfig
protected
0
0
_build_connection_pool
def _build_connection_pool(self) -> urllib3.PoolManager | urllib3.ProxyManager:ssl_context = self.get_ssl_context()connection_pool = Noneif "proxy-settings" in self.profile_config:proxy_settings = self.profile_config["proxy-settings"]proxy_url = proxy_settings.get("https-proxy") or proxy_settings.get("http-proxy")if pr...
5
16
1
94
0
125
145
125
self
[]
urllib3.PoolManager | urllib3.ProxyManager
{"Assign": 6, "If": 3, "Return": 1}
5
21
5
["self.get_ssl_context", "proxy_settings.get", "proxy_settings.get", "urllib3.ProxyManager", "urllib3.PoolManager"]
0
[]
The function (_build_connection_pool) defined within the protected class called _NetworkConfig.The function start at line 125 and ends at 145. It contains 16 lines of code and it has a cyclomatic complexity of 5. The function does not take any parameters and does not return any value. It declares 5.0 functions, and It...
Sema4AI_actions
public
public
0
0
_get_connection_manager
def _get_connection_manager() -> urllib3.PoolManager | urllib3.ProxyManager:return _NetworkConfig().connection_pool
1
2
0
18
0
149
150
149
[]
urllib3.PoolManager | urllib3.ProxyManager
{"Return": 1}
1
2
1
["_NetworkConfig"]
6
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.sema4ai_http_helper.src.sema4ai_http.__init___py.delete", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.sema4ai_http_helper.src.sema4ai_http.__init___py.download_wit...
The function (_get_connection_manager) defined within the public class called public.The function start at line 149 and ends at 150. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, It has 1.0 function ...
Sema4AI_actions
_SSLContextFactory
protected
0
0
build_ssl_context
def build_ssl_context(protocol: int | None = None, *, enable_legacy_server_connect: bool | None = None) -> "ssl.SSLContext":return _SSLContextFactory().build_ssl_context(protocol, enable_legacy_server_connect)
1
6
2
34
0
153
158
153
self,protocol,enable_legacy_server_connect
[]
ssl.SSLContext
{"Assign": 2, "Expr": 2, "If": 1, "Return": 1}
3
16
3
["truststore.SSLContext", "self._configure_ssl_verification", "self._configure_tls_renegociation"]
2
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.sema4ai_http_helper.src.sema4ai_http.__init___py._NetworkConfig.get_ssl_context", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.sema4ai_http_helper.src.sema4ai_http....
The function (build_ssl_context) defined within the protected class called _SSLContextFactory.The function start at line 153 and ends at 158. It contains 6 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [153.0] and does not return any value. It declares 3.0 functions, It ha...
Sema4AI_actions
public
public
0
0
from_network_config._parse_proxy_value
def _parse_proxy_value(value: str | None) -> list[str]:return [v.strip() for v in value.split(",")] if value else []
3
2
1
36
0
169
170
169
null
[]
None
null
0
0
0
null
0
null
The function (from_network_config._parse_proxy_value) defined within the public class called public.The function start at line 169 and ends at 170. It contains 2 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value..
Sema4AI_actions
ProxyConfig
public
0
0
from_network_config
def from_network_config(cls, network_config: _NetworkConfig) -> "ProxyConfig":def _parse_proxy_value(value: str | None) -> list[str]:return [v.strip() for v in value.split(",")] if value else []if proxy_settings := network_config.profile_config.get("proxy-settings"):http_proxy = _parse_proxy_value(proxy_settings.get("h...
2
11
2
87
0
168
181
168
cls,network_config
[]
'ProxyConfig'
{"Assign": 6, "If": 1, "Return": 2}
10
14
10
["v.strip", "value.split", "network_config.profile_config.get", "_parse_proxy_value", "proxy_settings.get", "_parse_proxy_value", "proxy_settings.get", "_parse_proxy_value", "proxy_settings.get", "cls"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.sema4ai_http_helper.src.sema4ai_http.__init___py.NetworkProfile.from_network_config"]
The function (from_network_config) defined within the public class called ProxyConfig.The function start at line 168 and ends at 181. It contains 11 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [168.0] and does not return any value. It declares 10.0 functions, It has 10.0...
Sema4AI_actions
ProxyConfig
public
0
0
from_network_config
def from_network_config(cls, network_config: _NetworkConfig) -> "NetworkProfile":return cls(ssl_context=network_config.get_ssl_context(),proxy_config=ProxyConfig.from_network_config(network_config),)
1
5
2
32
0
190
194
190
cls,network_config
[]
'ProxyConfig'
{"Assign": 6, "If": 1, "Return": 2}
10
14
10
["v.strip", "value.split", "network_config.profile_config.get", "_parse_proxy_value", "proxy_settings.get", "_parse_proxy_value", "proxy_settings.get", "_parse_proxy_value", "proxy_settings.get", "cls"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.sema4ai_http_helper.src.sema4ai_http.__init___py.NetworkProfile.from_network_config"]
The function (from_network_config) defined within the public class called ProxyConfig.The function start at line 190 and ends at 194. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [190.0] and does not return any value. It declares 10.0 functions, It has 10.0 ...
Sema4AI_actions
public
public
0
0
get_network_profile
def get_network_profile() -> NetworkProfile:return NetworkProfile.from_network_config(_NetworkConfig())
1
2
0
15
0
197
198
197
[]
NetworkProfile
{"Return": 1}
2
2
2
["NetworkProfile.from_network_config", "_NetworkConfig"]
0
[]
The function (get_network_profile) defined within the public class called public.The function start at line 197 and ends at 198. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2.0 functions, and It has 2.0 functi...
Sema4AI_actions
_SSLContextFactory
protected
0
0
__init__
def __init__(self, response: urllib3.BaseHTTPResponse) -> None:self.response = response
1
2
2
18
0
208
209
208
self,config
[]
None
{"Assign": 1}
0
2
0
[]
6,243
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.AlertCollector_py.AlertCollector.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.ClusterAlertCollector_py.ClusterAlertCollec...
The function (__init__) defined within the protected class called _SSLContextFactory.The function start at line 208 and ends at 209. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [208.0] and does not return any value. It has 6243.0 functions calling this func...
Sema4AI_actions
ResponseWrapper
public
0
0
__getattr__
def __getattr__(self, item):return getattr(self.response, item)
1
2
2
16
0
211
212
211
self,item
[]
Returns
{"Return": 1}
1
2
1
["getattr"]
12
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3625043_uber_tchannel_python.tchannel.event_py.EventRegistrar.__getattr__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69528069_adrotog_pandasgui.pandasgui.datasets_py.__getattr__", "_.content.gdrive.MyDrive.Phd_...
The function (__getattr__) defined within the public class called ResponseWrapper.The function start at line 211 and ends at 212. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [211.0], and this function return a value. It declare 1.0 function, It has 1.0 func...
Sema4AI_actions
ResponseWrapper
public
0
0
status
def status(self) -> int:return self.response.status
1
2
1
13
0
215
216
215
self
[]
int
{"Return": 1}
0
2
0
[]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3681862_fschulze_mr_developer.src.mr.developer.gitsvn_py.GitSVNWorkingCopy.status"]
The function (status) defined within the public class called ResponseWrapper.The function start at line 215 and ends at 216. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It has 1.0 function calling this function which is ["...
Sema4AI_actions
ResponseWrapper
public
0
0
status_code
def status_code(self) -> int:return self.response.status
1
2
1
13
0
219
220
219
self
[]
int
{"Return": 1}
0
2
0
[]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3957225_marketsquare_robotframework_requests.atests.http_server.core_py.view_status_code"]
The function (status_code) defined within the public class called ResponseWrapper.The function start at line 219 and ends at 220. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It has 1.0 function calling this function which ...
Sema4AI_actions
ResponseWrapper
public
0
0
text
def text(self) -> str:charset = "utf-8"content_type = self.response.headers.get("content-type", "")if "charset=" in content_type:charset = content_type.split("charset=")[-1].strip()return self.response.data.decode(charset, errors="replace")
2
6
1
60
0
223
228
223
self
[]
str
{"Assign": 3, "If": 1, "Return": 1}
4
6
4
["self.response.headers.get", "strip", "content_type.split", "self.response.data.decode"]
50
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3537748_rainerf_ricodebug.src.controllers.quickwatch_py.QuickWatch.__addCurrentText", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3537748_rainerf_ricodebug.src.controllers.quickwatch_py.QuickWatch.addToDG", "_.con...
The function (text) defined within the public class called ResponseWrapper.The function start at line 223 and ends at 228. It contains 6 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 4.0 functions, It has 4.0 functions called ...
Sema4AI_actions
ResponseWrapper
public
0
0
raise_for_status
def raise_for_status(self) -> None:if self.response.status >= 400:raise urllib3.exceptions.HTTPError(f"HTTP {self.response.status}: {self.response.reason}")
2
5
1
26
0
230
234
230
self
[]
None
{"If": 1}
1
5
1
["urllib3.exceptions.HTTPError"]
6
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3701861_joeyespo_grip.tests.test_github_py.test_github", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3961649_cloudant_python_cloudant.src.cloudant._client_session_py.IAMSession.login", "_.content.gdrive.MyDrive.Ph...
The function (raise_for_status) defined within the public class called ResponseWrapper.The function start at line 230 and ends at 234. It contains 5 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declare 1.0 function, It has 1.0 functio...
Sema4AI_actions
ResponseWrapper
public
0
0
ok
def ok(self) -> bool:return 200 <= self.response.status < 400
1
2
1
17
0
236
237
236
self
[]
bool
{"Return": 1}
0
2
0
[]
3
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3689772_zalando_stups_senza.senza.cli_py.wait", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3689772_zalando_stups_senza.senza.traffic_py.change_version_traffic", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creati...
The function (ok) defined within the public class called ResponseWrapper.The function start at line 236 and ends at 237. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It has 3.0 functions calling this function which are ["_....
Sema4AI_actions
public
public
0
0
get
def get(url,/,body: _TYPE_BODY | None = None,fields: typing.Any | None = None,headers: typing.Mapping[str, str] | None = None,json: typing.Any | None = None,**urlopen_kw: typing.Any,) -> ResponseWrapper:"""Perform a GET request using urllib3.It utilizes PoolManager or ProxyManager depending on the network settingsdefin...
1
20
6
95
0
249
274
249
url,body,fields,headers,json,**urlopen_kw
[]
ResponseWrapper
{"Expr": 1, "Return": 1}
3
26
3
["ResponseWrapper", "request", "_get_connection_manager"]
2,643
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.CustomInfoMetricsGenerator_py.CustomInfoMetricsGenerator.collect", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.CustomInfoMetricsGen...
The function (get) defined within the public class called public.The function start at line 249 and ends at 274. It contains 20 lines of code and it has a cyclomatic complexity of 1. It takes 6 parameters, represented as [249.0] and does not return any value. It declares 3.0 functions, It has 3.0 functions called insid...
Sema4AI_actions
public
public
0
0
post
def post(url,/,body: _TYPE_BODY | None = None,fields: typing.Any | None = None,headers: typing.Mapping[str, str] | None = None,json: typing.Any | None = None,**urlopen_kw: typing.Any,) -> ResponseWrapper:"""Perform a POST request using urllib3.It utilizes PoolManager or ProxyManager depending on the network settingsdef...
1
20
6
95
0
277
302
277
url,body,fields,headers,json,**urlopen_kw
[]
ResponseWrapper
{"Expr": 1, "Return": 1}
3
26
3
["ResponseWrapper", "request", "_get_connection_manager"]
37
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3572820_fusionbox_django_argonauts.test_argonauts_py.TestJsonResponseMixin.test_decode", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3650710_avinashreddy3108_paperplaneextended.userbot.modules.dogbin_py.paste", "_...
The function (post) defined within the public class called public.The function start at line 277 and ends at 302. It contains 20 lines of code and it has a cyclomatic complexity of 1. It takes 6 parameters, represented as [277.0] and does not return any value. It declares 3.0 functions, It has 3.0 functions called insi...
Sema4AI_actions
public
public
0
0
put
def put(url,/,body: _TYPE_BODY | None = None,fields: typing.Any | None = None,headers: typing.Mapping[str, str] | None = None,json: typing.Any | None = None,**urlopen_kw: typing.Any,) -> ResponseWrapper:"""Perform a PUT request using urllib3.It utilizes PoolManager or ProxyManager depending on the network settingsdefin...
1
20
6
95
0
305
330
305
url,body,fields,headers,json,**urlopen_kw
[]
ResponseWrapper
{"Expr": 1, "Return": 1}
3
26
3
["ResponseWrapper", "request", "_get_connection_manager"]
31
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3511986_dart_archive_pub_dartlang.app.models.private_key_py.PrivateKey.set_api", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3511986_dart_archive_pub_dartlang.app.models.private_key_py.PrivateKey.set_oauth", "_.co...
The function (put) defined within the public class called public.The function start at line 305 and ends at 330. It contains 20 lines of code and it has a cyclomatic complexity of 1. It takes 6 parameters, represented as [305.0] and does not return any value. It declares 3.0 functions, It has 3.0 functions called insid...
Sema4AI_actions
public
public
0
0
patch
def patch(url,/,body: _TYPE_BODY | None = None,fields: typing.Any | None = None,headers: typing.Mapping[str, str] | None = None,json: typing.Any | None = None,**urlopen_kw: typing.Any,) -> ResponseWrapper:"""Perform a PATCH request using urllib3.It utilizes PoolManager or ProxyManager depending on the network settingsd...
1
20
6
95
0
333
358
333
url,body,fields,headers,json,**urlopen_kw
[]
ResponseWrapper
{"Expr": 1, "Return": 1}
3
26
3
["ResponseWrapper", "request", "_get_connection_manager"]
1,764
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.tests.TestCollectorInit_py.TestCollectorInitialization.test_valid_collector2", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.tests.TestCollectorInit_py.Tes...
The function (patch) defined within the public class called public.The function start at line 333 and ends at 358. It contains 20 lines of code and it has a cyclomatic complexity of 1. It takes 6 parameters, represented as [333.0] and does not return any value. It declares 3.0 functions, It has 3.0 functions called ins...
Sema4AI_actions
public
public
0
0
delete
def delete(url,/,body: _TYPE_BODY | None = None,fields: typing.Any | None = None,headers: typing.Mapping[str, str] | None = None,json: typing.Any | None = None,**urlopen_kw: typing.Any,) -> ResponseWrapper:"""Perform a DELETE request using urllib3.It utilizes PoolManager or ProxyManager depending on the network setting...
1
20
6
95
0
361
386
361
url,body,fields,headers,json,**urlopen_kw
[]
ResponseWrapper
{"Expr": 1, "Return": 1}
3
26
3
["ResponseWrapper", "request", "_get_connection_manager"]
259
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3511986_dart_archive_pub_dartlang.test.test_handlers.api.test_package_versions_py.PackageVersionsTest.test_api_dartdoc_requires_oauth_key", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3511986_dart_archive_pub_dart...
The function (delete) defined within the public class called public.The function start at line 361 and ends at 386. It contains 20 lines of code and it has a cyclomatic complexity of 1. It takes 6 parameters, represented as [361.0] and does not return any value. It declares 3.0 functions, It has 3.0 functions called in...
Sema4AI_actions
_RequestInfo
protected
0
0
set_range_header
def set_range_header(self, value) -> None:if not self.headers:self.headers = {}else:self.headers = self.headers.copy()self.headers["Range"] = f"bytes={value}-"
2
6
2
43
0
397
403
397
self,value
[]
None
{"Assign": 3, "If": 1}
1
7
1
["self.headers.copy"]
0
[]
The function (set_range_header) defined within the protected class called _RequestInfo.The function start at line 397 and ends at 403. It contains 6 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [397.0] and does not return any value. It declare 1.0 function, and It has 1....
Sema4AI_actions
_RequestInfo
protected
0
0
make_request
def make_request(self) -> urllib3.BaseHTTPResponse:return self.pool_manager.request("get",self.url,headers=self.headers,preload_content=False,timeout=self.timeout,)
1
8
1
39
0
405
412
405
self
[]
urllib3.BaseHTTPResponse
{"Return": 1}
1
8
1
["self.pool_manager.request"]
47
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3625043_uber_tchannel_python.tests.sync.test_client_py.test_sync_register", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3928981_spookylukey_django_paypal.paypal.pro.tests.test_pro_py.PayPalWPPTest.test_createBilli...
The function (make_request) defined within the protected class called _RequestInfo.The function start at line 405 and ends at 412. It contains 8 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, It has 1.0 function ca...
Sema4AI_actions
_SSLContextFactory
protected
0
0
__init__
def __init__(self,*,request_info: _RequestInfo,target: Path,logger: logging.Logger,overwrite_existing: bool,max_retries: int,resume_existing: bool,):if target.is_dir():raise ValueError("Target must not be a directory")if target.exists() and not overwrite_existing:self._status = DownloadStatus.ALREADY_EXISTSelse:self._s...
5
25
7
119
0
419
447
419
self,config
[]
None
{"Assign": 1}
0
2
0
[]
6,243
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.AlertCollector_py.AlertCollector.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.ClusterAlertCollector_py.ClusterAlertCollec...
The function (__init__) defined within the protected class called _SSLContextFactory.The function start at line 419 and ends at 447. It contains 25 lines of code and it has a cyclomatic complexity of 5. It takes 7 parameters, represented as [419.0] and does not return any value. It has 6243.0 functions calling this fun...
Sema4AI_actions
_PartialDownloader
protected
0
0
get_partial_target
def get_partial_target(target: str | Path) -> Path:as_path = Path(target)target_dir, target_filename = as_path.parent, as_path.namereturn target_dir / f"{target_filename}.part"
1
4
1
33
0
450
453
450
target
[]
Path
{"Assign": 2, "Return": 1}
1
4
1
["Path"]
2
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.sema4ai_http_helper.src.sema4ai_http.__init___py.partial_file_exists", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.sema4ai_http_helper.tests.test_http_helper_py.te...
The function (get_partial_target) defined within the protected class called _PartialDownloader.The function start at line 450 and ends at 453. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, It has 1.0...
Sema4AI_actions
ResponseWrapper
public
0
0
status
def status(self) -> int:return self.response.status
1
2
1
13
0
456
457
215
self
[]
int
{"Return": 1}
0
2
0
[]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3681862_fschulze_mr_developer.src.mr.developer.gitsvn_py.GitSVNWorkingCopy.status"]
The function (status) defined within the public class called ResponseWrapper.The function start at line 456 and ends at 457. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It has 1.0 function calling this function which is ["...
Sema4AI_actions
_PartialDownloader
protected
0
0
remove_part
def remove_part(self):self._partial_target.unlink(missing_ok=True)
1
2
1
15
0
459
460
459
self
[]
None
{"Expr": 1}
1
2
1
["self._partial_target.unlink"]
0
[]
The function (remove_part) defined within the protected class called _PartialDownloader.The function start at line 459 and ends at 460. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, and It has 1.0 f...
Sema4AI_actions
_PartialDownloader
protected
0
0
_handle_request_error
def _handle_request_error(self, error: Exception) -> DownloadStatus:# We log and suppress urllib3 exceptionsif isinstance(error, urllib3.exceptions.HTTPError):self._logger.exception("Error downloading (will try to resume)", exc_info=error)self._http_error = errorreturn self._set_status(DownloadStatus.HTTP_ERROR)# For a...
2
8
2
53
0
462
472
462
self,error
[]
DownloadStatus
{"Assign": 1, "Expr": 1, "If": 1, "Return": 1}
3
11
3
["isinstance", "self._logger.exception", "self._set_status"]
0
[]
The function (_handle_request_error) defined within the protected class called _PartialDownloader.The function start at line 462 and ends at 472. It contains 8 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [462.0] and does not return any value. It declares 3.0 functions, a...
Sema4AI_actions
_PartialDownloader
protected
0
0
_set_status
def _set_status(self, status: DownloadStatus):"""Helper method use to set status"""self._status = statusreturn status
1
3
2
17
0
474
478
474
self,status
[]
Returns
{"Assign": 1, "Expr": 1, "Return": 1}
0
5
0
[]
0
[]
The function (_set_status) defined within the protected class called _PartialDownloader.The function start at line 474 and ends at 478. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [474.0], and this function return a value..
Sema4AI_actions
_PartialDownloader
protected
0
0
__iter__
def __iter__(self):return self
1
2
1
7
0
480
481
480
self
[]
Returns
{"Return": 1}
0
2
0
[]
6
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3708218_marshallward_f90nml.f90nml.namelist_py.Namelist.__iter__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3720174_mozilla_bleach.bleach.html5lib_shim_py.BleachHTMLTokenizer.__iter__", "_.content.gdrive.MyDriv...
The function (__iter__) defined within the protected class called _PartialDownloader.The function start at line 480 and ends at 481. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It has 6.0 functions calling this functio...
Sema4AI_actions
_PartialDownloader
protected
0
0
__next__
def __next__(self):if self._status in [DownloadStatus.DONE, DownloadStatus.ALREADY_EXISTS]:raise StopIterationif self._current_try > self._max_retries:raise StopIterationself._status = DownloadStatus.PARTIALself._current_try += 1self._logger.info(f"Download attempt #{self._current_try}")try:current_size = self._partial...
20
48
1
350
0
483
556
483
self
[]
Returns
{"Assign": 8, "AugAssign": 1, "Expr": 8, "If": 11, "Return": 5, "Try": 3, "While": 1, "With": 1}
26
74
26
["self._logger.info", "self._partial_target.stat", "self._request_info.set_range_header", "self._request_info.make_request", "self._handle_request_error", "int", "response.headers.get", "ValueError", "self._logger.debug", "self._set_status", "self._logger.debug", "response.headers.get", "int", "content_range.split", "V...
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3924854_jurajnyiri_pytapo.pytapo.media_stream.session_py.HttpMediaSession.start"]
The function (__next__) defined within the protected class called _PartialDownloader.The function start at line 483 and ends at 556. It contains 48 lines of code and it has a cyclomatic complexity of 20. The function does not take any parameters, and this function return a value. It declares 26.0 functions, It has 26.0...
Sema4AI_actions
_PartialDownloader
protected
0
0
__enter__
def __enter__(self):return self
1
2
1
7
0
558
559
558
self
[]
Returns
{"Return": 1}
0
2
0
[]
4
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3662468_esss_jobs_done10.tests.server.test_server_py.test_error_handling", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3687355_datarobot_batch_scoring.datarobot_batch_scoring.writer_py.NewRunContext.__enter__", "_...
The function (__enter__) defined within the protected class called _PartialDownloader.The function start at line 558 and ends at 559. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It has 4.0 functions calling this functi...
Sema4AI_actions
_PartialDownloader
protected
0
0
__exit__
def __exit__(self, exc_type, exc_val, exc_tb):# An error occurred so we delete the partial fileif exc_val and not isinstance(exc_val, KeyboardInterrupt):self._partial_target.unlink(missing_ok=True)# Everything is fine so we save the partial file as the targetif not exc_val and self._status == DownloadStatus.DONE:self._...
7
8
4
72
0
561
572
561
self,exc_type,exc_val,exc_tb
[]
None
{"Expr": 2, "If": 3, "Return": 1}
3
12
3
["isinstance", "self._partial_target.unlink", "self._partial_target.replace"]
5
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3544998_workiva_furious.furious.context.auto_context_py.AutoContext.__exit__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3687355_datarobot_batch_scoring.datarobot_batch_scoring.writer_py.NewRunContext.__exit__",...
The function (__exit__) defined within the protected class called _PartialDownloader.The function start at line 561 and ends at 572. It contains 8 lines of code and it has a cyclomatic complexity of 7. It takes 4 parameters, represented as [561.0] and does not return any value. It declares 3.0 functions, It has 3.0 fun...
Sema4AI_actions
public
public
0
0
partial_file_exists
def partial_file_exists(target: str | Path) -> bool:"""Helper function that returns if the partial file exists for a specific target"""return _PartialDownloader.get_partial_target(target).exists()
1
2
1
23
0
580
582
580
target
[]
bool
{"Expr": 1, "Return": 1}
2
3
2
["exists", "_PartialDownloader.get_partial_target"]
0
[]
The function (partial_file_exists) defined within the public class called public.The function start at line 580 and ends at 582. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2.0 functions, and It has 2.0 functi...
Sema4AI_actions
public
public
0
0
download_with_resume
def download_with_resume(url: str,target: str | Path,*,headers: dict[str, str] | None = None,make_executable: bool = False,logger: logging.Logger = _DEFAULT_LOGGER,chunk_size: int = 1024 * 5,pool_manager: urllib3.PoolManager | None = None,max_retries: int = 10,timeout: int = 5,wait_interval: float | int = 1,overwrite_e...
7
57
12
313
4
585
672
585
url,target,headers,make_executable,logger,chunk_size,pool_manager,max_retries,timeout,wait_interval,overwrite_existing,resume_from_existing_part_file
['request_info', 'filename', 'pool_manager', 'target_path']
DownloadResult
{"AnnAssign": 1, "Assign": 4, "Expr": 8, "For": 1, "If": 4, "Return": 1, "With": 1}
17
88
17
["Path", "target_path.is_dir", "url.split", "_get_connection_manager", "_RequestInfo", "logger.info", "target_path.absolute", "target_path.parent.mkdir", "_PartialDownloader", "logger.info", "time.sleep", "logger.info", "logger.info", "RuntimeError", "target_path.chmod", "target_path.stat", "DownloadResult"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.common.src.sema4ai.common.tools_py._download_tool"]
The function (download_with_resume) defined within the public class called public.The function start at line 585 and ends at 672. It contains 57 lines of code and it has a cyclomatic complexity of 7. It takes 12 parameters, represented as [585.0] and does not return any value. It declares 17.0 functions, It has 17.0 fu...