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 | Context | public | 0 | 0 | _before_action_run | def _before_action_run(self, action: IAction):self._msg_len_target = 80self._msg_len_target = self._show_header([("Running: ", self.KIND_REGULAR), (action.name, self.KIND_TASK_NAME)]) | 1 | 5 | 2 | 42 | 0 | 474 | 478 | 474 | self,action | [] | None | {"Assign": 2} | 1 | 5 | 1 | ["self._show_header"] | 0 | [] | The function (_before_action_run) defined within the public class called Context.The function start at line 474 and ends at 478. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [474.0] and does not return any value. It declare 1.0 function, and It has 1.0 func... |
Sema4AI_actions | Context | public | 0 | 0 | _after_action_run | def _after_action_run(self, action: IAction):import jsonimport tracebackmsg = ""if action.message:msg = f"\n{action.message}"status_kind = self.KIND_REGULARif action.status == Status.FAIL:status_kind = self.KIND_ERRORshow = self.showresult = action.resultshow(f"{action.name}", end="", kind=self.KIND_TASK_NAME)show(" st... | 18 | 79 | 2 | 435 | 0 | 480 | 576 | 480 | self,action | [] | None | {"Assign": 18, "Expr": 14, "If": 11, "Try": 2} | 28 | 97 | 28 | ["show", "show", "show", "show", "self._show_header", "self.show", "join", "traceback.format_exception", "bool", "hasattr", "result.model_dump", "Path", "p.parent.mkdir", "p.write_text", "json.dumps", "show", "json.dumps", "RuntimeError", "show", "inspect.signature", "hasattr", "return_annotation.model_validate", "isin... | 0 | [] | The function (_after_action_run) defined within the public class called Context.The function start at line 480 and ends at 576. It contains 79 lines of code and it has a cyclomatic complexity of 18. It takes 2 parameters, represented as [480.0] and does not return any value. It declares 28.0 functions, and It has 28.0... |
Sema4AI_actions | Context | public | 0 | 0 | register_lifecycle_prints | def register_lifecycle_prints(self):from sema4ai.actions._hooks import after_action_run, before_action_runwith before_action_run.register(self._before_action_run), after_action_run.register(self._after_action_run):yield | 1 | 6 | 1 | 35 | 0 | 579 | 585 | 579 | self | [] | None | {"Expr": 1, "With": 1} | 2 | 7 | 2 | ["before_action_run.register", "after_action_run.register"] | 0 | [] | The function (register_lifecycle_prints) defined within the public class called Context.The function start at line 579 and ends at 585. It contains 6 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 | 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 | 587 | 590 | 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 587 and ends at 590. 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 | public | public | 0 | 0 | _get_str_list_from_env | def _get_str_list_from_env(env_name: str, env) -> List[str]:# Verify if it's an encrypted header.in_env: str = env.get(env_name, "")if not in_env:return []try:lst_info_to_decrypt = json.loads(in_env)except Exception:raise RuntimeError(f"Error: the {env_name} is expected to be a json list of strings, "f"however it canno... | 6 | 23 | 2 | 95 | 1 | 12 | 38 | 12 | env_name,env | ['lst_info_to_decrypt'] | List[str] | {"AnnAssign": 1, "Assign": 1, "For": 1, "If": 3, "Return": 2, "Try": 1} | 7 | 27 | 7 | ["env.get", "json.loads", "RuntimeError", "isinstance", "RuntimeError", "isinstance", "RuntimeError"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server._encryption_py.get_encryption_keys", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.src.sema4ai.actions._action_contex... | The function (_get_str_list_from_env) defined within the public class called public.The function start at line 12 and ends at 38. It contains 23 lines of code and it has a cyclomatic complexity of 6. It takes 2 parameters, represented as [12.0] and does not return any value. It declares 7.0 functions, It has 7.0 functi... |
Sema4AI_actions | public | public | 0 | 0 | _decrypt | def _decrypt(key: bytes, iv: bytes, ciphertext: bytes, tag: bytes) -> bytes:from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modesdecryptor = Cipher(algorithms.AES(key),modes.GCM(iv, tag),).decryptor()return decryptor.update(ciphertext) + decryptor.finalize() | 1 | 7 | 4 | 73 | 1 | 41 | 49 | 41 | key,iv,ciphertext,tag | ['decryptor'] | bytes | {"Assign": 1, "Return": 1} | 6 | 9 | 6 | ["decryptor", "Cipher", "algorithms.AES", "modes.GCM", "decryptor.update", "decryptor.finalize"] | 4 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.src.sema4ai.actions._action_context_py._decrypt_from_data_envelope", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.tests.actions_tests.test_action_co... | The function (_decrypt) defined within the public class called public.The function start at line 41 and ends at 49. It contains 7 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [41.0] and does not return any value. It declares 6.0 functions, It has 6.0 functions called insi... |
Sema4AI_actions | public | public | 0 | 0 | _is_robocorp_log_available | def _is_robocorp_log_available():# When frozen it can't really be used.import sysif getattr(sys, "frozen", False):return Falseif not hasattr(os, "__file__"):return Falsereturn True | 3 | 7 | 0 | 31 | 0 | 52 | 62 | 52 | [] | Returns | {"If": 2, "Return": 3} | 2 | 11 | 2 | ["getattr", "hasattr"] | 4 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.src.sema4ai.actions._action_context_py.ActionContext._hide_secrets", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.src.sema4ai.actions._action_contex... | The function (_is_robocorp_log_available) defined within the public class called public.The function start at line 52 and ends at 62. It contains 7 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters, and this function return a value. It declares 2.0 functions, It has 2.0 fu... | |
Sema4AI_actions | public | public | 0 | 0 | _decrypt_from_data_envelope | def _decrypt_from_data_envelope(encrypted_data: Dict[str, "JSONValue"],var_name: str,env: Optional[Dict[str, str]] = None,) -> "JSONValue":keys = _get_str_list_from_env("ACTION_SERVER_DECRYPT_KEYS", env=env or os.environ)if not keys:raise RuntimeError(f"The information in the {var_name} seems to be encrypted, but decry... | 13 | 61 | 3 | 268 | 7 | 65 | 137 | 65 | encrypted_data,var_name,env | ['auth_tag_decoded_base_64', 'cipher', 'auth_tag', 'iv', 'keys', 'raw_data', 'algorithm'] | 'JSONValue' | {"AnnAssign": 3, "Assign": 7, "For": 1, "If": 6, "Return": 1, "Try": 4} | 22 | 73 | 22 | ["_get_str_list_from_env", "RuntimeError", "isinstance", "RuntimeError", "isinstance", "RuntimeError", "isinstance", "RuntimeError", "isinstance", "RuntimeError", "base64.b64decode", "RuntimeError", "base64.b64decode", "RuntimeError", "base64.b64decode", "RuntimeError", "RuntimeError", "base64.b64decode", "key.encode",... | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.src.sema4ai.actions._action_context_py.BaseContext.value", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.src.sema4ai.actions._secret._secret_py._decr... | The function (_decrypt_from_data_envelope) defined within the public class called public.The function start at line 65 and ends at 137. It contains 61 lines of code and it has a cyclomatic complexity of 13. It takes 3 parameters, represented as [65.0] and does not return any value. It declares 22.0 functions, It has 22... |
Sema4AI_actions | BaseContext | public | 0 | 0 | __init__ | def __init__(self, data: str, env: Optional[Dict[str, str]] = None):"""Args:data: The data requested from that source.If encrypted, must be something as:base64(json.dumps({ cipher: blob_of_data algorithm: "aes256-gcm" iv: nonce}))Otherwise the payload should be passed directly,which should be something as:base64(json.d... | 5 | 19 | 3 | 128 | 0 | 149 | 208 | 149 | self,data,env | [] | None | {"AnnAssign": 2, "Assign": 5, "Expr": 2, "If": 2} | 8 | 60 | 8 | ["json.loads", "decode", "base64.b64decode", "data.encode", "isinstance", "RuntimeError", "self._header_name", "self._hide_secrets"] | 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 BaseContext.The function start at line 149 and ends at 208. It contains 19 lines of code and it has a cyclomatic complexity of 5. It takes 3 parameters, represented as [149.0] and does not return any value. It declares 8.0 functions, It has 8.0 functions ca... |
Sema4AI_actions | BaseContext | public | 0 | 0 | initial_data | def initial_data(self) -> str:"""The initial data received from the request (x-action-context header)."""return self._initial_data | 1 | 2 | 1 | 12 | 0 | 211 | 215 | 211 | self | [] | str | {"Expr": 1, "Return": 1} | 0 | 5 | 0 | [] | 0 | [] | The function (initial_data) defined within the public class called BaseContext.The function start at line 211 and ends at 215. 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 | BaseContext | public | 0 | 0 | value | def value(self) -> "JSONValue":from typing import Any# Data already decryptedtry:return self._raw_dataexcept AttributeError:passif not self._encrypted:raise RuntimeError("Expected data to be encrypted if it reached here!")ctx: Anyif _is_robocorp_log_available():from robocorp import logctx = log.suppress()else:from cont... | 5 | 27 | 1 | 114 | 0 | 218 | 253 | 218 | self | [] | 'JSONValue' | {"AnnAssign": 1, "Assign": 4, "Expr": 1, "If": 3, "Return": 2, "Try": 1, "With": 1} | 10 | 36 | 10 | ["RuntimeError", "_is_robocorp_log_available", "log.suppress", "nullcontext", "_decrypt_from_data_envelope", "self._header_name", "isinstance", "RuntimeError", "self._header_name", "self._hide_secrets"] | 27 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3511986_dart_archive_pub_dartlang.third_party.cherrypy.test.test_config_py.setup_server", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3676862_pecan_pecan.pecan.hooks_py.RequestViewerHook.after", "_.content.gdrive.... | The function (value) defined within the public class called BaseContext.The function start at line 218 and ends at 253. It contains 27 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 10.0 functions, It has 10.0 functions called ... |
Sema4AI_actions | BaseContext | public | 0 | 0 | _hide_secrets | def _hide_secrets(self):"""Subclasses can implement this method to hide sensitive data.""" | 1 | 1 | 1 | 6 | 0 | 255 | 258 | 255 | self | [] | None | {"Expr": 1} | 0 | 4 | 0 | [] | 0 | [] | The function (_hide_secrets) defined within the public class called BaseContext.The function start at line 255 and ends at 258. 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 | BaseContext | public | 0 | 0 | _header_name | def _header_name(cls) -> str:raise NotImplementedError("Subclasses should implement this method.") | 1 | 2 | 1 | 12 | 0 | 261 | 262 | 261 | cls | [] | str | {} | 1 | 2 | 1 | ["NotImplementedError"] | 0 | [] | The function (_header_name) defined within the public class called BaseContext.The function start at line 261 and ends at 262. 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 c... |
Sema4AI_actions | BaseContext | public | 0 | 0 | from_request | def from_request(cls, request: Optional["Request"]) -> Optional["BaseContext"]:if not request:return Nonedata = request.headers.get(cls._header_name())if data is None:return Nonereturn cls(data) | 3 | 7 | 2 | 49 | 0 | 265 | 271 | 265 | cls,request | [] | Optional['BaseContext'] | {"Assign": 1, "If": 2, "Return": 3} | 3 | 7 | 3 | ["request.headers.get", "cls._header_name", "cls"] | 0 | [] | The function (from_request) defined within the public class called BaseContext.The function start at line 265 and ends at 271. It contains 7 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [265.0] and does not return any value. It declares 3.0 functions, and It has 3.0 func... |
Sema4AI_actions | BaseContext | public | 0 | 0 | _header_name | def _header_name(cls) -> str:return "x-action-context" | 1 | 2 | 1 | 9 | 0 | 276 | 277 | 276 | cls | [] | str | {} | 1 | 2 | 1 | ["NotImplementedError"] | 0 | [] | The function (_header_name) defined within the public class called BaseContext.The function start at line 276 and ends at 277. 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 c... |
Sema4AI_actions | BaseContext | public | 0 | 0 | _hide_secrets | def _hide_secrets(self):secrets = self._raw_data.get("secrets")if secrets and isinstance(secrets, dict):if _is_robocorp_log_available():from robocorp import logfor secret_value in secrets.values():if isinstance(secret_value, str):log.hide_from_output(secret_value)log.hide_from_output(repr(secret_value)) | 6 | 9 | 1 | 66 | 0 | 279 | 288 | 279 | self | [] | None | {"Expr": 1} | 0 | 4 | 0 | [] | 0 | [] | The function (_hide_secrets) defined within the public class called BaseContext.The function start at line 279 and ends at 288. It contains 9 lines of code and it has a cyclomatic complexity of 6. The function does not take any parameters and does not return any value.. |
Sema4AI_actions | BaseContext | public | 0 | 0 | _header_name | def _header_name(cls) -> str:return "x-action-context" | 1 | 2 | 1 | 9 | 0 | 293 | 294 | 276 | cls | [] | str | {} | 1 | 2 | 1 | ["NotImplementedError"] | 0 | [] | The function (_header_name) defined within the public class called BaseContext.The function start at line 293 and ends at 294. 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 c... |
Sema4AI_actions | BaseContext | public | 0 | 0 | _hide_secrets | def _hide_secrets(self):data_server_config = self._raw_data.get("data-server")if data_server_config and isinstance(data_server_config, dict):if _is_robocorp_log_available():from robocorp import logif isinstance(data_server_config, dict):secret_value = data_server_config.get("password")if isinstance(secret_value, str):l... | 6 | 10 | 1 | 73 | 0 | 296 | 306 | 296 | self | [] | None | {"Expr": 1} | 0 | 4 | 0 | [] | 0 | [] | The function (_hide_secrets) defined within the public class called BaseContext.The function start at line 296 and ends at 306. It contains 10 lines of code and it has a cyclomatic complexity of 6. The function does not take any parameters and does not return any value.. |
Sema4AI_actions | BaseContext | public | 0 | 0 | _header_name | def _header_name(cls) -> str:return "x-action-context" | 1 | 2 | 1 | 9 | 0 | 321 | 322 | 276 | cls | [] | str | {} | 1 | 2 | 1 | ["NotImplementedError"] | 0 | [] | The function (_header_name) defined within the public class called BaseContext.The function start at line 321 and ends at 322. 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 c... |
Sema4AI_actions | BaseContext | public | 0 | 0 | __init__ | def __init__(self, request: Optional["Request"]):self._request = requestself._data_context: Optional[DataContext] = Noneself._action_context: Optional[ActionContext] = Noneself._invocation_context: Optional[InvocationContext] = None | 1 | 5 | 2 | 47 | 0 | 326 | 330 | 326 | self,data,env | [] | None | {"AnnAssign": 2, "Assign": 5, "Expr": 2, "If": 2} | 8 | 60 | 8 | ["json.loads", "decode", "base64.b64decode", "data.encode", "isinstance", "RuntimeError", "self._header_name", "self._hide_secrets"] | 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 BaseContext.The function start at line 326 and ends at 330. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [326.0] and does not return any value. It declares 8.0 functions, It has 8.0 functions cal... |
Sema4AI_actions | RequestContexts | public | 0 | 0 | request | def request(self) -> Optional["Request"]:return self._request | 1 | 2 | 1 | 14 | 0 | 333 | 334 | 333 | self | [] | Optional['Request'] | {"Return": 1} | 0 | 2 | 0 | [] | 58 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3392496_unipitechnology_evok.examples.benchmark_py.main", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3527220_mitar_django_mongo_auth.mongo_auth.models_py.User.get_image_url", "_.content.gdrive.MyDrive.Phd_Thesis.... | The function (request) defined within the public class called RequestContexts.The function start at line 333 and ends at 334. 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 58.0 functions calling this function which ar... |
Sema4AI_actions | RequestContexts | public | 0 | 0 | data_context | def data_context(self) -> Optional[DataContext]:if self._data_context is None and self._request is not None:self._data_context = typing.cast(DataContext, DataContext.from_request(self._request))return self._data_context | 3 | 6 | 1 | 47 | 0 | 337 | 342 | 337 | self | [] | Optional[DataContext] | {"Assign": 1, "If": 1, "Return": 1} | 2 | 6 | 2 | ["typing.cast", "DataContext.from_request"] | 0 | [] | The function (data_context) defined within the public class called RequestContexts.The function start at line 337 and ends at 342. It contains 6 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 2.0 functions, and It has 2.0 func... |
Sema4AI_actions | RequestContexts | public | 0 | 0 | action_context | def action_context(self) -> Optional[ActionContext]:if self._action_context is None and self._request is not None:self._action_context = typing.cast(ActionContext, ActionContext.from_request(self._request))return self._action_context | 3 | 6 | 1 | 47 | 0 | 345 | 350 | 345 | self | [] | Optional[ActionContext] | {"Assign": 1, "If": 1, "Return": 1} | 2 | 6 | 2 | ["typing.cast", "ActionContext.from_request"] | 0 | [] | The function (action_context) defined within the public class called RequestContexts.The function start at line 345 and ends at 350. It contains 6 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 2.0 functions, and It has 2.0 fu... |
Sema4AI_actions | RequestContexts | public | 0 | 0 | invocation_context | def invocation_context(self) -> Optional[InvocationContext]:if self._invocation_context is None and self._request is not None:self._invocation_context = typing.cast(InvocationContext, InvocationContext.from_request(self._request))return self._invocation_context | 3 | 6 | 1 | 47 | 0 | 353 | 358 | 353 | self | [] | Optional[InvocationContext] | {"Assign": 1, "If": 1, "Return": 1} | 2 | 6 | 2 | ["typing.cast", "InvocationContext.from_request"] | 0 | [] | The function (invocation_context) defined within the public class called RequestContexts.The function start at line 353 and ends at 358. It contains 6 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 2.0 functions, and It has 2.... |
Sema4AI_actions | _ArgDispatcher | protected | 0 | 0 | __init__ | def __init__(self):self._name_to_func = {} | 1 | 2 | 1 | 11 | 0 | 14 | 15 | 14 | self | [] | 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 _ArgDispatcher.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 has 6243.0 functions calling this function which... |
Sema4AI_actions | _ArgDispatcher | protected | 0 | 0 | register | def register(self, name: str, func):self._name_to_func[name] = func | 1 | 2 | 3 | 19 | 0 | 17 | 18 | 17 | self,name,func | [] | None | {"Assign": 1} | 0 | 2 | 0 | [] | 904 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3625043_uber_tchannel_python.tests.integration.json.test_json_server_py.json_server", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3625043_uber_tchannel_python.tests.integration.test_error_handling_py.mock_server",... | The function (register) defined within the protected class called _ArgDispatcher.The function start at line 17 and ends at 18. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [17.0] and does not return any value. It has 904.0 functions calling this function whi... |
Sema4AI_actions | _ArgDispatcher | protected | 0 | 0 | _get_description | def _get_description(self):return "Sema4.ai framework for AI actions." | 1 | 2 | 1 | 7 | 0 | 20 | 21 | 20 | self | [] | Returns | {"Return": 1} | 0 | 2 | 0 | [] | 0 | [] | The function (_get_description) defined within the protected class called _ArgDispatcher.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 this function return a value.. |
Sema4AI_actions | _ArgDispatcher | protected | 0 | 0 | _add_action_argument | def _add_action_argument(self, run_parser):run_parser.add_argument("-a","--action",dest="action_name",help="The name of the action that should be run.",action="append",) | 1 | 8 | 2 | 28 | 0 | 23 | 30 | 23 | self,run_parser | [] | None | {"Expr": 1} | 1 | 8 | 1 | ["run_parser.add_argument"] | 0 | [] | The function (_add_action_argument) defined within the protected class called _ArgDispatcher.The function start at line 23 and ends at 30. It contains 8 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [23.0] and does not return any value. It declare 1.0 function, and It has... |
Sema4AI_actions | _ArgDispatcher | protected | 0 | 0 | _add_lint_argument | def _add_lint_argument(self, parser):parser.add_argument("--skip-lint",dest="skip_lint",action="store_true",default=False,help="Skip `@action` linting when an action is found (by default any ""`@action` is linted for errors when found).",) | 1 | 9 | 2 | 31 | 0 | 32 | 40 | 32 | self,parser | [] | None | {"Expr": 1} | 1 | 9 | 1 | ["parser.add_argument"] | 0 | [] | The function (_add_lint_argument) defined within the protected class called _ArgDispatcher.The function start at line 32 and ends at 40. It contains 9 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [32.0] and does not return any value. It declare 1.0 function, and It has 1... |
Sema4AI_actions | _ArgDispatcher | protected | 0 | 0 | _create_run_parser | def _create_run_parser(self, main_parser):# Runrun_parser = main_parser.add_parser("run",help="Collects actions with the @action decorator and all actions that matches based on the action name filter.",)run_parser.add_argument(dest="path",help="The directory or file with the actions to run.",nargs="?",default=".",)run_... | 1 | 116 | 2 | 372 | 0 | 42 | 166 | 42 | self,main_parser | [] | Returns | {"Assign": 1, "Expr": 17, "Return": 1} | 18 | 125 | 18 | ["main_parser.add_parser", "run_parser.add_argument", "run_parser.add_argument", "self._add_action_argument", "run_parser.add_argument", "run_parser.add_argument", "run_parser.add_argument", "run_parser.add_argument", "run_parser.add_argument", "run_parser.add_argument", "run_parser.add_argument", "run_parser.add_argum... | 0 | [] | The function (_create_run_parser) defined within the protected class called _ArgDispatcher.The function start at line 42 and ends at 166. It contains 116 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [42.0], and this function return a value. It declares 18.0 functions, and... |
Sema4AI_actions | _ArgDispatcher | protected | 0 | 0 | _create_list_actions_parser | def _create_list_actions_parser(self, main_parser):# List actionslist_parser = main_parser.add_parser("list",help="Provides output to stdout with json contents of the actions available.",)list_parser.add_argument(dest="path",help="The directory or file from where the actions should be listed (default is the current dir... | 1 | 19 | 2 | 63 | 0 | 168 | 189 | 168 | self,main_parser | [] | Returns | {"Assign": 1, "Expr": 3, "Return": 1} | 4 | 22 | 4 | ["main_parser.add_parser", "list_parser.add_argument", "list_parser.add_argument", "self._add_lint_argument"] | 0 | [] | The function (_create_list_actions_parser) defined within the protected class called _ArgDispatcher.The function start at line 168 and ends at 189. It contains 19 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [168.0], and this function return a value. It declares 4.0 funct... |
Sema4AI_actions | _ArgDispatcher | protected | 0 | 0 | _create_metadata_parser | def _create_metadata_parser(self, main_parser):# Collect actions metadatametadata_parser = main_parser.add_parser("metadata",help="Provides output to stdout with json contents of the metadata available.",)metadata_parser.add_argument(dest="path",help="The directory or file from where the metadata should be collected (d... | 1 | 19 | 2 | 63 | 0 | 191 | 212 | 191 | self,main_parser | [] | Returns | {"Assign": 1, "Expr": 3, "Return": 1} | 4 | 22 | 4 | ["main_parser.add_parser", "metadata_parser.add_argument", "metadata_parser.add_argument", "self._add_lint_argument"] | 0 | [] | The function (_create_metadata_parser) defined within the protected class called _ArgDispatcher.The function start at line 191 and ends at 212. It contains 19 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [191.0], and this function return a value. It declares 4.0 functions... |
Sema4AI_actions | _ArgDispatcher | protected | 0 | 0 | _create_argparser | def _create_argparser(self):import argparseparser = argparse.ArgumentParser(prog=_constants.MODULE_ENTRY_POINT,description=self._get_description(),epilog="View https://github.com/sema4ai/actions for more information",)subparsers = parser.add_subparsers(dest="command")self._create_run_parser(subparsers)self._create_list... | 1 | 12 | 1 | 62 | 0 | 214 | 227 | 214 | self | [] | Returns | {"Assign": 2, "Expr": 3, "Return": 1} | 6 | 14 | 6 | ["argparse.ArgumentParser", "self._get_description", "parser.add_subparsers", "self._create_run_parser", "self._create_list_actions_parser", "self._create_metadata_parser"] | 0 | [] | The function (_create_argparser) defined within the protected class called _ArgDispatcher.The function start at line 214 and ends at 227. It contains 12 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 6.0 functions, and It ... |
Sema4AI_actions | _ArgDispatcher | protected | 0 | 0 | parse_args | def parse_args(self, args: List[str]):log.debug("Processing args: %s", " ".join(args))additional_args = []new_args = []for i, arg in enumerate(args):if arg == "--":# argparse.REMAINDER is buggy:# https://bugs.python.org/issue17050# So, remove '--' and everything after from what's passed to# argparser.additional_args.ex... | 4 | 14 | 2 | 92 | 0 | 229 | 248 | 229 | self,args | [] | Returns | {"Assign": 5, "Expr": 3, "For": 1, "If": 2, "Return": 1} | 7 | 20 | 7 | ["log.debug", "join", "enumerate", "additional_args.extend", "new_args.append", "self._create_argparser", "parser.parse_args"] | 98 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3544475_chromium_web_page_replay.adb_install_cert_py.main", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3598540_saltstack_salt_testing.salttesting.runtests_py.SaltRuntests.parse_args", "_.content.gdrive.MyDrive.Ph... | The function (parse_args) defined within the protected class called _ArgDispatcher.The function start at line 229 and ends at 248. It contains 14 lines of code and it has a cyclomatic complexity of 4. It takes 2 parameters, represented as [229.0], and this function return a value. It declares 7.0 functions, It has 7.0 ... |
Sema4AI_actions | _ArgDispatcher | protected | 0 | 0 | __init__ | def __init__(self, *args, **kwargs) -> None:super().__init__(*args, **kwargs)self.register("list", self._list)self.register("run", self._run)self.register("metadata", self._metadata)self._pm: Optional[PluginManager] = None | 1 | 6 | 3 | 65 | 0 | 252 | 257 | 252 | self | [] | 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 _ArgDispatcher.The function start at line 252 and ends at 257. It contains 6 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [252.0] and does not return any value. It has 6243.0 functions calling this function... |
Sema4AI_actions | public | public | 0 | 0 | _register_lint.on_func_found | def on_func_found(func, *args, **kwargs) -> None:import jsonfrom sema4ai.actions._lint_action import (DiagnosticSeverity,DiagnosticsTypedDict,LintResultTypedDict,)filename = Path(func.__code__.co_filename).absolute()if filename not in files_found:files_found.add(filename)errors = list(x.to_lsp_diagnostic()for x in _lin... | 8 | 36 | 3 | 189 | 0 | 268 | 310 | 268 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (_register_lint.on_func_found) defined within the public class called public.The function start at line 268 and ends at 310. It contains 36 lines of code and it has a cyclomatic complexity of 8. It takes 3 parameters, represented as [268.0] and does not return any value.. |
Sema4AI_actions | _ActionsArgDispatcher | protected | 0 | 1 | _register_lint | def _register_lint(self, stream: typing.IO):from pathlib import Pathfrom sema4ai.actions import _hooks, _lint_actionfrom sema4ai.actions._lint_action import format_lint_resultsfiles_found = set()def on_func_found(func, *args, **kwargs) -> None:import jsonfrom sema4ai.actions._lint_action import (DiagnosticSeverity,Diag... | 1 | 8 | 2 | 49 | 0 | 260 | 313 | 260 | self,stream | [] | None | {"AnnAssign": 2, "Assign": 7, "Expr": 7, "For": 1, "If": 5, "With": 1} | 17 | 54 | 17 | ["set", "absolute", "Path", "files_found.add", "list", "x.to_lsp_diagnostic", "_lint_action.iter_lint_errors", "filename.read_bytes", "str", "stream.write", "json.dumps", "stream.flush", "sys.exit", "format_lint_results", "sys.stderr.write", "sys.stderr.flush", "_hooks.on_action_func_found.register"] | 0 | [] | The function (_register_lint) defined within the protected class called _ActionsArgDispatcher, that inherit another class.The function start at line 260 and ends at 313. It contains 8 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [260.0] and does not return any value. It d... |
Sema4AI_actions | _ActionsArgDispatcher | protected | 0 | 1 | _list | def _list(self, *args, **kwargs):from contextlib import nullcontext, redirect_stdoutfrom sema4ai.actions import _commandsskip_lint = kwargs.pop("skip_lint", True)original_stdout = sys.stdoutwith redirect_stdout(sys.stderr):ctx = (self._register_lint(original_stdout) if not skip_lint else nullcontext())with ctx:return _... | 2 | 13 | 3 | 81 | 0 | 315 | 331 | 315 | self,*args,**kwargs | [] | Returns | {"Assign": 3, "Return": 1, "With": 2} | 5 | 17 | 5 | ["kwargs.pop", "redirect_stdout", "self._register_lint", "nullcontext", "_commands.list_actions"] | 0 | [] | The function (_list) defined within the protected class called _ActionsArgDispatcher, that inherit another class.The function start at line 315 and ends at 331. It contains 13 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [315.0], and this function return a value. It decla... |
Sema4AI_actions | _ActionsArgDispatcher | protected | 0 | 1 | _metadata | def _metadata(self, *args, **kwargs):from contextlib import nullcontext, redirect_stdoutfrom sema4ai.actions import _commandsskip_lint = kwargs.pop("skip_lint", True)original_stdout = sys.stdoutwith redirect_stdout(sys.stderr):ctx = (self._register_lint(original_stdout) if not skip_lint else nullcontext())with ctx:retu... | 2 | 11 | 3 | 81 | 0 | 333 | 347 | 333 | self,*args,**kwargs | [] | Returns | {"Assign": 3, "Return": 1, "With": 2} | 5 | 15 | 5 | ["kwargs.pop", "redirect_stdout", "self._register_lint", "nullcontext", "_commands.metadata"] | 0 | [] | The function (_metadata) defined within the protected class called _ActionsArgDispatcher, that inherit another class.The function start at line 333 and ends at 347. It contains 11 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [333.0], and this function return a value. It d... |
Sema4AI_actions | _ActionsArgDispatcher | protected | 0 | 1 | _run | def _run(self, *args, **kwargs):from sema4ai.actions import _commandsreturn _commands.run(*args, **kwargs) | 1 | 3 | 3 | 28 | 0 | 349 | 352 | 349 | self,*args,**kwargs | [] | Returns | {"Return": 1} | 1 | 4 | 1 | ["_commands.run"] | 10 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3689772_zalando_stups_senza.tests.test_cli_py.test_traffic_fallback_route53api", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3963099_pgjones_hypercorn.src.hypercorn.asyncio.run_py.asyncio_worker", "_.content.gdriv... | The function (_run) defined within the protected class called _ActionsArgDispatcher, that inherit another class.The function start at line 349 and ends at 352. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [349.0], and this function return a value. It declare... |
Sema4AI_actions | _ActionsArgDispatcher | protected | 0 | 1 | _dispatch | def _dispatch(self, parsed, pm: Optional[PluginManager] = None) -> int:# Custom dispatch as we need to account for custom flags.if not parsed.command:self._create_argparser().print_help()return 1method = self._name_to_func[parsed.command]dct = parsed.__dict__.copy()dct.pop("command")dct["pm"] = pmself._pm = pmreturn me... | 2 | 10 | 3 | 77 | 0 | 354 | 366 | 354 | self,parsed,pm | [] | int | {"Assign": 4, "Expr": 2, "If": 1, "Return": 2} | 5 | 13 | 5 | ["print_help", "self._create_argparser", "parsed.__dict__.copy", "dct.pop", "method"] | 0 | [] | The function (_dispatch) defined within the protected class called _ActionsArgDispatcher, that inherit another class.The function start at line 354 and ends at 366. It contains 10 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [354.0] and does not return any value. It decla... |
Sema4AI_actions | _ActionsArgDispatcher | protected | 0 | 1 | process_args | def process_args(self, args: List[str], pm: Optional[PluginManager] = None) -> int:"""Processes the arguments and return the returncode."""try:parsed = self.parse_args(args)except SystemExit as e:code = e.codeif isinstance(code, int):return codeif code is None:return 0return int(code)return self._dispatch(parsed, pm) | 4 | 11 | 3 | 75 | 0 | 368 | 382 | 368 | self,args,pm | [] | int | {"Assign": 2, "Expr": 1, "If": 2, "Return": 4, "Try": 1} | 4 | 15 | 4 | ["self.parse_args", "isinstance", "int", "self._dispatch"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94464461_kabachuha_sd_webui_text2video.scripts.modelscope.process_modelscope_py.process_modelscope", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94464461_kabachuha_sd_webui_text2video.scripts.videocrafter.process_... | The function (process_args) defined within the protected class called _ActionsArgDispatcher, that inherit another class.The function start at line 368 and ends at 382. It contains 11 lines of code and it has a cyclomatic complexity of 4. It takes 3 parameters, represented as [368.0] and does not return any value. It de... |
Sema4AI_actions | OnExitContextManager | public | 0 | 0 | __init__ | def __init__(self, on_exit):self.on_exit = on_exit | 1 | 2 | 2 | 12 | 0 | 7 | 8 | 7 | self,on_exit | [] | 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 public class called OnExitContextManager.The function start at line 7 and ends at 8. 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 has 6243.0 functions calling this function wh... |
Sema4AI_actions | OnExitContextManager | public | 0 | 0 | __enter__ | def __enter__(self):pass | 1 | 2 | 1 | 6 | 0 | 10 | 11 | 10 | self | [] | None | {} | 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 public class called OnExitContextManager.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 has 4.0 functions calling this function whic... |
Sema4AI_actions | OnExitContextManager | public | 0 | 0 | __exit__ | def __exit__(self, exc_type, exc_val, exc_tb):self.on_exit() | 1 | 2 | 4 | 16 | 0 | 13 | 14 | 13 | self,exc_type,exc_val,exc_tb | [] | None | {"Expr": 1} | 1 | 2 | 1 | ["self.on_exit"] | 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 public class called OnExitContextManager.The function start at line 13 and ends at 14. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [13.0] and does not return any value. It declare 1.0 function, It has 1.0 function ... |
Sema4AI_actions | OnExitContextManager | public | 0 | 0 | __init__ | def __init__(self, reversed=False, raise_exceptions=False):self.raise_exceptions = raise_exceptionsself._reversed = reversedself._callbacks = () | 1 | 4 | 3 | 29 | 0 | 24 | 27 | 24 | self,on_exit | [] | 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 public class called OnExitContextManager.The function start at line 24 and ends at 27. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [24.0] and does not return any value. It has 6243.0 functions calling this function... |
Sema4AI_actions | Callback | public | 0 | 0 | register | def register(self, callback):self._callbacks = self._callbacks + (callback,)# Enable using as a context manager to automatically call the unregister.return OnExitContextManager(lambda: self.unregister(callback)) | 1 | 3 | 2 | 31 | 0 | 29 | 33 | 29 | self,callback | [] | Returns | {"Assign": 1, "Return": 1} | 2 | 5 | 2 | ["OnExitContextManager", "self.unregister"] | 904 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3625043_uber_tchannel_python.tests.integration.json.test_json_server_py.json_server", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3625043_uber_tchannel_python.tests.integration.test_error_handling_py.mock_server",... | The function (register) defined within the public class called Callback.The function start at line 29 and ends at 33. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [29.0], and this function return a value. It declares 2.0 functions, It has 2.0 functions calle... |
Sema4AI_actions | Callback | public | 0 | 0 | unregister | def unregister(self, callback):self._callbacks = tuple(x for x in self._callbacks if x != callback) | 3 | 2 | 2 | 25 | 0 | 35 | 36 | 35 | self,callback | [] | None | {"Assign": 1} | 1 | 2 | 1 | ["tuple"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.src.sema4ai.actions._hooks_py.SessionCallback.unregister"] | The function (unregister) defined within the public class called Callback.The function start at line 35 and ends at 36. It contains 2 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [35.0] and does not return any value. It declare 1.0 function, It has 1.0 function called ins... |
Sema4AI_actions | Callback | public | 0 | 0 | __len__ | def __len__(self):return len(self._callbacks) | 1 | 2 | 1 | 12 | 0 | 38 | 39 | 38 | self | [] | Returns | {"Return": 1} | 1 | 2 | 1 | ["len"] | 3 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3987994_yoshiko2_av_data_capture.number_parser_py.get_number", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69765524_openshift_elliott.elliottlib.model_py.ListModel.__getitem__", "_.content.gdrive.MyDrive.Phd_Thesi... | The function (__len__) defined within the public class called Callback.The function start at line 38 and ends at 39. 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 declare 1.0 function, It has 1.0 function called insid... |
Sema4AI_actions | Callback | public | 0 | 0 | __call__ | def __call__(self, *args, **kwargs):if self._reversed:iter_in = reversed(self._callbacks)else:iter_in = self._callbacksfor c in iter_in:try:c(*args, **kwargs)except Exception as e:from sema4ai.actions._exceptions import ActionsCollectErrorif not isinstance(e, ActionsCollectError) or not self.raise_exceptions:logger.exc... | 7 | 14 | 3 | 86 | 0 | 41 | 56 | 41 | self,*args,**kwargs | [] | None | {"Assign": 2, "Expr": 2, "For": 1, "If": 3, "Try": 1} | 4 | 16 | 4 | ["reversed", "c", "isinstance", "logger.exception"] | 50 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3561509_collective_solgema_fullcalendar.Solgema.fullcalendar.browser.views_py.SolgemaFullcalendarEventJS.__call__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3598540_saltstack_salt_testing.salttesting.runtests_p... | The function (__call__) defined within the public class called Callback.The function start at line 41 and ends at 56. It contains 14 lines of code and it has a cyclomatic complexity of 7. It takes 3 parameters, represented as [41.0] and does not return any value. It declares 4.0 functions, It has 4.0 functions called i... |
Sema4AI_actions | public | public | 0 | 0 | _check_matches | def _check_matches(patterns: List[str], paths: List[str]) -> bool:if not patterns and not paths:# Matched to the end.return Trueif (not patterns and paths) or (patterns and not paths):return Falsepattern = patterns[0]path = paths[0]if not glob.has_magic(pattern):if pattern != path:return Falseelif pattern == "**":if le... | 14 | 19 | 2 | 145 | 2 | 37 | 66 | 37 | patterns,paths | ['pattern', 'path'] | bool | {"Assign": 2, "For": 1, "If": 8, "Return": 7} | 7 | 30 | 7 | ["glob.has_magic", "len", "range", "len", "_check_matches", "fnmatch.fnmatch", "_check_matches"] | 4 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server.package.package_exclude_py._check_matches", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_se... | The function (_check_matches) defined within the public class called public.The function start at line 37 and ends at 66. It contains 19 lines of code and it has a cyclomatic complexity of 14. It takes 2 parameters, represented as [37.0] and does not return any value. It declares 7.0 functions, It has 7.0 functions cal... |
Sema4AI_actions | public | public | 0 | 0 | _glob_matches_path | def _glob_matches_path(path: str, pattern: str, sep: str = os.sep, altsep: str | None = os.altsep):if altsep:pattern = pattern.replace(altsep, sep)path = path.replace(altsep, sep)patterns = pattern.split(sep)paths = path.split(sep)if paths:if paths[0] == "":paths = paths[1:]if patterns:if patterns[0] == "":patterns = p... | 6 | 15 | 4 | 111 | 4 | 69 | 85 | 69 | path,pattern,sep,altsep | ['patterns', 'pattern', 'path', 'paths'] | Returns | {"Assign": 6, "If": 5, "Return": 1} | 5 | 17 | 5 | ["pattern.replace", "path.replace", "pattern.split", "path.split", "_check_matches"] | 3 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server.package.package_exclude_py._collect_files_excluding_patterns", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.src.sema... | The function (_glob_matches_path) defined within the public class called public.The function start at line 69 and ends at 85. It contains 15 lines of code and it has a cyclomatic complexity of 6. It takes 4 parameters, represented as [69.0], and this function return a value. It declares 5.0 functions, It has 5.0 functi... |
Sema4AI_actions | public | public | 0 | 0 | _convert_glob_patterns | def _convert_glob_patterns(patterns: list[str]) -> list[str]:converted_exclusion_patterns = []for pat in patterns:if pat.startswith("./"):# If the user did './b/c', we have to start the match from# the current path.pat = pat[2:]elif pat.startswith("/"):# If the user did '/b/c', we have to start the match from# the root... | 5 | 11 | 1 | 75 | 2 | 88 | 106 | 88 | patterns | ['pat', 'converted_exclusion_patterns'] | list[str] | {"Assign": 4, "Expr": 1, "For": 1, "If": 3, "Return": 1} | 4 | 19 | 4 | ["pat.startswith", "pat.startswith", "pat.startswith", "converted_exclusion_patterns.append"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.src.sema4ai.actions._collect_actions_py.FindActionPaths.__init__"] | The function (_convert_glob_patterns) defined within the public class called public.The function start at line 88 and ends at 106. It contains 11 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 4.0 functions, It has 4.0 function... |
Sema4AI_actions | FindActionPaths | public | 0 | 0 | __init__ | def __init__(self, root_dir: Path, include_patterns: List[str], library_roots: List[str]):"""Initialize the path finder.Args:root_dir: The root path to search ininclude_patterns: List of glob patterns to match againstlibrary_roots: List of library root paths to avoid"""self.root_dir = Path(os.path.normcase(os.path.norm... | 2 | 11 | 4 | 116 | 0 | 115 | 136 | 115 | self,root_dir,include_patterns,library_roots | [] | None | {"AnnAssign": 2, "Assign": 3, "Expr": 1} | 12 | 22 | 12 | ["absolute", "Path", "os.path.normcase", "os.path.normpath", "_convert_glob_patterns", "set", "absolute", "Path", "os.path.normcase", "os.path.normpath", "self._load_exclusion_patterns", "_convert_glob_patterns"] | 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 FindActionPaths.The function start at line 115 and ends at 136. It contains 11 lines of code and it has a cyclomatic complexity of 2. It takes 4 parameters, represented as [115.0] and does not return any value. It declares 12.0 functions, It has 12.0 functi... |
Sema4AI_actions | FindActionPaths | public | 0 | 0 | _load_exclusion_patterns | def _load_exclusion_patterns(self) -> List[str]:"""Load exclusion patterns from package.yaml file."""# Find package.yaml starting from current working directorypackage_yaml_path = self.root_dir / "package.yaml"if not package_yaml_path.exists():# No package.yaml found, return default exclusion patternsreturn DEFAULT_EXC... | 10 | 21 | 1 | 129 | 0 | 138 | 166 | 138 | self | [] | List[str] | {"Assign": 3, "Expr": 2, "If": 3, "Return": 4, "Try": 1, "With": 1} | 8 | 29 | 8 | ["package_yaml_path.exists", "open", "yaml.safe_load", "isinstance", "isinstance", "isinstance", "str", "log.warn"] | 0 | [] | The function (_load_exclusion_patterns) defined within the public class called FindActionPaths.The function start at line 138 and ends at 166. It contains 21 lines of code and it has a cyclomatic complexity of 10. The function does not take any parameters and does not return any value. It declares 8.0 functions, and I... |
Sema4AI_actions | FindActionPaths | public | 0 | 0 | _should_exclude | def _should_exclude(self, path: Path, is_dir: bool) -> bool:"""Check if a path should be excluded based on the patterns from package.yaml."""if not self.exclusion_patterns:return Falserelative_path_str = str(path.relative_to(self.root_dir))for pattern in self.exclusion_patterns:if pattern.endswith("/**"):pattern = patt... | 6 | 12 | 3 | 88 | 0 | 168 | 184 | 168 | self,path,is_dir | [] | bool | {"Assign": 3, "Expr": 1, "For": 1, "If": 4, "Return": 3} | 5 | 17 | 5 | ["str", "path.relative_to", "pattern.endswith", "pattern.endswith", "_glob_matches_path"] | 0 | [] | The function (_should_exclude) defined within the public class called FindActionPaths.The function start at line 168 and ends at 184. It contains 12 lines of code and it has a cyclomatic complexity of 6. It takes 3 parameters, represented as [168.0] and does not return any value. It declares 5.0 functions, and It has ... |
Sema4AI_actions | FindActionPaths | public | 0 | 0 | _file_matches_glob_patterns | def _file_matches_glob_patterns(self, path: Path) -> bool:"""Check if a path matches any of the glob patterns."""for pattern in self.include_patterns:relative_path_str = str(path.relative_to(self.root_dir))if _glob_matches_path(relative_path_str, pattern):return Truereturn False | 3 | 6 | 2 | 44 | 0 | 186 | 193 | 186 | self,path | [] | bool | {"Assign": 1, "Expr": 1, "For": 1, "If": 1, "Return": 2} | 3 | 8 | 3 | ["str", "path.relative_to", "_glob_matches_path"] | 0 | [] | The function (_file_matches_glob_patterns) defined within the public class called FindActionPaths.The function start at line 186 and ends at 193. It contains 6 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [186.0] and does not return any value. It declares 3.0 functions, a... |
Sema4AI_actions | FindActionPaths | public | 0 | 0 | _iterate_paths_recursive | def _iterate_paths_recursive(self, current_dir: Path, depth: int = 0) -> Iterator[Path]:"""Recursively iterate through paths, avoiding library roots and excluded paths."""try:for item in current_dir.iterdir():if item.is_file():# Check files at current depthif (item.suffix == ".py"and self._file_matches_glob_patterns(it... | 11 | 21 | 3 | 118 | 0 | 195 | 219 | 195 | self,current_dir,depth | [] | Iterator[Path] | {"Expr": 3, "For": 1, "If": 4, "Try": 1} | 7 | 25 | 7 | ["current_dir.iterdir", "item.is_file", "self._file_matches_glob_patterns", "self._should_exclude", "item.is_dir", "self._should_exclude", "self._iterate_paths_recursive"] | 0 | [] | The function (_iterate_paths_recursive) defined within the public class called FindActionPaths.The function start at line 195 and ends at 219. It contains 21 lines of code and it has a cyclomatic complexity of 11. It takes 3 parameters, represented as [195.0] and does not return any value. It declares 7.0 functions, an... |
Sema4AI_actions | FindActionPaths | public | 0 | 0 | __iter__ | def __iter__(self) -> Iterator[Path]:"""Iterate over all matching Python files."""if self.root_dir.is_file():# If the input is a python file, don't apply any filtering.if self.root_dir.suffix == ".py":yield self.root_dirreturnyield from self._iterate_paths_recursive(self.root_dir) | 3 | 6 | 1 | 44 | 0 | 221 | 229 | 221 | self | [] | Iterator[Path] | {"Expr": 3, "If": 2, "Return": 1} | 2 | 9 | 2 | ["self.root_dir.is_file", "self._iterate_paths_recursive"] | 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 public class called FindActionPaths.The function start at line 221 and ends at 229. It contains 6 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 2.0 functions, It has 2.0 functions cal... |
Sema4AI_actions | public | public | 0 | 0 | _get_default_library_roots | def _get_default_library_roots() -> list[str]:import siteimport threadingroots: list[str] = []try:import sysconfig# Python 2.7 onwards only.except ImportError:passelse:for path_name in set(("stdlib", "platstdlib", "purelib", "platlib")) & set(sysconfig.get_path_names()):roots.append(sysconfig.get_path(path_name))# Make... | 15 | 38 | 0 | 273 | 3 | 232 | 281 | 232 | ['user_site_packages', 'site_packages', 'roots'] | list[str] | {"AnnAssign": 1, "Assign": 3, "Expr": 9, "For": 4, "If": 5, "Return": 1, "Try": 1} | 27 | 50 | 27 | ["set", "set", "sysconfig.get_path_names", "roots.append", "sysconfig.get_path", "roots.append", "os.path.dirname", "roots.append", "os.path.dirname", "hasattr", "site.getusersitepackages", "isinstance", "roots.append", "roots.append", "hasattr", "site.getsitepackages", "isinstance", "roots.append", "roots.append", "os... | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.src.sema4ai.actions._collect_actions_py.collect_actions"] | The function (_get_default_library_roots) defined within the public class called public.The function start at line 232 and ends at 281. It contains 38 lines of code and it has a cyclomatic complexity of 15. The function does not take any parameters and does not return any value. It declares 27.0 functions, It has 27.0 ... | |
Sema4AI_actions | public | public | 0 | 0 | module_name_from_path | def module_name_from_path(path: Path, root: Path) -> str:"""Return a dotted module name based on the given path, anchored on root.For example: path="projects/src/tests/test_foo.py" and root="/projects", theresulting module name will be "src.tests.test_foo".Based on: https://github.com/pytest-dev/pytest/blob/main/src/_p... | 2 | 9 | 2 | 58 | 3 | 284 | 303 | 284 | path,root | ['path_parts', 'path', 'relative_path'] | str | {"Assign": 4, "Expr": 1, "Return": 1, "Try": 1} | 3 | 20 | 3 | ["path.with_suffix", "path.relative_to", "join"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.src.sema4ai.actions._collect_actions_py.import_path"] | The function (module_name_from_path) defined within the public class called public.The function start at line 284 and ends at 303. It contains 9 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [284.0] and does not return any value. It declares 3.0 functions, It has 3.0 funct... |
Sema4AI_actions | public | public | 0 | 0 | insert_missing_modules | def insert_missing_modules(modules: Dict[str, ModuleType], module_name: str) -> None:"""Used by ``import_path`` to create intermediate modules.When we want to import a module as "src.tests.test_foo" for example, we needto create empty modules "src" and "src.tests" after inserting "src.tests.test_foo",otherwise "src.tes... | 5 | 17 | 2 | 89 | 3 | 306 | 335 | 306 | modules,module_name | ['module', 'module_name', 'module_parts'] | None | {"Assign": 4, "Expr": 3, "If": 2, "Try": 1, "While": 1} | 5 | 30 | 5 | ["module_name.split", "importlib.import_module", "ModuleType", "module_parts.pop", "join"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.src.sema4ai.actions._collect_actions_py.import_path"] | The function (insert_missing_modules) defined within the public class called public.The function start at line 306 and ends at 335. It contains 17 lines of code and it has a cyclomatic complexity of 5. It takes 2 parameters, represented as [306.0] and does not return any value. It declares 5.0 functions, It has 5.0 fun... |
Sema4AI_actions | public | public | 0 | 0 | import_path | def import_path(path: Path,*,root: Path,) -> ModuleType:"""Import and return a module from the given path, which can be a file (a module) ora directory (a package).Based on: https://github.com/pytest-dev/pytest/blob/main/src/_pytest/pathlib.py"""import importlib.utilif not path.exists():raise ImportError(path)path = pa... | 7 | 35 | 2 | 182 | 5 | 338 | 381 | 338 | path,root | ['mod', 'module_name', 'spec', 'path', 'root'] | ModuleType | {"Assign": 8, "Expr": 4, "For": 1, "If": 4, "Return": 2, "Try": 1} | 15 | 44 | 15 | ["path.exists", "ImportError", "path.absolute", "root.absolute", "module_name_from_path", "sys.modules.get", "meta_importer.find_spec", "str", "importlib.util.spec_from_file_location", "str", "ImportError", "importlib.util.module_from_spec", "spec.loader.exec_module", "log.critical", "insert_missing_modules"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.src.sema4ai.actions._collect_actions_py.collect_actions"] | The function (import_path) defined within the public class called public.The function start at line 338 and ends at 381. It contains 35 lines of code and it has a cyclomatic complexity of 7. It takes 2 parameters, represented as [338.0] and does not return any value. It declares 15.0 functions, It has 15.0 functions ca... |
Sema4AI_actions | public | public | 0 | 0 | _add_to_sys_path_0 | def _add_to_sys_path_0(root: Path):"""This context manager may be used to raise priority for some folder so thatit imports the contents inside it with priority."""sys.path.insert(0, str(root))try:yieldfinally:try:sys.path.remove(str(root))except ValueError:pass | 3 | 9 | 1 | 43 | 0 | 385 | 397 | 385 | root | [] | None | {"Expr": 4, "Try": 2} | 4 | 13 | 4 | ["sys.path.insert", "str", "sys.path.remove", "str"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.src.sema4ai.actions._collect_actions_py.collect_actions"] | The function (_add_to_sys_path_0) defined within the public class called public.The function start at line 385 and ends at 397. 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 4.0 functions, It has 4.0 functions ca... |
Sema4AI_actions | public | public | 0 | 0 | clear_previously_collected_actions | def clear_previously_collected_actions():_methods_marked_as_actions_found.clear()_found_as_set.clear() | 1 | 3 | 0 | 14 | 0 | 406 | 408 | 406 | [] | None | {"Expr": 2} | 2 | 3 | 2 | ["_methods_marked_as_actions_found.clear", "_found_as_set.clear"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.tests.actions_core_tests.fixtures_py._fix_pythonpath"] | The function (clear_previously_collected_actions) defined within the public class called public.The function start at line 406 and ends at 408. 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 declares 2.0 functions, It has ... | |
Sema4AI_actions | public | public | 0 | 0 | collect_actions.accept_action | def accept_action(action: IAction):if not action_names:return Truereturn action.name in action_names | 2 | 4 | 1 | 19 | 0 | 431 | 435 | 431 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (collect_actions.accept_action) defined within the public class called public.The function start at line 431 and ends at 435. It contains 4 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 | collect_actions.on_func_found | def on_func_found(func, options: Dict):from sema4ai.actions._exceptions import ActionsErrorkey = (func.__code__.co_name, func.__code__.co_filename)if key in _found_as_set:raise ActionsError(f"Error: an action with the name '{func.__code__.co_name}' was "+ f"already found in: {func.__code__.co_filename}.")_found_as_set.... | 2 | 15 | 2 | 63 | 0 | 437 | 453 | 437 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (collect_actions.on_func_found) defined within the public class called public.The function start at line 437 and ends at 453. It contains 15 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [437.0] and does not return any value.. |
Sema4AI_actions | public | public | 0 | 0 | collect_actions | def collect_actions(pm: PluginManager,path: Path,action_names: Sequence[str] = (),glob: Optional[str] = None,) -> Iterator[IAction]:"""Note: collecting actions is not thread-safe.Raises: ActionsCollectError"""import refrom sema4ai.actions import _constants, _hookspath = path.absolute()action_names_as_set = set(action_n... | 13 | 63 | 3 | 407 | 16 | 411 | 522 | 411 | pm,path,action_names,glob | ['package_init', 'module_file', 'action', 'found_paths', 'globs', 'content', 'use_glob', 'key', 'module_name', 'library_roots', 'action_names_as_set', 'compiled_re', 'path', 'finder', 'root', 'lst'] | Iterator[IAction] | {"AnnAssign": 2, "Assign": 17, "Expr": 11, "For": 2, "If": 9, "Return": 2, "Try": 1, "With": 4} | 38 | 112 | 38 | ["path.absolute", "set", "_hooks.before_collect_actions", "ActionsError", "_found_as_set.add", "_methods_marked_as_actions_found.append", "_hooks.on_action_func_found.register", "path.is_dir", "_get_root", "_add_to_sys_path_0", "package_init.exists", "lst.append", "use_glob.split", "_get_default_library_roots", "FindAc... | 6 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.src.sema4ai.actions._commands_py.list_actions", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.src.sema4ai.actions._commands_py.metadata", "_.content.... | The function (collect_actions) defined within the public class called public.The function start at line 411 and ends at 522. It contains 63 lines of code and it has a cyclomatic complexity of 13. It takes 3 parameters, represented as [411.0] and does not return any value. It declares 38.0 functions, It has 38.0 functio... |
Sema4AI_actions | public | public | 0 | 0 | update_pythonpath | def update_pythonpath(path: Path) -> None:check_path = pathwhile True:# If a `package.yaml`` is found, that should be the used path.if (check_path / "package.yaml").exists():add = str(check_path)if add not in sys.path:sys.path.insert(0, add)returnnew_path = check_path.parentif not new_path or new_path == check_path:# D... | 7 | 16 | 1 | 98 | 3 | 525 | 543 | 525 | path | ['add', 'new_path', 'check_path'] | None | {"Assign": 5, "Expr": 2, "If": 4, "Return": 2, "While": 1} | 5 | 19 | 5 | ["exists", "str", "sys.path.insert", "os.path.abspath", "sys.path.insert"] | 3 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.src.sema4ai.actions._commands_py.list_actions", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.src.sema4ai.actions._commands_py.metadata", "_.content.... | The function (update_pythonpath) defined within the public class called public.The function start at line 525 and ends at 543. It contains 16 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 5.0 functions, It has 5.0 functions ca... |
Sema4AI_actions | public | public | 0 | 0 | _get_root | def _get_root(path: Path, is_dir: bool) -> Path:pythonpath_entries = tuple(Path(p) for p in sys.path)initial = pathwhile True:# Try to find a parent which is in the pythonpathfor p in pythonpath_entries:try:if os.path.samefile(p, path):return p.absolute()except OSError:passnew_path = path.parentif not new_path or new_p... | 9 | 17 | 2 | 98 | 4 | 546 | 565 | 546 | path,is_dir | ['initial', 'path', 'pythonpath_entries', 'new_path'] | Path | {"Assign": 4, "For": 1, "If": 3, "Return": 3, "Try": 1, "While": 1} | 6 | 20 | 6 | ["tuple", "Path", "os.path.samefile", "p.absolute", "initial.absolute", "initial.parent.absolute"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.src.sema4ai.actions._collect_actions_py.collect_actions"] | The function (_get_root) defined within the public class called public.The function start at line 546 and ends at 565. It contains 17 lines of code and it has a cyclomatic complexity of 9. It takes 2 parameters, represented as [546.0] and does not return any value. It declares 6.0 functions, It has 6.0 functions called... |
Sema4AI_actions | public | public | 0 | 0 | metadata | def metadata(*,path: str,glob: Optional[str] = None,__stream__: Optional[typing.IO] = None,pm: Optional[PluginManager] = None,) -> int:"""Prints the metadata available at a given path to the stdout in json format.{// This is added by sema4ai-actions'actions_spec_version': 'v2','actions':[{"name": "action_name","line": ... | 10 | 65 | 4 | 383 | 5 | 25 | 130 | 25 | path,glob,__stream__,pm | ['write_to', 'context', 'original_stdout', 'pm', 'p'] | int | {"AnnAssign": 4, "Assign": 6, "Expr": 10, "For": 1, "If": 5, "Return": 3, "Try": 2, "With": 1} | 24 | 106 | 24 | ["Path", "Context", "p.exists", "context.show_error", "PluginManager", "update_pythonpath", "p.absolute", "redirect_stdout", "collect_actions", "getattr", "actions_found.append", "tuple", "metadata_found.update", "data_metadata", "metadata_found.update", "data_metadata", "p.absolute", "write_to.write", "json.dumps", "w... | 4 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3961680_n4s4_synology_api.docs_parser_py.gen_header", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.90033906_opengeos_leafmap.leafmap.common_py.pmtiles_metadata", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creatio... | The function (metadata) defined within the public class called public.The function start at line 25 and ends at 130. It contains 65 lines of code and it has a cyclomatic complexity of 10. It takes 4 parameters, represented as [25.0] and does not return any value. It declares 24.0 functions, It has 24.0 functions called... |
Sema4AI_actions | public | public | 0 | 0 | list_actions | def list_actions(*,path: str,glob: Optional[str] = None,__stream__: Optional[typing.IO] = None,pm: Optional[PluginManager] = None,) -> int:"""Prints the actions available at a given path to the stdout in json format.[{"name": "action_name","line": 10,"file": "/usr/code/projects/actions.py","docs": "Action docstring",},... | 8 | 51 | 4 | 301 | 5 | 133 | 207 | 133 | path,glob,__stream__,pm | ['write_to', 'context', 'original_stdout', 'pm', 'p'] | int | {"AnnAssign": 3, "Assign": 6, "Expr": 8, "For": 1, "If": 4, "Return": 3, "Try": 1, "With": 1} | 18 | 75 | 18 | ["Path", "Context", "p.exists", "context.show_error", "PluginManager", "update_pythonpath", "p.absolute", "redirect_stdout", "collect_actions", "getattr", "actions_found.append", "write_to.write", "json.dumps", "write_to.flush", "isinstance", "traceback.print_exc", "context.show_error", "str"] | 0 | [] | The function (list_actions) defined within the public class called public.The function start at line 133 and ends at 207. It contains 51 lines of code and it has a cyclomatic complexity of 8. It takes 4 parameters, represented as [133.0] and does not return any value. It declares 18.0 functions, and It has 18.0 functi... |
Sema4AI_actions | public | public | 0 | 0 | _os_exit | def _os_exit(retcode: int):"""Kills subprocesses and exits with the given returncode."""from robocorp import logtry:import psutilcurr_process = psutil.Process()try:try:children_processes = list(curr_process.children(recursive=True))except Exception:# Retry oncechildren_processes = list(curr_process.children(recursive=T... | 10 | 35 | 1 | 203 | 3 | 210 | 258 | 210 | retcode | ['children_processes', 'names', 'curr_process'] | None | {"Assign": 6, "Expr": 13, "For": 2, "Try": 6} | 20 | 49 | 20 | ["psutil.Process", "list", "curr_process.children", "list", "curr_process.children", "join", "x.name", "log.debug", "log.info", "p.kill", "log.debug", "psutil.wait_procs", "p.terminate", "log.debug", "psutil.wait_procs", "log.debug", "sys.stdout.flush", "sys.stderr.flush", "time.sleep", "os._exit"] | 3 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server._preload_actions.preload_actions_autoexit_py.exit_when_pid_exists", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.src... | The function (_os_exit) defined within the public class called public.The function start at line 210 and ends at 258. It contains 35 lines of code and it has a cyclomatic complexity of 10. The function does not take any parameters and does not return any value. It declares 20.0 functions, It has 20.0 functions called i... |
Sema4AI_actions | public | public | 0 | 0 | _has_response_schema | def _has_response_schema(action: IAction) -> bool:output_schema = action.output_schemaif isinstance(output_schema, dict):properties = output_schema.get("properties")if properties and isinstance(properties, dict):if set(properties.keys()) == {"result", "error"}:return Truereturn False | 5 | 8 | 1 | 60 | 2 | 267 | 274 | 267 | action | ['properties', 'output_schema'] | bool | {"Assign": 2, "If": 3, "Return": 2} | 5 | 8 | 5 | ["isinstance", "output_schema.get", "isinstance", "set", "properties.keys"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.src.sema4ai.actions._commands_py.run"] | The function (_has_response_schema) defined within the public class called public.The function start at line 267 and ends at 274. It contains 8 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, It has 5.0 functions ... |
Sema4AI_actions | public | public | 0 | 0 | run.on_timeout | def on_timeout():dump_threads(message=(f"All actions have run but the process still hasn't exited "f"elapsed {time.monotonic() - teardown_time:.2f} seconds after teardown end. Showing threads found:")) | 1 | 7 | 0 | 15 | 0 | 765 | 771 | 765 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (run.on_timeout) defined within the public class called public.The function start at line 765 and ends at 771. It contains 7 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 | def run(*,output_dir: str,path: str,action_name: Union[Sequence[str], str, None],max_log_files: int = 5,max_log_file_size: str = "1MB",console_colors: str = "auto",log_output_to_stdout: str = "",no_status_rc: bool = False,teardown_dump_threads_timeout: Optional[float] = None,teardown_interrupt_timeout: Optional[float] ... | 61 | 353 | 20 | 1,692 | 34 | 277 | 775 | 277 | output_dir,path,action_name,max_log_files,max_log_file_size,console_colors,log_output_to_stdout,no_status_rc,teardown_dump_threads_timeout,teardown_interrupt_timeout,os_exit,additional_arguments,preload_module,glob,json_input,pm,print_input,print_result,json_output | ['config', 'run_name', 'os_exit_enum', 'context', 'output_dir', 'teardown_interrupt_timeout', 'action_names', 'input_as_json_str', 'p', 'pyproject_path_and_contents', 'var_name_dump_threads', 'run_config', 'retcode', 'output_dir_path', 'action_or_actions', 'v', 'run_status', 'teardown_dump_threads_timeout', 'used_env',... | int | {"AnnAssign": 7, "Assign": 65, "AugAssign": 1, "Expr": 55, "For": 3, "If": 37, "Return": 4, "Try": 10, "With": 4} | 126 | 499 | 126 | ["os.environ.pop", "os.environ.get", "PluginManager", "console.set_mode", "absolute", "Path", "Context", "p.exists", "context.show_error", "os.getenv", "float", "sys.stderr.write", "sys.exit", "os.getenv", "float", "sys.stderr.write", "sys.exit", "os.getenv", "context.show_error", "context.show_error", "sys.exit", "fau... | 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 public.The function start at line 277 and ends at 775. It contains 353 lines of code and it has a cyclomatic complexity of 61. It takes 20 parameters, represented as [277.0] and does not return any value. It declares 126.0 functions, It has 126.0 functions calle... |
Sema4AI_actions | _CustomArgumentParser | protected | 0 | 1 | error | def error(self, msg):raise RuntimeError(msg) | 1 | 2 | 2 | 12 | 0 | 779 | 780 | 779 | self,msg | [] | None | {} | 1 | 2 | 1 | ["RuntimeError"] | 168 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3518760_makerbot_pyserial.serial.tools.list_ports_windows_py.enumerate_ftdi_ports_by_vid_pid", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3518760_makerbot_pyserial.serial.tools.list_ports_windows_py.filter_usb_de... | The function (error) defined within the protected class called _CustomArgumentParser, that inherit another class.The function start at line 779 and ends at 780. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [779.0] and does not return any value. It declare 1.... |
Sema4AI_actions | _CustomArgumentParser | protected | 0 | 1 | exit | def exit(self, status=0, message=None):raise RuntimeError(message or "") | 2 | 2 | 3 | 20 | 0 | 782 | 783 | 782 | self,status,message | [] | None | {} | 1 | 2 | 1 | ["RuntimeError"] | 147 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16379211_lorcalhost_btb_manager_telegram.btb_manager_telegram.__main___py.pre_run_main", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16379211_lorcalhost_btb_manager_telegram.btb_manager_telegram.utils_py.retreive_... | The function (exit) defined within the protected class called _CustomArgumentParser, that inherit another class.The function start at line 782 and ends at 783. It contains 2 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [782.0] and does not return any value. It declare 1.0... |
Sema4AI_actions | public | public | 0 | 0 | str_to_bool | def str_to_bool(s):# Convert string to booleanreturn s.lower() in ["true", "t", "yes", "1"] | 1 | 2 | 1 | 21 | 0 | 786 | 788 | 786 | s | [] | Returns | {"Return": 1} | 1 | 3 | 1 | ["s.lower"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.src.sema4ai.actions._commands_py.check_boolean"] | The function (str_to_bool) defined within the public class called public.The function start at line 786 and ends at 788. 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 declare 1.0 function, It has 1.0 function called i... |
Sema4AI_actions | public | public | 0 | 0 | check_boolean | def check_boolean(value):if value.lower() not in ["true", "false", "t", "f", "yes", "no", "1", "0"]:raise ArgumentTypeError(f"Invalid value for boolean flag: {value}")return str_to_bool(value) | 2 | 4 | 1 | 42 | 0 | 791 | 794 | 791 | value | [] | Returns | {"If": 1, "Return": 1} | 3 | 4 | 3 | ["value.lower", "ArgumentTypeError", "str_to_bool"] | 0 | [] | The function (check_boolean) defined within the public class called public.The function start at line 791 and ends at 794. It contains 4 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters, and this function return a value. It declares 3.0 functions, and It has 3.0 function... |
Sema4AI_actions | public | public | 0 | 0 | _validate_and_convert_kwargs | def _validate_and_convert_kwargs(pm: PluginManager, action: IAction, kwargs: Dict[str, Any]) -> tuple[Dict[str, Any], Optional["RequestContexts"]]:from typing import get_type_hintsfrom sema4ai.actions._exceptions import InvalidArgumentsErrorfrom sema4ai.actions._variables_scope import (create_validate_and_convert_kwarg... | 17 | 78 | 3 | 415 | 15 | 797 | 890 | 797 | pm,action,kwargs | ['is_managed_param', 'method_name', 'created', 'request_contexts', 'error_message', 'target_method', 'check_type', 'sig', 'msg', 'type_hints', 'ep_managed_parameters', 'model_validate', 'passed_value', 'new_kwargs', 'param_type'] | tuple[Dict[str, Any], Optional['RequestContexts']] | {"AnnAssign": 1, "Assign": 23, "Expr": 1, "For": 1, "If": 12, "Return": 1, "Try": 3, "With": 1} | 24 | 94 | 24 | ["inspect.signature", "get_type_hints", "sig.parameters.items", "type_hints.get", "_is_managed_param", "_get_managed_param_type", "create_validate_and_convert_kwargs_scope", "InvalidArgumentsError", "kwargs.get", "getattr", "_obtain_raw_types_handler", "InvalidArgumentsError", "repr", "model_validate", "InvalidArgument... | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.src.sema4ai.actions._commands_py._normalize_arguments", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.src.sema4ai.actions._commands_py.run"] | The function (_validate_and_convert_kwargs) defined within the public class called public.The function start at line 797 and ends at 890. It contains 78 lines of code and it has a cyclomatic complexity of 17. It takes 3 parameters, represented as [797.0] and does not return any value. It declares 24.0 functions, It has... |
Sema4AI_actions | public | public | 0 | 0 | _inject_managed_params | def _inject_managed_params(pm: PluginManager,sig: inspect.Signature,request_contexts: Optional["RequestContexts"],new_kwargs: Dict[str, Any],original_kwargs: Dict[str, Any],) -> Dict[str, Any]:if pm.has_instance(EPManagedParameters):ep_managed_parameters = pm.get_instance(EPManagedParameters)return ep_managed_parameter... | 2 | 13 | 5 | 77 | 1 | 893 | 905 | 893 | pm,sig,request_contexts,new_kwargs,original_kwargs | ['ep_managed_parameters'] | Dict[str, Any] | {"Assign": 1, "If": 1, "Return": 2} | 3 | 13 | 3 | ["pm.has_instance", "pm.get_instance", "ep_managed_parameters.inject_managed_params"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.src.sema4ai.actions._commands_py._validate_and_convert_kwargs"] | The function (_inject_managed_params) defined within the public class called public.The function start at line 893 and ends at 905. It contains 13 lines of code and it has a cyclomatic complexity of 2. It takes 5 parameters, represented as [893.0] and does not return any value. It declares 3.0 functions, It has 3.0 fun... |
Sema4AI_actions | public | public | 0 | 0 | _is_managed_param | def _is_managed_param(pm: PluginManager,param_name: str,*,node: FunctionDef,) -> bool:pass | 1 | 7 | 3 | 21 | 0 | 909 | 915 | 909 | pm,param_name,node | [] | bool | {} | 0 | 7 | 0 | [] | 5 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.src.sema4ai.actions._action_py.Action.input_schema", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.src.sema4ai.actions._action_py.Action.managed_para... | The function (_is_managed_param) defined within the public class called public.The function start at line 909 and ends at 915. It contains 7 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [909.0] and does not return any value. It has 5.0 functions calling this function whic... |
Sema4AI_actions | public | public | 0 | 0 | _is_managed_param | def _is_managed_param(pm: PluginManager,param_name: str,*,param: inspect.Parameter,) -> bool:pass | 1 | 7 | 3 | 23 | 0 | 919 | 925 | 919 | pm,param_name,node | [] | bool | {} | 0 | 7 | 0 | [] | 5 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.src.sema4ai.actions._action_py.Action.input_schema", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.src.sema4ai.actions._action_py.Action.managed_para... | The function (_is_managed_param) defined within the public class called public.The function start at line 919 and ends at 925. It contains 7 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [919.0] and does not return any value. It has 5.0 functions calling this function whic... |
Sema4AI_actions | public | public | 0 | 0 | _is_managed_param | def _is_managed_param(pm: PluginManager,param_name: str,*,node: Optional[FunctionDef] = None,param: Optional[inspect.Parameter] = None,) -> bool:"""Verified if the given parameter is a managed parameter.Args:pm: The plugin manager.param_name: The name of the parameter to check.node: The FunctionDef node (ast), should b... | 8 | 22 | 4 | 126 | 1 | 928 | 966 | 928 | pm,param_name,node | ['ep_managed_parameters'] | bool | {} | 0 | 7 | 0 | [] | 5 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.src.sema4ai.actions._action_py.Action.input_schema", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.src.sema4ai.actions._action_py.Action.managed_para... | The function (_is_managed_param) defined within the public class called public.The function start at line 928 and ends at 966. It contains 22 lines of code and it has a cyclomatic complexity of 8. It takes 4 parameters, represented as [928.0] and does not return any value. It has 5.0 functions calling this function whi... |
Sema4AI_actions | public | public | 0 | 0 | _get_managed_param_type | def _get_managed_param_type(pm: PluginManager,param_name: str,*,node: FunctionDef,) -> str:raise NotImplementedError() | 1 | 7 | 3 | 24 | 0 | 970 | 976 | 970 | pm,param_name,node | [] | str | {} | 1 | 7 | 1 | ["NotImplementedError"] | 3 | ["_.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._commands_py._validat... | The function (_get_managed_param_type) defined within the public class called public.The function start at line 970 and ends at 976. It contains 7 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [970.0] and does not return any value. It declare 1.0 function, It has 1.0 funct... |
Sema4AI_actions | public | public | 0 | 0 | _get_managed_param_type | def _get_managed_param_type(pm: PluginManager,param_name: str,*,param: inspect.Parameter,) -> type:raise NotImplementedError() | 1 | 7 | 3 | 26 | 0 | 980 | 986 | 980 | pm,param_name,node | [] | str | {} | 1 | 7 | 1 | ["NotImplementedError"] | 3 | ["_.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._commands_py._validat... | The function (_get_managed_param_type) defined within the public class called public.The function start at line 980 and ends at 986. It contains 7 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [980.0] and does not return any value. It declare 1.0 function, It has 1.0 funct... |
Sema4AI_actions | public | public | 0 | 0 | _get_managed_param_type | def _get_managed_param_type(pm: PluginManager,param_name: str,*,node: Optional[FunctionDef] = None,param: Optional[inspect.Parameter] = None,):if pm.has_instance(EPManagedParameters):ep_managed_parameters = pm.get_instance(EPManagedParameters)if node is not None:return ep_managed_parameters.get_managed_param_type(param... | 4 | 21 | 4 | 111 | 2 | 989 | 1,010 | 989 | pm,param_name,node | ['managed_param_type', 'ep_managed_parameters'] | str | {} | 1 | 7 | 1 | ["NotImplementedError"] | 3 | ["_.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._commands_py._validat... | The function (_get_managed_param_type) defined within the public class called public.The function start at line 989 and ends at 1010. It contains 21 lines of code and it has a cyclomatic complexity of 4. It takes 4 parameters, represented as [989.0] and does not return any value. It declare 1.0 function, It has 1.0 fun... |
Sema4AI_actions | public | public | 0 | 0 | _normalize_arguments | def _normalize_arguments(pm: PluginManager, action: IAction, args: list[str]) -> tuple[Dict[str, Any], Optional["RequestContexts"]]:from typing import get_type_hintsfrom sema4ai.actions._exceptions import InvalidArgumentsErrortarget_method = action.methodsig = inspect.signature(target_method)type_hints = get_type_hints... | 16 | 73 | 3 | 400 | 12 | 1,013 | 1,106 | 1,013 | pm,action,args | ['parser', 'found_names', 'method_name', 'error_message', 'kwargs', 'target_method', 'param_value', 'sig', 'type_hints', 'model_validate', 'msg', 'param_type'] | tuple[Dict[str, Any], Optional['RequestContexts']] | {"Assign": 21, "Expr": 5, "For": 2, "If": 10, "Return": 1, "Try": 3} | 28 | 94 | 28 | ["inspect.signature", "get_type_hints", "_CustomArgumentParser", "sig.parameters.items", "_is_managed_param", "found_names.append", "type_hints.get", "hasattr", "parser.add_argument", "InvalidArgumentsError", "parser.add_argument", "parser.add_argument", "parser.add_argument", "parser.parse_known_args", "_get_usage", "... | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.src.sema4ai.actions._commands_py.run"] | The function (_normalize_arguments) defined within the public class called public.The function start at line 1013 and ends at 1106. It contains 73 lines of code and it has a cyclomatic complexity of 16. It takes 3 parameters, represented as [1013.0] and does not return any value. It declares 28.0 functions, It has 28.0... |
Sema4AI_actions | public | public | 0 | 0 | _get_usage | def _get_usage(parser) -> str:f = StringIO()parser.print_usage(f)usage = f.getvalue().strip()if usage:usage = usage[0].upper() + usage[1:]return usage | 2 | 7 | 1 | 50 | 2 | 1,109 | 1,115 | 1,109 | parser | ['usage', 'f'] | str | {"Assign": 3, "Expr": 1, "If": 1, "Return": 1} | 5 | 7 | 5 | ["StringIO", "parser.print_usage", "strip", "f.getvalue", "upper"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.src.sema4ai.actions._commands_py._normalize_arguments"] | The function (_get_usage) defined within the public class called public.The function start at line 1109 and ends at 1115. It contains 7 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 5.0 functions, It has 5.0 functions called i... |
Sema4AI_actions | RunConfig | public | 0 | 0 | __init__ | def __init__(self,output_dir: Path,path: Path,action_names: Sequence[str],max_log_files: int,max_log_file_size: str,console_colors: str,log_output_to_stdout: str,no_status_rc: bool,pyproject_contents: dict,):"""Args:output_dir: The directory where output should be put.path: The path (file or directory where the actions... | 1 | 21 | 10 | 91 | 0 | 6 | 48 | 6 | self,output_dir,path,action_names,max_log_files,max_log_file_size,console_colors,log_output_to_stdout,no_status_rc,pyproject_contents | [] | None | {"Assign": 9, "Expr": 1} | 0 | 43 | 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 RunConfig.The function start at line 6 and ends at 48. It contains 21 lines of code and it has a cyclomatic complexity of 1. It takes 10 parameters, represented as [6.0] and does not return any value. It has 6243.0 functions calling this function which are ... |
Sema4AI_actions | public | public | 0 | 0 | set_config.on_exit | def on_exit():_GlobalConfig.instance = None | 1 | 2 | 0 | 9 | 0 | 60 | 61 | 60 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (set_config.on_exit) defined within the public class called public.The function start at line 60 and ends at 61. 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_config | def set_config(config: Optional[RunConfig]):from sema4ai.actions._callback import OnExitContextManager_GlobalConfig.instance = configdef on_exit():_GlobalConfig.instance = Nonereturn OnExitContextManager(on_exit) | 1 | 5 | 1 | 30 | 0 | 55 | 63 | 55 | config | [] | Returns | {"Assign": 2, "Return": 1} | 1 | 9 | 1 | ["OnExitContextManager"] | 6 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3676862_pecan_pecan.pecan.commands.serve_py.gunicorn_run", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3676862_pecan_pecan.pecan.core_py.load_app", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Clon... | The function (set_config) defined within the public class called public.The function start at line 55 and ends at 63. It contains 5 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, It has 1.0 function called insi... |
Sema4AI_actions | public | public | 0 | 0 | get_config | def get_config() -> Optional[RunConfig]:return _GlobalConfig.instance | 1 | 2 | 0 | 13 | 0 | 66 | 67 | 66 | [] | Optional[RunConfig] | {"Return": 1} | 0 | 2 | 0 | [] | 162 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3544998_workiva_furious.furious.config_py._get_configured_module", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3544998_workiva_furious.furious.config_py.get_completion_cleanup_delay", "_.content.gdrive.MyDrive.Phd... | The function (get_config) defined within the public class called public.The function start at line 66 and ends at 67. 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 162.0 functions calling this function which are ["_.c... | |
Sema4AI_actions | public | public | 0 | 0 | setup | def setup(func: IActionCallback) -> IActionCallback:... | 1 | 2 | 1 | 10 | 0 | 12 | 13 | 12 | func | [] | IActionCallback | {"Expr": 1} | 0 | 2 | 0 | [] | 46 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3511986_dart_archive_pub_dartlang.third_party.cherrypy._cpmodpy_py.handler", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3544998_workiva_furious.example.runner_py.main", "_.content.gdrive.MyDrive.Phd_Thesis.Datase... | The function (setup) defined within the public class called public.The function start at line 12 and ends at 13. 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 46.0 functions calling this function which are ["_.content... |
Sema4AI_actions | public | public | 0 | 0 | setup | def setup(*, scope: Literal["action"] = "action") -> Decorator[IActionCallback]:... | 1 | 2 | 1 | 20 | 0 | 17 | 18 | 17 | func | [] | IActionCallback | {"Expr": 1} | 0 | 2 | 0 | [] | 46 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3511986_dart_archive_pub_dartlang.third_party.cherrypy._cpmodpy_py.handler", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3544998_workiva_furious.example.runner_py.main", "_.content.gdrive.MyDrive.Phd_Thesis.Datase... | The function (setup) defined within the public class called public.The function start at line 17 and ends at 18. 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 46.0 functions calling this function which are ["_.content... |
Sema4AI_actions | public | public | 0 | 0 | setup | def setup(*, scope: Literal["session"]) -> Decorator[IActionsCallback]:... | 1 | 2 | 1 | 18 | 0 | 22 | 23 | 22 | func | [] | IActionCallback | {"Expr": 1} | 0 | 2 | 0 | [] | 46 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3511986_dart_archive_pub_dartlang.third_party.cherrypy._cpmodpy_py.handler", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3544998_workiva_furious.example.runner_py.main", "_.content.gdrive.MyDrive.Phd_Thesis.Datase... | The function (setup) defined within the public class called public.The function start at line 22 and ends at 23. 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 46.0 functions calling this function which are ["_.content... |
Sema4AI_actions | public | public | 0 | 0 | setup.setup._register_callback.setup.setup._register_callback.generator.teardown | def teardown(*args, **kwargs):try:next(gen)except StopIteration:passfinally:after.unregister(teardown) | 3 | 7 | 2 | 27 | 0 | 97 | 103 | 97 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (setup.setup._register_callback.setup.setup._register_callback.generator.teardown) defined within the public class called public.The function start at line 97 and ends at 103. It contains 7 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [97.0] and does not retu... |
Sema4AI_actions | public | public | 0 | 0 | setup.setup._register_callback.generator | def generator(*args, **kwargs):gen = func(*args, **kwargs)next(gen)def teardown(*args, **kwargs):try:next(gen)except StopIteration:passfinally:after.unregister(teardown)after.register(teardown) | 1 | 5 | 2 | 31 | 0 | 93 | 105 | 93 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (setup.setup._register_callback.generator) defined within the public class called public.The function start at line 93 and ends at 105. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [93.0] and does not return any value.. |
Sema4AI_actions | public | public | 0 | 0 | setup._register_callback | def _register_callback(before, after, func):if inspect.isgeneratorfunction(func):@wraps(func)def generator(*args, **kwargs):gen = func(*args, **kwargs)next(gen)def teardown(*args, **kwargs):try:next(gen)except StopIteration:passfinally:after.unregister(teardown)after.register(teardown)before.register(generator)return g... | 2 | 9 | 3 | 42 | 0 | 89 | 111 | 89 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (setup._register_callback) defined within the public class called public.The function start at line 89 and ends at 111. It contains 9 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [89.0] and does not return any value.. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.