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
greet
def greet(name: str, title="Mr.") -> str:"""Provides a greeting for a person.Args:name: The name of the person to greet.title: The title for the persor (Mr., Mrs., ...).Returns:The greeting for the person."""artifacts = Path(os.environ["ROBOT_ARTIFACTS"])subdir = artifacts / "subdir"subdir.mkdir(parents=True, exist_ok=...
1
7
2
56
3
8
24
8
name,title
['subdir', 'artifacts', 'txt']
str
{"Assign": 3, "Expr": 3, "Return": 1}
3
17
3
["Path", "subdir.mkdir", "txt.write_text"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.templates.minimal.tests.test_template_py.test_actions"]
The function (greet) defined within the public class called public.The function start at line 8 and ends at 24. It contains 7 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [8.0] and does not return any value. It declares 3.0 functions, It has 3.0 functions called inside wh...
Sema4AI_actions
public
public
0
0
hello
def hello(name: str, title="Mr.") -> str:"""Provides a greeting for a person.Args:name: The name of the person to greet.title: The title for the persor (Mr., Mrs., ...).Returns:The greeting for the person."""return f"Hello {title} {name}."
1
2
2
17
0
5
16
5
name,title
[]
str
{"Expr": 1, "Return": 1}
0
12
0
[]
2
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3670979_sdgathman_pymilter.Milter.__init___py.runmilter", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3984947_census_instrumentation_opencensus_python.context.opencensus_context.examples.py37_py.main"]
The function (hello) defined within the public class called public.The function start at line 5 and ends at 16. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [5.0] and does not return any value. It has 2.0 functions calling this function which are ["_.content...
Sema4AI_actions
public
public
0
0
hello
def hello(name: str, title="Mr.") -> str:"""Provides a greeting for a person.Args:name: The name of the person to greet.title: The title for the persor (Mr., Mrs., ...).Returns:The greeting for the person."""return f"Hello {title} {name}."
1
2
2
17
0
5
16
5
name,title
[]
str
{"Expr": 1, "Return": 1}
0
12
0
[]
2
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3670979_sdgathman_pymilter.Milter.__init___py.runmilter", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3984947_census_instrumentation_opencensus_python.context.opencensus_context.examples.py37_py.main"]
The function (hello) defined within the public class called public.The function start at line 5 and ends at 16. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [5.0] and does not return any value. It has 2.0 functions calling this function which are ["_.content...
Sema4AI_actions
public
public
0
0
run_mcp_server.greet_mcp
def greet_mcp(name: str, title="Mr.") -> str:"""Provides a greeting for a person.Args:name: The name of the person to greet.title: The title for the persor (Mr., Mrs., ...).Returns:The greeting for the person.Tool structure:{name: string;// Unique identifier for the tooldescription?: string;// Human-readable descriptio...
1
2
2
17
0
22
51
22
null
[]
None
null
0
0
0
null
0
null
The function (run_mcp_server.greet_mcp) defined within the public class called public.The function start at line 22 and ends at 51. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [22.0] and does not return any value..
Sema4AI_actions
public
public
0
0
run_mcp_server.long_running_tool
async def long_running_tool(duration: float) -> str:"""Does a long running task.Args:duration: The duration to wait in seconds.Returns:The result of the long running task."""# We'd like to cancel this, but it's just not possible with the current SDK!import asyncioawait asyncio.sleep(duration)return "ok"
1
4
1
21
0
54
68
54
null
[]
None
null
0
0
0
null
0
null
The function (run_mcp_server.long_running_tool) defined within the public class called public.The function start at line 54 and ends at 68. 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..
Sema4AI_actions
public
public
0
0
run_mcp_server.my_prompt_with_optional_arg
async def my_prompt_with_optional_arg(name: str | None = None) -> str:"""Prompt with an optional argument.Args:name: The name of the person to greet."""return (f"This is the built in prompt for {name}."if nameelse "This is the built in prompt without a name.")
2
6
1
23
0
71
82
71
null
[]
None
null
0
0
0
null
0
null
The function (run_mcp_server.my_prompt_with_optional_arg) defined within the public class called public.The function start at line 71 and ends at 82. 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..
Sema4AI_actions
public
public
0
0
run_mcp_server.my_prompt
async def my_prompt(name: str) -> str:"""Prompts in MCP are predefined templates that can:Accept dynamic argumentsInclude context from resourcesChain multiple interactionsGuide specific workflowsSurface as UI elements (like slash commands)Prompt structureEach prompt is defined with:{name: string;// Unique identifier fo...
1
2
1
13
0
85
114
85
null
[]
None
null
0
0
0
null
0
null
The function (run_mcp_server.my_prompt) defined within the public class called public.The function start at line 85 and ends at 114. 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
run_mcp_server.my_resource_no_template
async def my_resource_no_template() -> str:"""This is a simple resource without a template."""return "This is a simple resource without a template."
1
2
0
9
0
119
123
119
null
[]
None
null
0
0
0
null
0
null
The function (run_mcp_server.my_resource_no_template) defined within the public class called public.The function start at line 119 and ends at 123. 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
run_mcp_server.my_resource_template
async def my_resource_template(name: str) -> str:"""Resources represent any kind of data that an MCP server wants to make available to clients. This can include:File contentsDatabase recordsAPI responsesLive system dataScreenshots and imagesLog filesAnd moreEach resource is identified by a unique URI and can contain ei...
1
2
1
13
0
128
161
128
null
[]
None
null
0
0
0
null
0
null
The function (run_mcp_server.my_resource_template) defined within the public class called public.The function start at line 128 and ends at 161. 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
run_mcp_server
def run_mcp_server(port: int):import loggingfrom mcp.server.fastmcp import FastMCPlogger = logging.getLogger()logger.setLevel(logging.DEBUG)handler = logging.StreamHandler()handler.setLevel(logging.DEBUG)formatter = logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s")handler.setFormatter(formatter)...
1
30
1
150
4
4
163
4
port
['formatter', 'mcp', 'handler', 'logger']
Returns
{"Assign": 4, "Expr": 12, "Return": 6}
16
160
16
["logging.getLogger", "logger.setLevel", "logging.StreamHandler", "handler.setLevel", "logging.Formatter", "handler.setFormatter", "logger.addHandler", "FastMCP", "mcp.tool", "asyncio.sleep", "mcp.tool", "mcp.prompt", "mcp.prompt", "mcp.resource", "mcp.resource", "mcp.run"]
0
[]
The function (run_mcp_server) defined within the public class called public.The function start at line 4 and ends at 163. It contains 30 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 declares 16.0 functions, and It has 16.0 functi...
Sema4AI_actions
public
public
0
0
calculator_sum
def calculator_sum(v1: float, v2: float) -> float:"""Sums 2 numbers and returns them.Args:v1: First number.v2: Second number.Returns:The sum of v1 + v2."""return v1 + v2
1
2
2
18
0
5
16
5
v1,v2
[]
float
{"Expr": 1, "Return": 1}
0
12
0
[]
0
[]
The function (calculator_sum) defined within the public class called public.The function start at line 5 and ends at 16. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [5.0] and does not return any value..
Sema4AI_actions
public
public
0
0
broken_action
def broken_action() -> int:"""This always raises an error."""raise RuntimeError("This is broken")
1
2
0
12
0
20
24
20
[]
int
{"Expr": 1}
1
5
1
["RuntimeError"]
0
[]
The function (broken_action) defined within the public class called public.The function start at line 20 and ends at 24. 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 ...
Sema4AI_actions
public
public
0
0
neverending_action
def neverending_action() -> str:import timetime.sleep(500)raise RuntimeError("Should never get here...")
1
4
0
19
0
28
32
28
[]
str
{"Expr": 1}
2
5
2
["time.sleep", "RuntimeError"]
0
[]
The function (neverending_action) defined within the public class called public.The function start at line 28 and ends at 32. 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 functions...
Sema4AI_actions
public
public
0
0
bad_return_none
def bad_return_none():"""Return None when string is expected"""
1
1
0
5
0
36
39
36
[]
None
{"Expr": 1}
0
4
0
[]
0
[]
The function (bad_return_none) defined within the public class called public.The function start at line 36 and ends at 39. It contains 1 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
global_return_reuse_process
def global_return_reuse_process():global global_valueglobal_value += 1return str(global_value)
1
4
0
14
0
46
49
46
[]
Returns
{"AugAssign": 1, "Return": 1}
1
4
1
["str"]
0
[]
The function (global_return_reuse_process) defined within the public class called public.The function start at line 46 and ends at 49. It contains 4 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 declare 1.0 function, and It has 1....
Sema4AI_actions
public
public
0
0
check_headers
def check_headers(request: Request, name: str, title: str = "Mr.") -> str:"""Gets something from the headers.Args:name: The name of the person to greet.title: The title for the persor (Mr., Mrs., ...).Returns:The greeting for the person."""ret = {"headers": dict(request.headers), "cookies": dict(request.cookies)}return...
1
3
3
48
1
7
19
7
request,name,title
['ret']
str
{"Assign": 1, "Expr": 1, "Return": 1}
3
13
3
["dict", "dict", "json.dumps"]
0
[]
The function (check_headers) defined within the public class called public.The function start at line 7 and ends at 19. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [7.0] and does not return any value. It declares 3.0 functions, and It has 3.0 functions cal...
Sema4AI_actions
public
public
0
0
my_action
def my_action(x: str, data: MyCustomData) -> OutputData:assert isinstance(data, MyCustomData)return OutputData(accepted=True, depends_on=Dependent(city="Foo"))
1
3
2
36
0
24
26
24
x,data
[]
OutputData
{"Return": 1}
3
3
3
["isinstance", "OutputData", "Dependent"]
0
[]
The function (my_action) defined within the public class called public.The function start at line 24 and ends at 26. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [24.0] and does not return any value. It declares 3.0 functions, and It has 3.0 functions calle...
Sema4AI_actions
public
public
0
0
greet
def greet(name: str, title="Mr.") -> str:"""Provides a greeting for a person.Args:name: The name of the person to greet.title: The title for the persor (Mr., Mrs., ...).Returns:The greeting for the person."""artifacts = Path(os.environ["ROBOT_ARTIFACTS"])subdir = artifacts / "subdir"subdir.mkdir(parents=True, exist_ok=...
1
7
2
56
3
8
24
8
name,title
['subdir', 'artifacts', 'txt']
str
{"Assign": 3, "Expr": 3, "Return": 1}
3
17
3
["Path", "subdir.mkdir", "txt.write_text"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.templates.minimal.tests.test_template_py.test_actions"]
The function (greet) defined within the public class called public.The function start at line 8 and ends at 24. It contains 7 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [8.0] and does not return any value. It declares 3.0 functions, It has 3.0 functions called inside wh...
Sema4AI_actions
public
public
0
0
greet_mcp
def greet_mcp(name: str, title="Mr.") -> str:"""Provides a greeting for a person.Args:name: The name of the person to greet.title: The title for the persor (Mr., Mrs., ...).Returns:The greeting for the person.Tool structure:{name: string;// Unique identifier for the tooldescription?: string;// Human-readable descriptio...
1
2
2
17
0
7
36
7
name,title
[]
str
{"Expr": 1, "Return": 1}
1
30
1
["mcp.tool"]
0
[]
The function (greet_mcp) defined within the public class called public.The function start at line 7 and ends at 36. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [7.0] and does not return any value. It declare 1.0 function, and It has 1.0 function called ins...
Sema4AI_actions
public
public
0
0
check_secrets
async def check_secrets(my_secret: Secret) -> str:"""Check if the secrets are working.Args:my_secret: The secret to check.Returns:The value of the secret."""return my_secret.value
1
2
1
14
0
40
50
40
my_secret
[]
str
{"Expr": 1, "Return": 1}
0
11
0
[]
0
[]
The function (check_secrets) defined within the public class called public.The function start at line 40 and ends at 50. 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
long_running_tool
async def long_running_tool(duration: float) -> str:"""Does a long running task.Args:duration: The duration to wait in seconds.Returns:The result of the long running task."""# We'd like to cancel this, but it's just not possible with the current SDK!import asyncioawait asyncio.sleep(duration)return "ok"
1
4
1
21
0
54
68
54
duration
[]
str
{"Expr": 2, "Return": 1}
2
15
2
["asyncio.sleep", "mcp.tool"]
0
[]
The function (long_running_tool) defined within the public class called public.The function start at line 54 and ends at 68. 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 functions ...
Sema4AI_actions
public
public
0
0
my_prompt
async def my_prompt(name: str) -> str:"""Prompts in MCP are predefined templates that can:Accept dynamic argumentsInclude context from resourcesChain multiple interactionsGuide specific workflowsSurface as UI elements (like slash commands)Prompt structureEach prompt is defined with:{name: string;// Unique identifier fo...
1
2
1
13
0
72
101
72
name
[]
str
{"Expr": 1, "Return": 1}
1
30
1
["mcp.prompt"]
0
[]
The function (my_prompt) defined within the public class called public.The function start at line 72 and ends at 101. 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 ins...
Sema4AI_actions
public
public
0
0
my_prompt_with_optional_arg
async def my_prompt_with_optional_arg(name: str | None = None) -> str:"""Prompt with an optional argument.Args:name: The name of the person to greet."""return (f"This is the built in prompt for {name}."if nameelse "This is the built in prompt without a name.")
2
6
1
23
0
105
116
105
name
[]
str
{"Expr": 1, "Return": 1}
1
12
1
["mcp.prompt"]
0
[]
The function (my_prompt_with_optional_arg) defined within the public class called public.The function start at line 105 and ends at 116. 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 declare 1.0 function, and It has 1.0 ...
Sema4AI_actions
public
public
0
0
my_resource_no_template
async def my_resource_no_template() -> str:"""This is a simple resource without a template."""return "This is a simple resource without a template."
1
2
0
9
0
122
126
122
[]
str
{"Expr": 1, "Return": 1}
1
5
1
["mcp.resource"]
0
[]
The function (my_resource_no_template) defined within the public class called public.The function start at line 122 and ends at 126. 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
my_resource_template
async def my_resource_template(name: str) -> str:"""Resources represent any kind of data that an MCP server wants to make available to clients. This can include:File contentsDatabase recordsAPI responsesLive system dataScreenshots and imagesLog filesAnd moreEach resource is identified by a unique URI and can contain ei...
1
2
1
13
0
132
165
132
name
[]
str
{"Expr": 1, "Return": 1}
1
34
1
["mcp.resource"]
0
[]
The function (my_resource_template) defined within the public class called public.The function start at line 132 and ends at 165. 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 functio...
Sema4AI_actions
public
public
0
0
greet_user_oauth2.get_user_info
def get_user_info(access_token):url = "https://people.googleapis.com/v1/people/me?personFields=names"headers = {"Authorization": f"Bearer {access_token}"}response = requests.get(url, headers=headers)if response.status_code == 200:user_info = response.json()names = user_info.get("names", [])if names:return names[0].get(...
3
13
1
78
0
33
47
33
null
[]
None
null
0
0
0
null
0
null
The function (greet_user_oauth2.get_user_info) defined within the public class called public.The function start at line 33 and ends at 47. It contains 13 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
public
public
0
0
greet_user_oauth2
def greet_user_oauth2(oauth2_secret: OAuth2Secret[Literal["google"],list[Literal["openid","https://www.googleapis.com/auth/userinfo.email","https://www.googleapis.com/auth/userinfo.profile",]],],regular_secret: Secret,) -> str:"""Provides a greeting for a person.Args:oauth2_secret: Oauth2 informationregular_secret: Som...
1
22
2
70
8
7
54
7
oauth2_secret,regular_secret
['user_info', 'access_token', 'names', 'headers', 'url', 'response', 'msg', 'user_name']
str
{"Assign": 8, "Expr": 2, "If": 2, "Return": 3}
8
48
8
["requests.get", "response.json", "user_info.get", "get", "Exception", "get_user_info", "print", "action"]
0
[]
The function (greet_user_oauth2) defined within the public class called public.The function start at line 7 and ends at 54. It contains 22 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [7.0] and does not return any value. It declares 8.0 functions, and It has 8.0 function...
Sema4AI_actions
public
public
0
0
long_running
def long_running(duration: float) -> str:"""A tool that takes some time to execute.Args:duration: How long to sleep in seconds.Returns:A message indicating completion."""import timetime.sleep(duration)return f"Completed after {duration} seconds"
1
4
1
21
0
5
17
5
duration
[]
str
{"Expr": 2, "Return": 1}
1
13
1
["time.sleep"]
0
[]
The function (long_running) defined within the public class called public.The function start at line 5 and ends at 17. 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, and It has 1.0 function called in...
Sema4AI_actions
public
public
0
0
test_system_mutex.__init__
def __init__(self):threading.Thread.__init__(self)self.worked = False
1
3
1
18
0
26
28
26
null
[]
None
null
0
0
0
null
0
null
The function (test_system_mutex.__init__) defined within the public class called public.The function start at line 26 and ends at 28. 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..
Sema4AI_actions
public
public
0
0
test_system_mutex.run
def run(self):mutex2 = SystemMutex(mutex_name)assert not mutex2.get_mutex_aquired()self.worked = True
1
4
1
23
0
30
33
30
null
[]
None
null
0
0
0
null
0
null
The function (test_system_mutex.run) defined within the public class called public.The function start at line 30 and ends at 33. 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..
Sema4AI_actions
public
public
0
0
test_system_mutex.release_mutex
def release_mutex():time.sleep(time_to_release_mutex)released_mutex[0] = Truemutex4.release_mutex()
1
4
0
21
0
61
64
61
null
[]
None
null
0
0
0
null
0
null
The function (test_system_mutex.release_mutex) defined within the public class called public.The function start at line 61 and ends at 64. 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..
Sema4AI_actions
public
public
0
0
test_system_mutex.raise_assertion_info_if_prev_acquired_not_detected
def raise_assertion_info_if_prev_acquired_not_detected(mutex_name):prev_system_mutex = _mutex_name_to_info.get(mutex_name)if prev_system_mutex is None:found = []for e in _mutex_name_to_info.items():found.append((f"{e[0]}: {e[1]}"))raise AssertionError(f"Did not find mutex name: {mutex_name} in {found}")raise AssertionE...
3
14
1
60
0
69
84
69
null
[]
None
null
0
0
0
null
0
null
The function (test_system_mutex.raise_assertion_info_if_prev_acquired_not_detected) defined within the public class called public.The function start at line 69 and ends at 84. It contains 14 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
public
public
0
0
test_system_mutex
def test_system_mutex():import subprocessimport sysimport threadingimport timeimport weakrefimport pytestfrom _pytest.outcomes import Failedfrom sema4ai.action_server._robo_utils.system_mutex import (SystemMutex,_mutex_name_to_info,timed_acquire_mutex,)mutex_name = "mutex_name_test_system_mutex"system_mutex = SystemMut...
2
66
0
297
13
4
117
4
['time_to_release_mutex', 'acquired_time', 'mutex4', 'prev_system_mutex', 't', 'code', 'mutex_name', 'found', 'initial_time', 'mutex2', 'released_mutex', 'system_mutex', 'mutex3']
None
{"Assign": 18, "Expr": 12, "For": 1, "If": 1, "Try": 1, "With": 5}
37
114
37
["SystemMutex", "system_mutex.get_mutex_aquired", "threading.Thread.__init__", "SystemMutex", "mutex2.get_mutex_aquired", "Check2Thread", "t.start", "t.join", "system_mutex.release_mutex", "SystemMutex", "mutex3.get_mutex_aquired", "weakref.ref", "system_mutex.release_mutex", "SystemMutex", "mutex4.get_mutex_aquired", ...
0
[]
The function (test_system_mutex) defined within the public class called public.The function start at line 4 and ends at 117. It contains 66 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 37.0 functions, and It has 37.0 functio...
Sema4AI_actions
public
public
0
0
test_gen_mutex_name_from_path
def test_gen_mutex_name_from_path():from sema4ai.action_server._robo_utils.system_mutex import generate_mutex_namemutex_name = "my/snth\\nsth"mutex_name = generate_mutex_name(mutex_name, prefix="my_")assert mutex_name == "my_f9c932bf450ef164"
1
5
0
31
1
120
125
120
['mutex_name']
None
{"Assign": 2}
1
6
1
["generate_mutex_name"]
0
[]
The function (test_gen_mutex_name_from_path) defined within the public class called public.The function start at line 120 and ends at 125. It contains 5 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....
Sema4AI_actions
public
public
0
0
test_system_mutex_error_on_timeout.thread
def thread():mutex2 = SystemMutex("test_system_mutex_error_on_timeout")assert not mutex2.get_mutex_aquired()mutex_creation_info[0] = mutex2.mutex_creation_info
1
4
0
25
0
138
141
138
null
[]
None
null
0
0
0
null
0
null
The function (test_system_mutex_error_on_timeout.thread) defined within the public class called public.The function start at line 138 and ends at 141. 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..
Sema4AI_actions
public
public
0
0
test_system_mutex_error_on_timeout
def test_system_mutex_error_on_timeout():import osimport threadingfrom sema4ai.action_server._robo_utils.system_mutex import SystemMutexmutex = SystemMutex("test_system_mutex_error_on_timeout")assert mutex.get_mutex_aquired()mutex_creation_info = [""]def thread():mutex2 = SystemMutex("test_system_mutex_error_on_timeout...
1
14
0
78
5
128
148
128
['mutex_creation_info', 't', 'info', 'mutex2', 'mutex']
None
{"Assign": 6, "Expr": 2}
9
21
9
["SystemMutex", "mutex.get_mutex_aquired", "SystemMutex", "mutex2.get_mutex_aquired", "threading.Thread", "t.start", "t.join", "str", "os.getpid"]
0
[]
The function (test_system_mutex_error_on_timeout) defined within the public class called public.The function start at line 128 and ends at 148. It contains 14 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 9.0 functions, and I...
Sema4AI_actions
public
public
0
0
test_system_mutex_timed_acquire_no_error_on_timeout.thread
def thread():mutex2 = SystemMutex("test_system_mutex_timed_acquire_no_error_on_timeout")assert mutex2.get_mutex_aquired()event_mutex_acquired.set()event_terminate_thread.wait()
1
5
0
26
0
163
167
163
null
[]
None
null
0
0
0
null
0
null
The function (test_system_mutex_timed_acquire_no_error_on_timeout.thread) defined within the public class called public.The function start at line 163 and ends at 167. It contains 5 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
test_system_mutex_timed_acquire_no_error_on_timeout.on_log_emit
def on_log_emit(msg):if "acquired after 1 seconds" in f"{msg.msg % msg.args}":event_terminate_thread.set()
2
3
1
16
0
179
181
179
null
[]
None
null
0
0
0
null
0
null
The function (test_system_mutex_timed_acquire_no_error_on_timeout.on_log_emit) defined within the public class called public.The function start at line 179 and ends at 181. It contains 3 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
test_system_mutex_timed_acquire_no_error_on_timeout
def test_system_mutex_timed_acquire_no_error_on_timeout():import threadingfrom sema4ai.action_server._robo_utils import log_custom_handler, system_mutexfrom sema4ai.action_server._robo_utils.system_mutex import (SystemMutex,timed_acquire_mutex,)event_mutex_acquired = threading.Event()event_terminate_thread = threading....
1
23
0
111
5
151
189
151
['t', 'event_mutex_acquired', 'mutex2', 'mutex', 'event_terminate_thread']
None
{"Assign": 5, "Expr": 5, "If": 1, "With": 2}
14
39
14
["threading.Event", "threading.Event", "SystemMutex", "mutex2.get_mutex_aquired", "event_mutex_acquired.set", "event_terminate_thread.wait", "threading.Thread", "t.start", "event_mutex_acquired.wait", "SystemMutex", "mutex.get_mutex_aquired", "event_terminate_thread.set", "log_custom_handler.add_handler_callback", "tim...
0
[]
The function (test_system_mutex_timed_acquire_no_error_on_timeout) defined within the public class called public.The function start at line 151 and ends at 189. It contains 23 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 14.0...
Sema4AI_actions
public
public
0
0
test_system_mutex_locked_on_subprocess.acquire_mutex
def acquire_mutex():mutex = SystemMutex("test_system_mutex_locked_on_subprocess")return mutex.get_mutex_aquired()
1
3
0
16
0
222
224
222
null
[]
None
null
0
0
0
null
0
null
The function (test_system_mutex_locked_on_subprocess.acquire_mutex) defined within the public class called public.The function start at line 222 and ends at 224. 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..
Sema4AI_actions
public
public
0
0
test_system_mutex_locked_on_subprocess
def test_system_mutex_locked_on_subprocess():import subprocessimport sysfrom devutils.fixtures import wait_for_conditionfrom sema4ai.action_server._robo_utils.process import kill_process_and_subprocessesfrom sema4ai.action_server._robo_utils.system_mutex import SystemMutexcode = """import sysimport timeprint('initializ...
1
26
0
113
3
192
226
192
['code', 'p', 'mutex']
Returns
{"Assign": 4, "Expr": 3, "Return": 1}
10
35
10
["subprocess.Popen", "wait_for_condition", "strip", "p.stdout.readline", "SystemMutex", "mutex.get_mutex_aquired", "kill_process_and_subprocesses", "SystemMutex", "mutex.get_mutex_aquired", "wait_for_condition"]
0
[]
The function (test_system_mutex_locked_on_subprocess) defined within the public class called public.The function start at line 192 and ends at 226. It contains 26 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 declares 10.0 function...
Sema4AI_actions
public
public
0
0
unicode_ação_Σ
def unicode_ação_Σ(ação: str) -> str:assert isinstance(ação, str)return ação
1
3
1
18
0
5
7
5
ação
[]
str
{"Return": 1}
1
3
1
["isinstance"]
0
[]
The function (unicode_ação_Σ) defined within the public class called public.The function start at line 5 and ends at 7. 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, and It has 1.0 function called i...
Sema4AI_actions
public
public
0
0
in_my_module
def in_my_module():return "in_my_module"
1
2
0
6
0
1
2
1
[]
Returns
{"Return": 1}
0
2
0
[]
0
[]
The function (in_my_module) defined within the public class called public.The function start at line 1 and ends at 2. It contains 2 lines of code and it has a cyclomatic complexity of 1. It take 0 parameter, represented as [1.0], and this function return a value..
Sema4AI_actions
public
public
0
0
doit
def doit(validate: bool = False) -> str:"""This is an action.Args:validate: If True, will check that the environment is as expected.Returns:'Ok' string or 'Ok validated' if validate is True."""if validate:# Just import to check that it worksimport mylib# type: ignoreprint(mylib.__file__)return "Ok validated"return "Ok"
2
6
1
27
0
5
22
5
validate
[]
str
{"Expr": 2, "If": 1, "Return": 2}
1
18
1
["print"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3546011_hashdist_hashdist.hashdist.core.test.test_run_job_py.test_capture_stdout"]
The function (doit) defined within the public class called public.The function start at line 5 and ends at 22. 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 declare 1.0 function, It has 1.0 function called inside which is...
Sema4AI_actions
public
public
0
0
test_my_action_ok
def test_my_action_ok():import my_action# type: ignoreassert my_action.doit() == "Ok"
1
3
0
14
0
1
4
1
[]
None
{}
1
4
1
["my_action.doit"]
0
[]
The function (test_my_action_ok) defined within the public class called public.The function start at line 1 and ends at 4. It contains 3 lines of code and it has a cyclomatic complexity of 1. It take 0 parameter, represented as [1.0] and does not return any value. It declare 1.0 function, and It has 1.0 function calle...
Sema4AI_actions
public
public
0
0
test_my_action_fail
def test_my_action_fail():import my_action# type: ignoreassert my_action.doit() == "fail", "This will fail"
1
3
0
16
0
7
10
7
[]
None
{}
1
4
1
["my_action.doit"]
0
[]
The function (test_my_action_fail) defined within the public class called public.The function start at line 7 and ends at 10. 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, and It has 1.0 function ca...
Sema4AI_actions
public
public
0
0
hello
def hello(name: str, title="Mr.") -> str:"""Provides a greeting for a person.Args:name: The name of the person to greet.title: The title for the persor (Mr., Mrs., ...).Returns:The greeting for the person."""return f"Hello {title} {name}."
1
2
2
17
0
5
16
5
name,title
[]
str
{"Expr": 1, "Return": 1}
0
12
0
[]
2
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3670979_sdgathman_pymilter.Milter.__init___py.runmilter", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3984947_census_instrumentation_opencensus_python.context.opencensus_context.examples.py37_py.main"]
The function (hello) defined within the public class called public.The function start at line 5 and ends at 16. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [5.0] and does not return any value. It has 2.0 functions calling this function which are ["_.content...
Sema4AI_actions
public
public
0
0
nothing_here
def nothing_here(name: str, title="Mr.") -> str:"""Provides a greeting for a person.Args:name: The name of the person to greet.title: The title for the persor (Mr., Mrs., ...).Returns:The greeting for the person."""return f"Hello {title} {name}."
1
2
2
17
0
1
12
1
name,title
[]
str
{"Expr": 1, "Return": 1}
0
12
0
[]
0
[]
The function (nothing_here) defined within the public class called public.The function start at line 1 and ends at 12. It contains 2 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..
Sema4AI_actions
public
public
0
0
nothing_here
def nothing_here(name: str, title="Mr.") -> str:"""Provides a greeting for a person.Args:name: The name of the person to greet.title: The title for the persor (Mr., Mrs., ...).Returns:The greeting for the person."""return f"Hello {title} {name}."
1
2
2
17
0
5
16
5
name,title
[]
str
{"Expr": 1, "Return": 1}
0
12
0
[]
0
[]
The function (nothing_here) defined within the public class called public.The function start at line 5 and ends at 16. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [5.0] and does not return any value..
Sema4AI_actions
public
public
0
0
nothing_here
def nothing_here(name: str, title="Mr.") -> str:"""Provides a greeting for a person.Args:name: The name of the person to greet.title: The title for the persor (Mr., Mrs., ...).Returns:The greeting for the person."""return f"Hello {title} {name}."
1
2
2
17
0
5
16
5
name,title
[]
str
{"Expr": 1, "Return": 1}
0
12
0
[]
0
[]
The function (nothing_here) defined within the public class called public.The function start at line 5 and ends at 16. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [5.0] and does not return any value..
Sema4AI_actions
public
public
0
0
hello_greeting
def hello_greeting(name: str,oauth2_secret: OAuth2Secret[Literal["google"], list[Literal["https://scope:read", "https://scope:write"]]],) -> str:"""Provides a greeting for a person.Args:name: The name of the person to greet.oauth2_secret: Oauth2 informationReturns:The greeting for the person."""return f"Hello {name}. A...
1
7
2
34
0
7
23
7
name,oauth2_secret
[]
str
{"Expr": 1, "Return": 1}
1
17
1
["action"]
0
[]
The function (hello_greeting) defined within the public class called public.The function start at line 7 and ends at 23. It contains 7 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [7.0] and does not return any value. It declare 1.0 function, and It has 1.0 function calle...
Sema4AI_actions
public
public
0
0
hello_greeting
def hello_greeting(name: str, private_info: Secret) -> str:"""Provides a greeting for a person.Args:name: The name of the person to greet.private_info: Some private information gotten from somewhere.Returns:The greeting for the person."""return f"Hello {name}. Private info: {private_info.value}"
1
2
2
17
0
5
16
5
name,private_info
[]
str
{"Expr": 1, "Return": 1}
1
12
1
["action"]
0
[]
The function (hello_greeting) defined within the public class called public.The function start at line 5 and ends at 16. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [5.0] and does not return any value. It declare 1.0 function, and It has 1.0 function calle...
Sema4AI_actions
public
public
0
0
nothing_here
def nothing_here(name: str, title="Mr.") -> str:"""Provides a greeting for a person.Args:name: The name of the person to greet.title: The title for the persor (Mr., Mrs., ...).Returns:The greeting for the person."""return f"Hello {title} {name}."
1
2
2
17
0
1
12
1
name,title
[]
str
{"Expr": 1, "Return": 1}
0
12
0
[]
0
[]
The function (nothing_here) defined within the public class called public.The function start at line 1 and ends at 12. It contains 2 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..
Sema4AI_actions
public
public
0
0
doit
def doit(validate: bool = False) -> str:"""This is an action.Args:validate: If True, will check that the environment is as expected.Returns:'Ok' string or 'Ok validated' if validate is True."""if validate:# Just import to check that it worksimport mylib# type: ignoreprint(mylib.__file__)return "Ok validated"return "Ok"
2
6
1
27
0
5
22
5
validate
[]
str
{"Expr": 2, "If": 1, "Return": 2}
1
18
1
["print"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3546011_hashdist_hashdist.hashdist.core.test.test_run_job_py.test_capture_stdout"]
The function (doit) defined within the public class called public.The function start at line 5 and ends at 22. 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 declare 1.0 function, It has 1.0 function called inside which is...
Sema4AI_actions
public
public
0
0
sleep_action
def sleep_action(time_to_sleep: float) -> float:"""Args:time_to_sleep: The number of seconds to sleep.Returns:The number of seconds that were slept."""import timetime.sleep(time_to_sleep)return time_to_sleep
1
4
1
20
0
5
16
5
time_to_sleep
[]
float
{"Expr": 2, "Return": 1}
1
12
1
["time.sleep"]
0
[]
The function (sleep_action) defined within the public class called public.The function start at line 5 and ends at 16. 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, and It has 1.0 function called in...
Sema4AI_actions
public
public
0
0
sleep_a_while
def sleep_a_while(time_to_sleep: float) -> float:"""This function sleeps for a while and then returns the time when itfinished sleeping.Args:time_to_sleep: The time to sleep."""import timetime.sleep(time_to_sleep)return time.time()
1
4
1
24
0
5
16
5
time_to_sleep
[]
float
{"Expr": 2, "Return": 1}
2
12
2
["time.sleep", "time.time"]
0
[]
The function (sleep_a_while) defined within the public class called public.The function start at line 5 and ends at 16. 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 functions calle...
Sema4AI_actions
public
public
0
0
my_action
def my_action(arg: str, private_info: Secret, request: Request) -> str:"""Does something"""assert "x-action-context" in request.headersreturn "Ok"
1
3
3
26
0
6
11
6
arg,private_info,request
[]
str
{"Expr": 1, "Return": 1}
0
6
0
[]
0
[]
The function (my_action) defined within the public class called public.The function start at line 6 and ends at 11. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [6.0] and does not return any value..
Sema4AI_actions
public
public
0
0
return_response_ok_action
def return_response_ok_action() -> Response[SomeData]:return Response(result=SomeData(show=False))
1
2
0
21
0
10
11
10
[]
Response[SomeData]
{"Return": 1}
2
2
2
["Response", "SomeData"]
0
[]
The function (return_response_ok_action) defined within the public class called public.The function start at line 10 and ends at 11. 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 fu...
Sema4AI_actions
public
public
0
0
return_response_error_action
def return_response_error_action() -> Response[SomeData]:return Response(error="Something bad happened")
1
2
0
16
0
15
16
15
[]
Response[SomeData]
{"Return": 1}
1
2
1
["Response"]
0
[]
The function (return_response_error_action) defined within the public class called public.The function start at line 15 and ends at 16. 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
public
public
0
0
raise_other_error_action
def raise_other_error_action() -> Response[SomeData]:raise RuntimeError("Other error")
1
2
0
14
0
20
21
20
[]
Response[SomeData]
{}
1
2
1
["RuntimeError"]
0
[]
The function (raise_other_error_action) 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. The function does not take any parameters and does not return any value. It declare 1.0 function, and It has 1.0 funct...
Sema4AI_actions
public
public
0
0
raise_action_error_action
def raise_action_error_action() -> Response[SomeData]:raise ActionError("Action error")
1
2
0
14
0
25
26
25
[]
Response[SomeData]
{}
1
2
1
["ActionError"]
0
[]
The function (raise_action_error_action) 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. It declare 1.0 function, and It has 1.0 func...
Sema4AI_actions
public
public
0
0
raise_action_error_action_not_response
def raise_action_error_action_not_response() -> str:raise ActionError("Action error")
1
2
0
11
0
30
31
30
[]
str
{}
1
2
1
["ActionError"]
0
[]
The function (raise_action_error_action_not_response) defined within the public class called public.The function start at line 30 and ends at 31. 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...
Sema4AI_actions
public
public
0
0
raise_action_error_other_not_response
def raise_action_error_other_not_response() -> str:raise RuntimeError("Some unknown error")
1
2
0
11
0
35
36
35
[]
str
{}
1
2
1
["RuntimeError"]
0
[]
The function (raise_action_error_other_not_response) defined within the public class called public.The function start at line 35 and ends at 36. 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 ...
Sema4AI_actions
public
public
0
0
bad_schema
def bad_schema() -> Response[str]:return 1# type: ignore
1
2
0
11
0
40
41
40
[]
Response[str]
{"Return": 1}
0
2
0
[]
0
[]
The function (bad_schema) defined within the public class called public.The function start at line 40 and ends at 41. 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_private
def get_private(private_info: Secret) -> str:"""Returns the value passed to the private key.Args:private_info: Some private info.Returns:The value of the private key."""return private_info.value
1
2
1
14
0
5
15
5
private_info
[]
str
{"Expr": 1, "Return": 1}
0
11
0
[]
2
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3915661_xeroc_python_graphenelib.tests.test_crypto_py.Testcases.test_BrainKey", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3915661_xeroc_python_graphenelib.tests.test_crypto_py.Testcases.test_BrainKey_sequences"]
The function (get_private) defined within the public class called public.The function start at line 5 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 has 2.0 functions calling this function which are ["_.con...
Sema4AI_actions
public
public
0
0
hello_greeting
def hello_greeting(name: str,oauth2_secret: OAuth2Secret[Literal["google"], list[Literal["https://scope:read", "https://scope:write"]]],) -> str:"""Provides a greeting for a person.Args:name: The name of the person to greet.oauth2_secret: Oauth2 informationReturns:The greeting for the person."""return f"Hello {name}. A...
1
7
2
34
0
7
23
7
name,oauth2_secret
[]
str
{"Expr": 1, "Return": 1}
1
17
1
["action"]
0
[]
The function (hello_greeting) defined within the public class called public.The function start at line 7 and ends at 23. It contains 7 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [7.0] and does not return any value. It declare 1.0 function, and It has 1.0 function calle...
Sema4AI_actions
public
public
0
0
action
def action(func: Callable) -> Callable:...
1
2
1
10
0
50
51
50
func
[]
Callable
{"Expr": 1}
0
2
0
[]
53
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3546011_hashdist_hashdist.hashdist.deps.argparse_py.ArgumentParser._parse_known_args", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3585282_geier_pycarddav.pycarddav.controllers.query_py.query", "_.content.gdrive.M...
The function (action) defined within the public class called public.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 value. It has 53.0 functions calling this function which are ["_.conten...
Sema4AI_actions
public
public
0
0
action
def action(*, is_consequential: Optional[bool] = None, display_name: Optional[str] = None) -> Callable:...
1
4
2
26
0
55
58
55
func
[]
Callable
{"Expr": 1}
0
2
0
[]
53
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3546011_hashdist_hashdist.hashdist.deps.argparse_py.ArgumentParser._parse_known_args", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3585282_geier_pycarddav.pycarddav.controllers.query_py.query", "_.content.gdrive.M...
The function (action) defined within the public class called public.The function start at line 55 and ends at 58. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [55.0] and does not return any value. It has 53.0 functions calling this function which are ["_.con...
Sema4AI_actions
public
public
0
0
action.decorator
def decorator(func, **kwargs):from sema4ai.actions import _hooksis_consequential = kwargs.pop("is_consequential", None)if is_consequential is not None:if not isinstance(is_consequential, bool):raise ValueError("Expected 'is_consequential' argument to be a boolean.")display_name = kwargs.pop("display_name", None)if disp...
8
29
2
139
0
90
127
90
null
[]
None
null
0
0
0
null
0
null
The function (action.decorator) defined within the public class called public.The function start at line 90 and ends at 127. It contains 29 lines of code and it has a cyclomatic complexity of 8. It takes 2 parameters, represented as [90.0] and does not return any value..
Sema4AI_actions
public
public
0
0
action
def action(*args, **kwargs):"""Decorator for actions (entry points) which can be executed by `sema4ai.actions`.i.e.:If a file such as actions.py has the contents below:```pythonfrom sema4ai.actions import action@actiondef enter_user() -> str:...```It'll be executable by sema4ai actions as:python -m sema4ai.actions run ...
3
5
2
45
3
61
132
61
func
['kind', 'is_consequential', 'display_name']
Callable
{"Expr": 1}
0
2
0
[]
53
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3546011_hashdist_hashdist.hashdist.deps.argparse_py.ArgumentParser._parse_known_args", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3585282_geier_pycarddav.pycarddav.controllers.query_py.query", "_.content.gdrive.M...
The function (action) defined within the public class called public.The function start at line 61 and ends at 132. It contains 5 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [61.0] and does not return any value. It has 53.0 functions calling this function which are ["_.co...
Sema4AI_actions
public
public
0
0
session_cache
def session_cache(func):"""Provides decorator which caches return and clears automatically when allactions have been run.A decorator which automatically cache the result of the given function andwill return it on any new invocation until sema4ai-actions finishes runningall actions.The function may be either a generator...
1
4
1
29
0
135
154
135
func
[]
Returns
{"Expr": 1, "Return": 1}
1
20
1
["_cache"]
0
[]
The function (session_cache) defined within the public class called public.The function start at line 135 and ends at 154. It contains 4 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 declare 1.0 function, and It has 1.0 function c...
Sema4AI_actions
public
public
0
0
action_cache
def action_cache(func):"""Provides decorator which caches return and clears it automatically when thecurrent action has been run.A decorator which automatically cache the result of the given function andwill return it on any new invocation until sema4ai-actions finishes runningthe current action.The function may be eit...
1
4
1
29
0
157
176
157
func
[]
Returns
{"Expr": 1, "Return": 1}
1
20
1
["_cache"]
0
[]
The function (action_cache) defined within the public class called public.The function start at line 157 and ends at 176. It contains 4 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 declare 1.0 function, and It has 1.0 function ca...
Sema4AI_actions
public
public
0
0
get_output_dir
def get_output_dir() -> Optional[Path]:"""Provide the output directory being used for the run or None if there's nooutput dir configured."""from sema4ai.actions._config import get_configconfig = get_config()if config is None:return Nonereturn config.output_dir
2
6
0
34
1
179
189
179
['config']
Optional[Path]
{"Assign": 1, "Expr": 1, "If": 1, "Return": 2}
1
11
1
["get_config"]
0
[]
The function (get_output_dir) defined within the public class called public.The function start at line 179 and ends at 189. 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 declare 1.0 function, and It has 1.0 function call...
Sema4AI_actions
public
public
0
0
get_current_action
def get_current_action() -> Optional[IAction]:"""Provides the action which is being currently run or None if not currentlyrunning an action."""from sema4ai.actions import _actionreturn _action.get_current_action()
1
3
0
22
0
192
199
192
[]
Optional[IAction]
{"Expr": 1, "Return": 1}
1
8
1
["_action.get_current_action"]
0
[]
The function (get_current_action) defined within the public class called public.The function start at line 192 and ends at 199. 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, and It has 1.0 function ...
Sema4AI_actions
public
public
0
0
get_provider_and_scope_from_annotation_args
def get_provider_and_scope_from_annotation_args(annotation_args, filename: str, name: str) -> tuple[str, list[str]]:from typing import get_args, get_originfrom sema4ai.actions._exceptions import ActionsCollectErrorerror_message = f"""Invalid OAuth2Secret annotation found.The OAuth2Secret must be parametrized with 2 arg...
13
40
3
222
8
25
96
25
annotation_args,filename,name
['provider_str', 'error_message', 'scopes', 'scope_args_literal', 'provider', 'provider_args', 'scope_args', 'scope_strs']
tuple[str, list[str]]
{"Assign": 8, "For": 1, "If": 8, "Return": 1}
20
72
20
["len", "ActionsCollectError", "get_origin", "ActionsCollectError", "get_origin", "ActionsCollectError", "get_args", "len", "ActionsCollectError", "isinstance", "ActionsCollectError", "get_args", "len", "ActionsCollectError", "get_origin", "ActionsCollectError", "get_args", "isinstance", "ActionsCollectError", "list"]
2
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.src.sema4ai.actions._action_py.Action.managed_params_schema", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.src.sema4ai.actions._secret._oauth2_secre...
The function (get_provider_and_scope_from_annotation_args) defined within the public class called public.The function start at line 25 and ends at 96. It contains 40 lines of code and it has a cyclomatic complexity of 13. It takes 3 parameters, represented as [25.0] and does not return any value. It declares 20.0 funct...
Sema4AI_actions
Action
public
0
0
__init__
def __init__(self,pm: PluginManager,module_name: str,module_file: str,method: typing.Callable,options: Optional[Dict] = None,):self._pm = pmself.module_name = module_nameself.filename = module_file or "<filename unavailable>"self.method = methodself.message = ""self.exc_info: Optional[OptExcInfo] = Noneself._status = S...
3
17
6
89
0
100
116
100
self,pm,module_name,module_file,method,options
[]
None
{"AnnAssign": 1, "Assign": 8}
0
17
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 Action.The function start at line 100 and ends at 116. It contains 17 lines of code and it has a cyclomatic complexity of 3. It takes 6 parameters, represented as [100.0] and does not return any value. It has 6243.0 functions calling this function which are...
Sema4AI_actions
Action
public
0
0
name
def name(self):return self.method.__code__.co_name
1
2
1
13
0
119
120
119
self
[]
Returns
{"Return": 1}
0
2
0
[]
9
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3537748_rainerf_ricodebug.src.plugins.Navigation.ctags_support_py.EntryNode.data", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3537748_rainerf_ricodebug.src.views.notificationframe_py.NotificationFrame.__init__", ...
The function (name) defined within the public class called Action.The function start at line 119 and ends at 120. 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 9.0 functions calling this function which are ["_.con...
Sema4AI_actions
Action
public
0
0
lineno
def lineno(self):return self.method.__code__.co_firstlineno
1
2
1
13
0
123
124
123
self
[]
Returns
{"Return": 1}
0
2
0
[]
2
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3689772_zalando_stups_senza.tests.test_error_handling_py.test_store_exception", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3689772_zalando_stups_senza.tests.test_error_handling_py.test_store_nested_exception"]
The function (lineno) defined within the public class called Action.The function start at line 123 and ends at 124. 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 2.0 functions calling this function which are ["_.c...
Sema4AI_actions
Action
public
0
0
run
def run(self, **kwargs):sig = inspect.signature(self.method)try:sig.bind(**kwargs)except Exception as e:raise RuntimeError(f"It's not possible to call the action: '{self.name}' because the passed arguments don't match the action signature.\nError: {e}")return self.method(**kwargs)
2
9
2
46
0
126
134
126
self,**kwargs
[]
Returns
{"Assign": 1, "Expr": 1, "Return": 1, "Try": 1}
4
9
4
["inspect.signature", "sig.bind", "RuntimeError", "self.method"]
596
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3511986_dart_archive_pub_dartlang.app.handlers.package_versions_py.PackageVersions.index", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3511986_dart_archive_pub_dartlang.third_party.cherrypy.test.benchmark_py.run_m...
The function (run) defined within the public class called Action.The function start at line 126 and ends at 134. It contains 9 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [126.0], and this function return a value. It declares 4.0 functions, It has 4.0 functions called in...
Sema4AI_actions
Action
public
0
0
_build_properties
def _build_properties(self,method_name: str,param_name: Optional[str],param_type: Any,description: str,kind: Literal["parameter", "return"],) -> Dict[str, Any]:"""Args:method_name: The name of the method for which properties are being built.param_name: The parameter name (may be None if it's a return)param_type: The ty...
10
47
6
230
0
136
206
136
self,method_name,param_name,param_type,description,kind
[]
Dict[str, Any]
{"Assign": 10, "Expr": 2, "If": 8, "Return": 2, "Try": 1}
12
71
12
["hasattr", "_obtain_raw_types_handler", "InvalidArgumentsError", "repr", "hasattr", "replace_refs", "param_type.model_json_schema", "ret.pop", "title", "param_name.replace", "title", "param_name.replace"]
0
[]
The function (_build_properties) defined within the public class called Action.The function start at line 136 and ends at 206. It contains 47 lines of code and it has a cyclomatic complexity of 10. It takes 6 parameters, represented as [136.0] and does not return any value. It declares 12.0 functions, and It has 12.0 ...
Sema4AI_actions
Action
public
0
0
managed_params_schema
def managed_params_schema(self) -> Dict[str, Any]:from typing import get_argsfrom sema4ai.actions._commands import _get_managed_param_type, _is_managed_parammanaged_params_schema: Dict[str, Any] = {}sig = inspect.signature(self.method)param_name_to_description = self._get_param_name_to_description()for param in sig.par...
6
27
1
192
0
209
250
209
self
[]
Dict[str, Any]
{"AnnAssign": 2, "Assign": 10, "For": 1, "If": 4, "Return": 1}
8
42
8
["inspect.signature", "self._get_param_name_to_description", "sig.parameters.values", "_is_managed_param", "_get_managed_param_type", "param_name_to_description.get", "get_args", "get_provider_and_scope_from_annotation_args"]
0
[]
The function (managed_params_schema) defined within the public class called Action.The function start at line 209 and ends at 250. It contains 27 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 8.0 functions, and It has 8.0 fun...
Sema4AI_actions
Action
public
0
0
_get_param_name_to_description
def _get_param_name_to_description(self) -> dict[str, str]:import docstring_parserparam_name_to_description: Dict[str, str] = {}doc = getattr(self.method, "__doc__", "")if doc:contents = docstring_parser.parse(doc)for docparam in contents.params:if docparam.description:param_name_to_description[docparam.arg_name] = doc...
4
10
1
72
0
252
263
252
self
[]
dict[str, str]
{"AnnAssign": 1, "Assign": 3, "For": 1, "If": 2, "Return": 1}
2
12
2
["getattr", "docstring_parser.parse"]
0
[]
The function (_get_param_name_to_description) defined within the public class called Action.The function start at line 252 and ends at 263. It contains 10 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 2.0 functions, and It ha...
Sema4AI_actions
Action
public
0
0
input_schema
def input_schema(self) -> Dict[str, Any]:from sema4ai.actions._commands import _is_managed_paramsig = inspect.signature(self.method)method_name = self.method.__code__.co_nametype_hints = get_type_hints(self.method)param_name_to_description: dict[str, str] = self._get_param_name_to_description()properties: Dict[str, Any...
6
33
1
230
0
266
307
266
self
[]
Dict[str, Any]
{"AnnAssign": 3, "Assign": 12, "Expr": 1, "For": 1, "If": 4, "Return": 1}
11
42
11
["inspect.signature", "get_type_hints", "self._get_param_name_to_description", "sig.parameters.values", "_is_managed_param", "type_hints.get", "param_name_to_description.get", "self._build_properties", "required.append", "hasattr", "default.model_dump"]
0
[]
The function (input_schema) defined within the public class called Action.The function start at line 266 and ends at 307. It contains 33 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 11.0 functions, and It has 11.0 functions ...
Sema4AI_actions
Action
public
0
0
output_schema
def output_schema(self) -> Dict[str, Any]:import docstring_parsermethod_name = self.method.__code__.co_nametype_hints = get_type_hints(self.method)doc = getattr(self.method, "__doc__", "")description = ""if doc:contents = docstring_parser.parse(doc)returns = contents.returnsif returns and returns.description:descriptio...
4
15
1
97
0
310
327
310
self
[]
Dict[str, Any]
{"Assign": 8, "If": 2, "Return": 1}
5
18
5
["get_type_hints", "getattr", "docstring_parser.parse", "self._build_properties", "type_hints.get"]
0
[]
The function (output_schema) defined within the public class called Action.The function start at line 310 and ends at 327. It contains 15 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 5.0 functions, and It has 5.0 functions c...
Sema4AI_actions
Action
public
0
0
status
def status(self) -> Status:return self._status
1
2
1
11
0
330
331
330
self
[]
Status
{"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 Action.The function start at line 330 and ends at 331. 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 ["_.content...
Sema4AI_actions
Action
public
0
0
status
def status(self, value: Status):self._status = Status(value)
1
2
2
17
0
334
335
334
self
[]
Status
{"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 Action.The function start at line 334 and ends at 335. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [334.0] and does not return any value. It has 1.0 function calling this function which is ["_.con...
Sema4AI_actions
Action
public
0
0
failed
def failed(self):return self._status == Status.FAIL
1
2
1
13
0
338
339
338
self
[]
Returns
{"Return": 1}
0
2
0
[]
0
[]
The function (failed) defined within the public class called Action.The function start at line 338 and ends at 339. 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..
Sema4AI_actions
Action
public
0
0
__typecheckself__
def __typecheckself__(self) -> None:from sema4ai.actions._protocols import check_implements_: IAction = check_implements(self)
1
3
1
23
0
341
344
341
self
[]
None
{"AnnAssign": 1}
1
4
1
["check_implements"]
0
[]
The function (__typecheckself__) defined within the public class called Action.The function start at line 341 and ends at 344. 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, and It has 1.0 function c...
Sema4AI_actions
Action
public
0
0
__str__
def __str__(self):return f"Action({self.name}, status: {self.status})"
1
2
1
8
0
346
347
346
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 Action.The function start at line 346 and ends at 347. 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 calling this function which are ["_...
Sema4AI_actions
public
public
0
0
set_current_action
def set_current_action(action: Optional[IAction]):_ActionContext._current_action = action
1
2
1
15
0
358
359
358
action
[]
None
{"Assign": 1}
0
2
0
[]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.src.sema4ai.actions._commands_py.run"]
The function (set_current_action) defined within the public class called public.The function start at line 358 and ends at 359. 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
public
public
0
0
get_current_action
def get_current_action() -> Optional[IAction]:return _ActionContext._current_action
1
2
0
13
0
362
363
362
[]
Optional[IAction]
{"Return": 1}
0
2
0
[]
0
[]
The function (get_current_action) defined within the public class called public.The function start at line 362 and ends at 363. 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
set_current_action_context
def set_current_action_context(action_context: Optional["ActionContext"]):_ActionContext._current_action_context = action_context
1
2
1
15
0
366
367
366
action_context
[]
None
{"Assign": 1}
0
2
0
[]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.src.sema4ai.actions._commands_py.run"]
The function (set_current_action_context) defined within the public class called public.The function start at line 366 and ends at 367. 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 ...
Sema4AI_actions
public
public
0
0
get_current_action_context
def get_current_action_context() -> Optional["ActionContext"]:return _ActionContext._current_action_context
1
2
0
13
0
370
371
370
[]
Optional['ActionContext']
{"Return": 1}
0
2
0
[]
0
[]
The function (get_current_action_context) defined within the public class called public.The function start at line 370 and ends at 371. 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
set_current_requests_contexts
def set_current_requests_contexts(requests_contexts: Optional["RequestContexts"]):_ActionContext._current_requests_contexts = requests_contexts
1
2
1
15
0
374
375
374
requests_contexts
[]
None
{"Assign": 1}
0
2
0
[]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.src.sema4ai.actions._commands_py.run"]
The function (set_current_requests_contexts) defined within the public class called public.The function start at line 374 and ends at 375. 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 functi...
Sema4AI_actions
public
public
0
0
get_current_requests_contexts
def get_current_requests_contexts() -> Optional["RequestContexts"]:return _ActionContext._current_requests_contexts
1
2
0
13
0
378
379
378
[]
Optional['RequestContexts']
{"Return": 1}
0
2
0
[]
4
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.src.sema4ai.actions._action_py.get_x_action_invocation_context", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.src.sema4ai.actions._secret._secret_py...
The function (get_current_requests_contexts) defined within the public class called public.The function start at line 378 and ends at 379. 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 funct...
Sema4AI_actions
public
public
0
0
get_x_action_invocation_context
def get_x_action_invocation_context() -> str:request_contexts = get_current_requests_contexts()if request_contexts is None or request_contexts.invocation_context is None:return "{}"# The value is the x-action-invocation-context to be used in the headerreturn request_contexts.invocation_context.initial_data
3
5
0
30
1
382
387
382
['request_contexts']
str
{"Assign": 1, "If": 1, "Return": 2}
1
6
1
["get_current_requests_contexts"]
4
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.src.sema4ai.actions.agent._client_py._AgentAPIClient._is_url_accessible", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.src.sema4ai.actions.agent._cl...
The function (get_x_action_invocation_context) defined within the public class called public.The function start at line 382 and ends at 387. It contains 5 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 declare 1.0 function, It has 1.0 f...
Sema4AI_actions
Action
public
0
0
__init__
def __init__(self, print_result: bool = False, json_output_file: Optional[str] = None):self._msg_len_target = 80self._print_result = print_resultself._json_output_file = json_output_file
1
6
3
35
0
412
417
412
self,pm,module_name,module_file,method,options
[]
None
{"AnnAssign": 1, "Assign": 8}
0
17
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 Action.The function start at line 412 and ends at 417. It contains 6 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [412.0] and does not return any value. It has 6243.0 functions calling this function which are ...
Sema4AI_actions
Context
public
0
0
_show_header
def _show_header(self, parts: List[Tuple[str, str]]) -> int:"""Returns:The final number of chars used in the full header."""if not parts:self.show("=" * self._msg_len_target)return self._msg_len_targettotal_len = sum(len(msg) for (msg, _) in parts)# + 2 for the spacing before after the '='.diff = self._msg_len_target -...
5
22
2
158
0
419
452
419
self,parts
[]
int
{"Assign": 9, "AugAssign": 3, "Expr": 5, "For": 1, "If": 2, "Return": 2}
10
34
10
["self.show", "sum", "len", "int", "len", "self.show", "len", "self.show", "len", "self.show"]
0
[]
The function (_show_header) defined within the public class called Context.The function start at line 419 and ends at 452. It contains 22 lines of code and it has a cyclomatic complexity of 5. It takes 2 parameters, represented as [419.0] and does not return any value. It declares 10.0 functions, and It has 10.0 funct...
Sema4AI_actions
Context
public
0
0
show
def show(self, msg: str, end: str = "\n", kind=KIND_REGULAR, flush: Optional[bool] = None):"""Shows a message to the user.Args:msg: The message to be shown.end: The end char to be added to the message.kind: The kind of the message.flush: Whether we should flush after sending the message (if None it's flushed if the end...
2
6
5
46
0
454
469
454
self,msg,end,kind,flush
[]
None
{"Assign": 1, "Expr": 2, "If": 1}
1
16
1
["console_message"]
30
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3578708_ulno_ulnoiot_upy.examples.lightboard.lightboard_test_py.show", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3578708_ulno_ulnoiot_upy.examples.lightboard.main_py.animation_next", "_.content.gdrive.MyDrive.Ph...
The function (show) defined within the public class called Context.The function start at line 454 and ends at 469. It contains 6 lines of code and it has a cyclomatic complexity of 2. It takes 5 parameters, represented as [454.0] and does not return any value. It declare 1.0 function, It has 1.0 function called inside ...
Sema4AI_actions
Context
public
0
0
show_error
def show_error(self, msg: str, flush: Optional[bool] = None):self.show(msg, kind=self.KIND_ERROR, flush=flush)
1
2
3
34
0
471
472
471
self,msg,flush
[]
None
{"Expr": 1}
1
2
1
["self.show"]
0
[]
The function (show_error) defined within the public class called Context.The function start at line 471 and ends at 472. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [471.0] and does not return any value. It declare 1.0 function, and It has 1.0 function cal...