project_name string | class_name string | class_modifiers string | class_implements int64 | class_extends int64 | function_name string | function_body string | cyclomatic_complexity int64 | NLOC int64 | num_parameter int64 | num_token int64 | num_variable int64 | start_line int64 | end_line int64 | function_index int64 | function_params string | function_variable string | function_return_type string | function_body_line_type string | function_num_functions int64 | function_num_lines int64 | outgoing_function_count int64 | outgoing_function_names string | incoming_function_count int64 | incoming_function_names string | lexical_representation string |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Sema4AI_actions | public | public | 0 | 0 | exit_when_pid_exits | def exit_when_pid_exits(pid: str | int,interval=PARENT_PROCESS_WATCH_INTERVAL,soft_kill_timeout: float = SOFT_KILL_TIMEOUT,) -> None:"""Exit the current process when the given pid exists (may be called multiple times and ifany of the pids we're tracking exit, the current process will exit).Args:pid: The pid of the proc... | 3 | 17 | 3 | 80 | 2 | 15 | 58 | 15 | pid,interval,soft_kill_timeout | ['pid', '_watching_thread_global'] | None | {"Assign": 3, "Expr": 8, "For": 1, "If": 3, "Try": 1, "While": 1} | 12 | 44 | 12 | ["int", "_track_pids_to_exit.add", "log.debug", "tuple", "is_process_alive", "log.info", "os.getpid", "_os_exit", "log.exception", "time.sleep", "threading.Thread", "_watching_thread_global.start"] | 0 | [] | The function (exit_when_pid_exits) defined within the public class called public.The function start at line 15 and ends at 58. It contains 17 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [15.0] and does not return any value. It declares 12.0 functions, and It has 12.0 fu... |
Sema4AI_actions | public | public | 0 | 0 | _os_exit | def _os_exit(retcode: int, soft_kill_timeout: float = 2) -> None:"""Kills subprocesses and exits with the given returncode."""from sema4ai.common.process import kill_subprocessestry:kill_subprocesses(soft_kill_timeout=soft_kill_timeout)sys.stdout.flush()sys.stderr.flush()# Give some time for other threads to run just a... | 2 | 9 | 2 | 62 | 0 | 65 | 78 | 65 | retcode,soft_kill_timeout | [] | None | {"Expr": 6, "Try": 1} | 5 | 14 | 5 | ["kill_subprocesses", "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 65 and ends at 78. It contains 9 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [65.0] and does not return any value. It declares 5.0 functions, It has 5.0 functions called insi... |
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 | 31 | 34 | 31 | 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 31 and ends at 34. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [31.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) -> OnExitContextManager:"""Register a callback to be called when the callback is notified.Returns:An OnExitContextManager which can be used as a context manager toautomatically unregister the callback when the context manager isexited.Example:with callback.register(lambda: print("Hello, wor... | 1 | 3 | 2 | 34 | 0 | 36 | 57 | 36 | self,callback | [] | OnExitContextManager | {"Assign": 1, "Expr": 1, "Return": 1} | 2 | 22 | 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 36 and ends at 57. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [36.0] and does not return any value. It declares 2.0 functions, It has 2.0 functions called in... |
Sema4AI_actions | Callback | public | 0 | 0 | unregister | def unregister(self, callback) -> None:self._callbacks = tuple(x for x in self._callbacks if x != callback) | 3 | 2 | 2 | 27 | 0 | 59 | 60 | 59 | 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 59 and ends at 60. It contains 2 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [59.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 | 62 | 63 | 62 | 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 62 and ends at 63. 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:logger.exception(f"Error calling: {c}.")if self.raise_exceptions:raise | 5 | 12 | 3 | 62 | 0 | 65 | 76 | 65 | self,*args,**kwargs | [] | None | {"Assign": 2, "Expr": 2, "For": 1, "If": 2, "Try": 1} | 3 | 12 | 3 | ["reversed", "c", "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 65 and ends at 76. It contains 12 lines of code and it has a cyclomatic complexity of 5. It takes 3 parameters, represented as [65.0] and does not return any value. It declares 3.0 functions, It has 3.0 functions called i... |
Sema4AI_actions | GalleryActionPackages | public | 0 | 0 | __init__ | def __init__(self, metadata: dict | None = None):if metadata is not None:self._metadata = self._validate_metadata(metadata)else:self._metadata = None | 2 | 5 | 2 | 36 | 0 | 39 | 43 | 39 | self,metadata | [] | None | {"Assign": 2, "If": 1} | 1 | 5 | 1 | ["self._validate_metadata"] | 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 GalleryActionPackages.The function start at line 39 and ends at 43. It contains 5 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [39.0] and does not return any value. It declare 1.0 function, It has 1.0 function... |
Sema4AI_actions | GalleryActionPackages | public | 0 | 0 | extract_package | def extract_package(self, package_name: str, target_dir: Path, monitor: IMonitor = NULL) -> ActionResult[str]:from .text import slugifytry:import jsonpackages_result = self.list_packages()if not packages_result.success:return ActionResult.make_failure(packages_result.message or "Unknown error")packages = packages_resul... | 10 | 49 | 4 | 253 | 0 | 45 | 106 | 45 | self,package_name,target_dir,monitor | [] | ActionResult[str] | {"Assign": 9, "Expr": 2, "If": 6, "Return": 8, "Try": 2, "With": 1} | 23 | 62 | 23 | ["self.list_packages", "ActionResult.make_failure", "ActionResult.make_failure", "packages.get", "ActionResult.make_failure", "package_metadata.get", "ActionResult.make_failure", "json.dumps", "slugify", "package_metadata.get", "ActionResult.make_failure", "json.dumps", "sema4ai_http.get", "Exception", "response.data.d... | 0 | [] | The function (extract_package) defined within the public class called GalleryActionPackages.The function start at line 45 and ends at 106. It contains 49 lines of code and it has a cyclomatic complexity of 10. It takes 4 parameters, represented as [45.0] and does not return any value. It declares 23.0 functions, and I... |
Sema4AI_actions | GalleryActionPackages | public | 0 | 0 | list_packages | def list_packages(self) -> ActionResult[dict[str, _ListPackageVersionMetadata]]:"""Returns a dict where the key is the package name and the valuehas the description and the zip url to download the package."""result = self._load_metadata()if not result.success:return ActionResult.make_failure(result.message or "Unknown ... | 5 | 17 | 1 | 133 | 0 | 108 | 131 | 108 | self | [] | ActionResult[dict[str, _ListPackageVersionMetadata]] | {"AnnAssign": 2, "Assign": 3, "Expr": 1, "For": 2, "If": 1, "Return": 2} | 4 | 24 | 4 | ["self._load_metadata", "ActionResult.make_failure", "packages.items", "ActionResult.make_success"] | 4 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3925449_gabrielrf_rastreiobot.rastreiobot_py.cmd_concluidos", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3925449_gabrielrf_rastreiobot.rastreiobot_py.cmd_pacotes", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Cre... | The function (list_packages) defined within the public class called GalleryActionPackages.The function start at line 108 and ends at 131. It contains 17 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 f... |
Sema4AI_actions | GalleryActionPackages | public | 0 | 0 | _validate_metadata | def _validate_metadata(self, metadata: Any) -> _PackageMetadataRoot:assert isinstance(metadata, dict), "Metadata is not a dictionary"packages = metadata["packages"]assert isinstance(packages, dict), "Metadata 'packages' is not a dictionary"for key, entry in packages.items():assert isinstance(entry, dict), f"Metadata 'p... | 8 | 32 | 2 | 139 | 0 | 133 | 172 | 133 | self,metadata | [] | _PackageMetadataRoot | {"Assign": 2, "For": 2, "If": 5, "Return": 1} | 10 | 40 | 10 | ["isinstance", "isinstance", "packages.items", "isinstance", "ValueError", "ValueError", "isinstance", "ValueError", "ValueError", "ValueError"] | 4 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94533096_lancedb_lancedb.python.python.lancedb.common_py._validate_metadata", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94533096_lancedb_lancedb.python.python.lancedb.common_py.validate_schema", "_.content.gdriv... | The function (_validate_metadata) defined within the public class called GalleryActionPackages.The function start at line 133 and ends at 172. It contains 32 lines of code and it has a cyclomatic complexity of 8. It takes 2 parameters, represented as [133.0] and does not return any value. It declares 10.0 functions, It... |
Sema4AI_actions | GalleryActionPackages | public | 0 | 0 | _load_metadata | def _load_metadata(self) -> ActionResult[_PackageMetadataRoot]:"""Loads the metadata from the gallery (if not already loaded) and returns it.May throw an exception if the metadata cannot be loaded."""from sema4ai_http import getif self._metadata:# Ok, we have loaded it beforeassert isinstance(self._metadata, dict), f"E... | 4 | 20 | 1 | 113 | 0 | 174 | 203 | 174 | self | [] | ActionResult[_PackageMetadataRoot] | {"Assign": 4, "Expr": 1, "If": 2, "Return": 3, "Try": 1} | 10 | 30 | 10 | ["isinstance", "ActionResult.make_success", "get", "Exception", "response.data.decode", "response.json", "self._validate_metadata", "isinstance", "ActionResult.make_success", "ActionResult.make_failure"] | 0 | [] | The function (_load_metadata) defined within the public class called GalleryActionPackages.The function start at line 174 and ends at 203. It contains 20 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters and does not return any value. It declares 10.0 functions, and It ha... |
Sema4AI_actions | public | public | 0 | 0 | gen_self_signed_certificate | def gen_self_signed_certificate() -> tuple[bytes, bytes]:"""Provides a key-pair suitable to be used as a self-signed certificate (in PEMformat).Returns:Returns a tuple with the bytes for the public and private key generated."""import datetimeimport socketfrom cryptography import x509# type: ignorefrom cryptography.hazm... | 1 | 46 | 0 | 352 | 5 | 1 | 61 | 1 | ['certificate', 'builder', 'one_day', 'private_key', 'public_key'] | tuple[bytes, bytes] | {"Assign": 13, "Expr": 1, "Return": 1} | 36 | 61 | 36 | ["datetime.timedelta", "rsa.generate_private_key", "private_key.public_key", "x509.CertificateBuilder", "builder.subject_name", "x509.Name", "x509.NameAttribute", "socket.gethostname", "builder.issuer_name", "x509.Name", "x509.NameAttribute", "socket.gethostname", "builder.not_valid_before", "datetime.datetime.today", ... | 0 | [] | The function (gen_self_signed_certificate) defined within the public class called public.The function start at line 1 and ends at 61. It contains 46 lines of code and it has a cyclomatic complexity of 1. It take 0 parameter, represented as [1.0] and does not return any value. It declares 36.0 functions, and It has 36.... | |
Sema4AI_actions | public | public | 0 | 0 | get_default_sema4ai_home_dir | def get_default_sema4ai_home_dir() -> Path:home_env_var = os.environ.get("SEMA4AI_HOME")if home_env_var:home = Path(home_env_var)else:if sys.platform == "win32":localappdata = os.environ.get("LOCALAPPDATA")if not localappdata:raise RuntimeError("Error. LOCALAPPDATA not defined in environment!")home = Path(localappdata)... | 4 | 13 | 0 | 75 | 3 | 8 | 21 | 8 | ['home_env_var', 'home', 'localappdata'] | Path | {"Assign": 5, "If": 3, "Return": 1} | 7 | 14 | 7 | ["os.environ.get", "Path", "os.environ.get", "RuntimeError", "Path", "expanduser", "Path"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.common.src.sema4ai.common.locations_py.get_default_executable_path"] | The function (get_default_sema4ai_home_dir) defined within the public class called public.The function start at line 8 and ends at 21. It contains 13 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters and does not return any value. It declares 7.0 functions, It has 7.0 func... | |
Sema4AI_actions | public | public | 0 | 0 | get_default_executable_path | def get_default_executable_path(name: str, version: str) -> Path:"""Provides the default path for a (sema4ai managed) executable.Args:name: The name of the executable (i.e.: "action-server", "agent-cli", etc).version: The version of the executable.Returns:The path to the executable. Something as:<sema4ai_home>/bin/acti... | 2 | 7 | 2 | 46 | 3 | 24 | 47 | 24 | name,version | ['suffix', 'target_location', 'action_server_download_dir'] | Path | {"Assign": 4, "Expr": 1, "If": 1, "Return": 1} | 1 | 24 | 1 | ["get_default_sema4ai_home_dir"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.common.src.sema4ai.common.tools_py.BaseTool.get_default_executable"] | The function (get_default_executable_path) defined within the public class called public.The function start at line 24 and ends at 47. It contains 7 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [24.0] and does not return any value. It declare 1.0 function, It has 1.0 func... |
Sema4AI_actions | Monitor | public | 0 | 0 | __init__ | def __init__(self, title: str = ""):self._title = titleself._cancelled: bool = Falseself._listeners: tuple[ICancelMonitorListener, ...] = () | 1 | 4 | 2 | 36 | 0 | 9 | 12 | 9 | self,title | [] | None | {"AnnAssign": 2, "Assign": 1} | 0 | 4 | 0 | [] | 6,244 | ["_.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 Monitor.The function start at line 9 and ends at 12. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [9.0] and does not return any value. It has 6244.0 functions calling this function which are ["_.... |
Sema4AI_actions | Monitor | public | 0 | 0 | add_cancel_listener | def add_cancel_listener(self, listener: ICancelMonitorListener):if self._cancelled:listener()else:self._listeners += (listener,) | 2 | 5 | 2 | 27 | 0 | 14 | 18 | 14 | self,listener | [] | None | {"AugAssign": 1, "Expr": 1, "If": 1} | 1 | 5 | 1 | ["listener"] | 0 | [] | The function (add_cancel_listener) defined within the public class called Monitor.The function start at line 14 and ends at 18. It contains 5 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [14.0] and does not return any value. It declare 1.0 function, and It has 1.0 functi... |
Sema4AI_actions | Monitor | public | 0 | 0 | cancel | def cancel(self) -> None:if self._title:log.info("Cancelled: %s", self._title)self._cancelled = Truefor listener in self._listeners:listener()self._listeners = () | 3 | 7 | 1 | 43 | 0 | 20 | 27 | 20 | self | [] | None | {"Assign": 2, "Expr": 2, "For": 1, "If": 1} | 2 | 8 | 2 | ["log.info", "listener"] | 7 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3687273_internap_netman.netman.core.switch_sessions_py.SwitchSessionManager._stop_timer", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3929643_esphome_aioesphomeapi.tests.test_client_py.test_bluetooth_device_connec... | The function (cancel) defined within the public class called Monitor.The function start at line 20 and ends at 27. It contains 7 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 called inside w... |
Sema4AI_actions | Monitor | public | 0 | 0 | check_cancelled | def check_cancelled(self) -> None:if self._cancelled:from concurrent.futures import CancelledErrorraise CancelledError() | 2 | 4 | 1 | 22 | 0 | 29 | 33 | 29 | self | [] | None | {"If": 1} | 1 | 5 | 1 | ["CancelledError"] | 0 | [] | The function (check_cancelled) defined within the public class called Monitor.The function start at line 29 and ends at 33. 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. It declare 1.0 function, and It has 1.0 function call... |
Sema4AI_actions | Monitor | public | 0 | 0 | is_cancelled | def is_cancelled(self) -> bool:return self._cancelled | 1 | 2 | 1 | 11 | 0 | 35 | 36 | 35 | self | [] | bool | {"Return": 1} | 0 | 2 | 0 | [] | 0 | [] | The function (is_cancelled) defined within the public class called Monitor.The function start at line 35 and ends at 36. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
Sema4AI_actions | Monitor | public | 0 | 0 | __typecheckself__ | def __typecheckself__(self) -> None:from sema4ai.common.protocols import check_implements_: IMonitor = check_implements(self) | 1 | 3 | 1 | 23 | 0 | 38 | 41 | 38 | self | [] | None | {"AnnAssign": 1} | 1 | 4 | 1 | ["check_implements"] | 0 | [] | The function (__typecheckself__) defined within the public class called Monitor.The function start at line 38 and ends at 41. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, and It has 1.0 function ca... |
Sema4AI_actions | Null | public | 0 | 0 | __init__ | def __init__(self, *args, **kwargs):return None | 1 | 2 | 3 | 13 | 0 | 9 | 10 | 9 | self,*args,**kwargs | [] | Returns | {"Return": 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 Null.The function start at line 9 and ends at 10. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [9.0], and this function return a value. It has 6243.0 functions calling this function which are ["_... |
Sema4AI_actions | Null | public | 0 | 0 | __call__ | def __call__(self, *args, **kwargs):return self | 1 | 2 | 3 | 13 | 0 | 12 | 13 | 12 | self,*args,**kwargs | [] | Returns | {"Return": 1} | 0 | 2 | 0 | [] | 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 Null.The function start at line 12 and ends at 13. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [12.0], and this function return a value. It has 50.0 functions calling this function which are ["_... |
Sema4AI_actions | Null | public | 0 | 0 | __enter__ | def __enter__(self, *args, **kwargs):return self | 1 | 2 | 3 | 13 | 0 | 15 | 16 | 15 | self,*args,**kwargs | [] | Returns | {"Return": 1} | 0 | 2 | 0 | [] | 4 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3662468_esss_jobs_done10.tests.server.test_server_py.test_error_handling", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3687355_datarobot_batch_scoring.datarobot_batch_scoring.writer_py.NewRunContext.__enter__", "_... | The function (__enter__) defined within the public class called Null.The function start at line 15 and ends at 16. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [15.0], and this function return a value. It has 4.0 functions calling this function which are ["_... |
Sema4AI_actions | Null | public | 0 | 0 | __exit__ | def __exit__(self, *args, **kwargs):return self | 1 | 2 | 3 | 13 | 0 | 18 | 19 | 18 | self,*args,**kwargs | [] | Returns | {"Return": 1} | 0 | 2 | 0 | [] | 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 Null.The function start at line 18 and ends at 19. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [18.0], and this function return a value. It has 5.0 functions calling this function which are ["_.... |
Sema4AI_actions | Null | public | 0 | 0 | __getattr__ | def __getattr__(self, mname):if len(mname) > 4 and mname[:2] == "__" and mname[-2:] == "__":# Don't pretend to implement special method names.raise AttributeError(mname)return self | 4 | 4 | 2 | 39 | 0 | 21 | 25 | 21 | self,mname | [] | Returns | {"If": 1, "Return": 1} | 2 | 5 | 2 | ["len", "AttributeError"] | 12 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3625043_uber_tchannel_python.tchannel.event_py.EventRegistrar.__getattr__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69528069_adrotog_pandasgui.pandasgui.datasets_py.__getattr__", "_.content.gdrive.MyDrive.Phd_... | The function (__getattr__) defined within the public class called Null.The function start at line 21 and ends at 25. It contains 4 lines of code and it has a cyclomatic complexity of 4. It takes 2 parameters, represented as [21.0], and this function return a value. It declares 2.0 functions, It has 2.0 functions called... |
Sema4AI_actions | Null | public | 0 | 0 | __setattr__ | def __setattr__(self, name, value):return self | 1 | 2 | 3 | 11 | 0 | 27 | 28 | 27 | self,name,value | [] | Returns | {"Return": 1} | 0 | 2 | 0 | [] | 30 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3670790_opencivicdata_pupa.pupa.scrape.base_py.BaseModel.__setattr__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3676862_pecan_pecan.pecan.configuration_py.Config.__setattr__", "_.content.gdrive.MyDrive.Phd_Thes... | The function (__setattr__) defined within the public class called Null.The function start at line 27 and ends at 28. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [27.0], and this function return a value. It has 30.0 functions calling this function which are ... |
Sema4AI_actions | Null | public | 0 | 0 | __delattr__ | def __delattr__(self, name):return self | 1 | 2 | 2 | 9 | 0 | 30 | 31 | 30 | self,name | [] | Returns | {"Return": 1} | 0 | 2 | 0 | [] | 0 | [] | The function (__delattr__) defined within the public class called Null.The function start at line 30 and ends at 31. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [30.0], and this function return a value.. |
Sema4AI_actions | Null | public | 0 | 0 | __repr__ | def __repr__(self):return "<Null>" | 1 | 2 | 1 | 7 | 0 | 33 | 34 | 33 | self | [] | Returns | {"Return": 1} | 0 | 2 | 0 | [] | 54 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3581153_zetaops_pyoko.pyoko.listnode_py.ListNode.__repr__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3585282_geier_pycarddav.pycarddav.model_py.VCard.serialize", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Cre... | The function (__repr__) defined within the public class called Null.The function start at line 33 and ends at 34. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It has 54.0 functions calling this function which are ["_.co... |
Sema4AI_actions | Null | public | 0 | 0 | __str__ | def __str__(self):return "Null" | 1 | 2 | 1 | 7 | 0 | 36 | 37 | 36 | self | [] | Returns | {"Return": 1} | 0 | 2 | 0 | [] | 83 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3675814_usyd_blockchain_vandal.src.evm_cfg_py.EVMBasicBlock.__str__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3675814_usyd_blockchain_vandal.src.tac_cfg_py.TACBasicBlock.__str__", "_.content.gdrive.MyDrive.Phd... | The function (__str__) defined within the public class called Null.The function start at line 36 and ends at 37. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It has 83.0 functions calling this function which are ["_.con... |
Sema4AI_actions | Null | public | 0 | 0 | __len__ | def __len__(self):return 0 | 1 | 2 | 1 | 7 | 0 | 39 | 40 | 39 | self | [] | Returns | {"Return": 1} | 0 | 2 | 0 | [] | 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 Null.The function start at line 39 and ends at 40. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It has 3.0 functions calling this function which are ["_.cont... |
Sema4AI_actions | Null | public | 0 | 0 | __getitem__ | def __getitem__(self, *args, **kwargs):return self | 1 | 2 | 3 | 13 | 0 | 42 | 43 | 42 | self,*args,**kwargs | [] | Returns | {"Return": 1} | 0 | 2 | 0 | [] | 33 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3392496_unipitechnology_evok.evok.devices_py.DeviceList.__getitem__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3535398_idsia_brainstorm.brainstorm.structure.buffer_views_py.BufferView.__getitem__", "_.content.g... | The function (__getitem__) defined within the public class called Null.The function start at line 42 and ends at 43. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [42.0], and this function return a value. It has 33.0 functions calling this function which are ... |
Sema4AI_actions | Null | public | 0 | 0 | __setitem__ | def __setitem__(self, *args, **kwargs):pass | 1 | 2 | 3 | 12 | 0 | 45 | 46 | 45 | self,*args,**kwargs | [] | None | {} | 0 | 2 | 0 | [] | 32 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3392496_unipitechnology_evok.evok.devices_py.DeviceList.__setitem__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3544475_chromium_web_page_replay.third_party.dns.namedict_py.NameDict.__setitem__", "_.content.gdri... | The function (__setitem__) defined within the public class called Null.The function start at line 45 and ends at 46. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [45.0] and does not return any value. It has 32.0 functions calling this function which are ["_.... |
Sema4AI_actions | Null | public | 0 | 0 | write | def write(self, *args, **kwargs):pass | 1 | 2 | 3 | 12 | 0 | 48 | 49 | 48 | self,*args,**kwargs | [] | None | {} | 0 | 2 | 0 | [] | 120 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3495544_aio_libs_multidict.tests.gen_pickles_py.generate", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3511986_dart_archive_pub_dartlang.third_party.cherrypy.process.plugins_py.PIDFile.start", "_.content.gdrive.My... | The function (write) defined within the public class called Null.The function start at line 48 and ends at 49. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [48.0] and does not return any value. It has 120.0 functions calling this function which are ["_.conte... |
Sema4AI_actions | Null | public | 0 | 0 | __nonzero__ | def __nonzero__(self):return 0 | 1 | 2 | 1 | 7 | 0 | 51 | 52 | 51 | self | [] | Returns | {"Return": 1} | 0 | 2 | 0 | [] | 0 | [] | The function (__nonzero__) defined within the public class called Null.The function start at line 51 and ends at 52. 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 | Null | public | 0 | 0 | __iter__ | def __iter__(self):return iter(()) | 1 | 2 | 1 | 11 | 0 | 54 | 55 | 54 | self | [] | Returns | {"Return": 1} | 1 | 2 | 1 | ["iter"] | 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 Null.The function start at line 54 and ends at 55. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declare 1.0 function, It has 1.0 function called inside w... |
Sema4AI_actions | OAuth2ProviderSettings | public | 0 | 0 | model_dump | def model_dump(self) -> dict:import copyret = {}for field_name, field_info in self.__class__.__dataclass_fields__.items():value = getattr(self, field_name)field_type = field_info.typeif field_type == str:ret[field_name] = valueelse:ret[field_name] = copy.copy(value)return ret | 3 | 11 | 1 | 67 | 0 | 22 | 35 | 22 | self | [] | dict | {"Assign": 5, "For": 1, "If": 1, "Return": 1} | 3 | 14 | 3 | ["self.__class__.__dataclass_fields__.items", "getattr", "copy.copy"] | 28 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3690807_ethereum_eth_utils.tests.core.pydantic_utils.test_camel_model_py.test_camel_model_dump", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69279284_espressif_idf_component_manager.idf_component_tools.manifest.mo... | The function (model_dump) defined within the public class called OAuth2ProviderSettings.The function start at line 22 and ends at 35. It contains 11 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 3.0 functions, It has 3.0 funct... |
Sema4AI_actions | OAuth2ProviderSettings | public | 0 | 0 | model_validate | def model_validate(cls, dct):try:settings = cls(**dct)except Exception as e:raise RuntimeError(f"Invalid OAuth2 settings. Original error: {str(e)}")for field_name, field_info in cls.__dataclass_fields__.items():field_type = field_info.typevalue = getattr(settings, field_name)if field_name in ("authParams", "additionalH... | 10 | 30 | 2 | 141 | 0 | 38 | 72 | 38 | cls,dct | [] | Returns | {"Assign": 3, "For": 2, "If": 6, "Return": 1, "Try": 1} | 16 | 35 | 16 | ["cls", "RuntimeError", "str", "cls.__dataclass_fields__.items", "getattr", "isinstance", "TypeError", "type", "value.items", "isinstance", "TypeError", "isinstance", "TypeError", "isinstance", "TypeError", "type"] | 16 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69279284_espressif_idf_component_manager.idf_component_tools.manifest.models_py.Manifest.validate_manifest", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.tests.action_server_t... | The function (model_validate) defined within the public class called OAuth2ProviderSettings.The function start at line 38 and ends at 72. It contains 30 lines of code and it has a cyclomatic complexity of 10. It takes 2 parameters, represented as [38.0], and this function return a value. It declares 16.0 functions, It ... |
Sema4AI_actions | public | public | 0 | 0 | get_oauthlib2_user_settings | def get_oauthlib2_user_settings(oauth2_settings_file: str,) -> dict[str, Any]:"""Provides the global settings for doing an OAuth2 authentication(should be a mapping of provider->provider info)."""import yamlp = Path(oauth2_settings_file)if not p.exists():raise RuntimeError(f"Unable to make OAuth2 login because the oaut... | 4 | 21 | 1 | 86 | 2 | 127 | 155 | 127 | oauth2_settings_file | ['contents', 'p'] | dict[str, Any] | {"Assign": 2, "Expr": 1, "If": 2, "Return": 1, "Try": 1, "With": 1} | 8 | 29 | 8 | ["Path", "p.exists", "RuntimeError", "p.open", "yaml.safe_load", "RuntimeError", "isinstance", "RuntimeError"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server.vendored_deps.oauth2_settings_py.get_oauthlib2_provider_settings", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.common.src.s... | The function (get_oauthlib2_user_settings) defined within the public class called public.The function start at line 127 and ends at 155. It contains 21 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters and does not return any value. It declares 8.0 functions, It has 8.0 fu... |
Sema4AI_actions | public | public | 0 | 0 | set_sema4ai_provided_oauth2_config_getter | def set_sema4ai_provided_oauth2_config_getter(getter: Callable[[], str]) -> None:"""Sets a function that will be called to get the Sema4.ai provided oauth2config.Usually something running: `action-server oauth2 sema4ai-config`."""global _SEMA4AI_PROVIDED_OAUTH2_CONFIG_GETTER_SEMA4AI_PROVIDED_OAUTH2_CONFIG_GETTER = gett... | 1 | 3 | 1 | 21 | 1 | 161 | 169 | 161 | getter | ['_SEMA4AI_PROVIDED_OAUTH2_CONFIG_GETTER'] | None | {"Assign": 1, "Expr": 1} | 0 | 9 | 0 | [] | 0 | [] | The function (set_sema4ai_provided_oauth2_config_getter) defined within the public class called public.The function start at line 161 and ends at 169. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
Sema4AI_actions | public | public | 0 | 0 | get_sema4ai_provided_oauth2_config | def get_sema4ai_provided_oauth2_config() -> str:if _SEMA4AI_PROVIDED_OAUTH2_CONFIG_GETTER is None:raise RuntimeError("Sema4.ai provided oauth2 config getter not set -- note: `action-server oauth2 sema4ai-config` can be used to get it.")return _SEMA4AI_PROVIDED_OAUTH2_CONFIG_GETTER() | 2 | 6 | 0 | 20 | 0 | 172 | 177 | 172 | [] | str | {"If": 1, "Return": 1} | 2 | 6 | 2 | ["RuntimeError", "_SEMA4AI_PROVIDED_OAUTH2_CONFIG_GETTER"] | 3 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server._oauth2_py._print_sema4ai_oauth2_config", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_serv... | The function (get_sema4ai_provided_oauth2_config) defined within the public class called public.The function start at line 172 and ends at 177. It contains 6 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 2.0 functions, It has ... | |
Sema4AI_actions | public | public | 0 | 0 | _get_oauthlib2_sema4ai_settings | def _get_oauthlib2_sema4ai_settings(provider: str) -> dict:import yamlcontents = get_sema4ai_provided_oauth2_config()dct = yaml.safe_load(contents)if not isinstance(dct, dict):raise RuntimeError("Expected the Sema4.ai oauth2 config to be a yaml.")oauth2_config = _require("oauth2Config", dct)providers = _require("provid... | 4 | 16 | 1 | 89 | 5 | 180 | 200 | 180 | provider | ['providers', 'settings', 'contents', 'dct', 'oauth2_config'] | dict | {"Assign": 5, "If": 3, "Return": 1} | 10 | 21 | 10 | ["get_sema4ai_provided_oauth2_config", "yaml.safe_load", "isinstance", "RuntimeError", "_require", "_require", "providers.get", "RuntimeError", "isinstance", "RuntimeError"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server.vendored_deps.oauth2_settings_py.get_oauthlib2_provider_settings", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.common.src.s... | The function (_get_oauthlib2_sema4ai_settings) defined within the public class called public.The function start at line 180 and ends at 200. It contains 16 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters and does not return any value. It declares 10.0 functions, It has 1... |
Sema4AI_actions | public | public | 0 | 0 | _require | def _require(key: str, dct: dict) -> Any:found = dct.get(key, None)if found is None:raise RuntimeError(f"Expected '{key}' to be in Oauth2 settings.")return found | 2 | 5 | 2 | 36 | 1 | 203 | 207 | 203 | key,dct | ['found'] | Any | {"Assign": 1, "If": 1, "Return": 1} | 2 | 5 | 2 | ["dct.get", "RuntimeError"] | 4 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server.vendored_deps.oauth2_settings_py._get_oauthlib2_sema4ai_settings", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_serve... | The function (_require) defined within the public class called public.The function start at line 203 and ends at 207. It contains 5 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [203.0] and does not return any value. It declares 2.0 functions, It has 2.0 functions called i... |
Sema4AI_actions | public | public | 0 | 0 | get_oauthlib2_provider_settings | def get_oauthlib2_provider_settings(provider: str, oauth2_settings_file: str) -> OAuth2ProviderSettingsResolved:"""Gets the OAuth2 settings to be used for a given provider."""contents = get_oauthlib2_user_settings(oauth2_settings_file)oauth2_config = _require("oauth2Config", contents)providers = _require("providers", o... | 14 | 54 | 2 | 253 | 10 | 210 | 289 | 210 | provider,oauth2_settings_file | ['default_settings', 'providers', 'use_server', 'mode', 'settings', 'as_dict', 'ret', 'value', 'contents', 'oauth2_config'] | OAuth2ProviderSettingsResolved | {"Assign": 14, "Expr": 2, "For": 1, "If": 12, "Return": 1} | 23 | 80 | 23 | ["get_oauthlib2_user_settings", "_require", "_require", "providers.get", "RuntimeError", "isinstance", "RuntimeError", "settings.get", "RuntimeError", "RuntimeError", "_get_oauthlib2_sema4ai_settings", "RuntimeError", "_DEFAULT_OAUTH2_SETTINGS.get", "OAuth2ProviderSettings", "_deep_update", "default_settings.model_dump... | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server._api_oauth2_py.get_resolved_provider_settings", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.tests.action_serv... | The function (get_oauthlib2_provider_settings) defined within the public class called public.The function start at line 210 and ends at 289. It contains 54 lines of code and it has a cyclomatic complexity of 14. It takes 2 parameters, represented as [210.0] and does not return any value. It declares 23.0 functions, It ... |
Sema4AI_actions | public | public | 0 | 0 | _deep_update | def _deep_update(dict1: dict, dict2: dict) -> dict:"""Merges two dictionaries recursively.Returns:A new dictionary with the merged content."""merged = dict1.copy()for key, value in dict2.items():if key in dict1:if isinstance(value, dict) and isinstance(dict1[key], dict):merged[key] = _deep_update(dict1[key], value)else... | 5 | 11 | 2 | 87 | 1 | 292 | 308 | 292 | dict1,dict2 | ['merged'] | dict | {"Assign": 4, "Expr": 1, "For": 1, "If": 2, "Return": 1} | 5 | 17 | 5 | ["dict1.copy", "dict2.items", "isinstance", "isinstance", "_deep_update"] | 4 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server.vendored_deps.oauth2_settings_py._deep_update", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.actio... | The function (_deep_update) defined within the public class called public.The function start at line 292 and ends at 308. It contains 11 lines of code and it has a cyclomatic complexity of 5. It takes 2 parameters, represented as [292.0] and does not return any value. It declares 5.0 functions, It has 5.0 functions cal... |
Sema4AI_actions | public | public | 0 | 0 | is_process_alive | def is_process_alive(pid):"""Check whether the process with the given pid is still alive.Running `os.kill()` on Windows always exits the process, so it can't be used tocheck for an alive process.see: https://docs.python.org/3/library/os.html?highlight=os%20kill#os.killHence ctypes is used to check for the process direc... | 4 | 10 | 1 | 48 | 0 | 49 | 74 | 49 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (is_process_alive) defined within the public class called public.The function start at line 49 and ends at 74. It contains 10 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters and does not return any value.. |
Sema4AI_actions | public | public | 0 | 0 | _is_process_alive | def _is_process_alive(pid):"""Check whether the process with the given pid is still alive.Args:pid (int): process IDReturns:bool: False if the process is not alive or don't have permission to check,True otherwise."""if pid < 0:return Falsetry:os.kill(pid, 0)except OSError as e:if e.errno == errno.ESRCH:return False# No... | 5 | 15 | 1 | 68 | 0 | 78 | 101 | 78 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (_is_process_alive) defined within the public class called public.The function start at line 78 and ends at 101. It contains 15 lines of code and it has a cyclomatic complexity of 5. The function does not take any parameters and does not return any value.. |
Sema4AI_actions | public | public | 0 | 0 | is_process_alive | def is_process_alive(pid):if _is_process_alive(pid):# Check if zombie...try:cmd = ["ps", "-p", str(pid), "-o", "stat"]try:process = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)except Exception:log.exception("Error calling: %s.", " ".join(cmd))else:stdout, _ = process.communicate()stdout = stdou... | 7 | 21 | 1 | 139 | 0 | 103 | 125 | 103 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (is_process_alive) defined within the public class called public.The function start at line 103 and ends at 125. It contains 21 lines of code and it has a cyclomatic complexity of 7. The function does not take any parameters and does not return any value.. |
Sema4AI_actions | public | public | 0 | 0 | _stream_reader | def _stream_reader(stream, on_output):try:for line in iter(stream.readline, b""):if not line:breaktry:on_output(line)except Exception as e:log.error("Error reporting output line: %s", e)except Exception as e:log.error("Error reading stream: %s", e) | 5 | 11 | 2 | 59 | 0 | 134 | 144 | 134 | stream,on_output | [] | None | {"Expr": 3, "For": 1, "If": 1, "Try": 2} | 4 | 11 | 4 | ["iter", "on_output", "log.error", "log.error"] | 0 | [] | The function (_stream_reader) defined within the public class called public.The function start at line 134 and ends at 144. It contains 11 lines of code and it has a cyclomatic complexity of 5. It takes 2 parameters, represented as [134.0] and does not return any value. It declares 4.0 functions, and It has 4.0 functi... |
Sema4AI_actions | public | public | 0 | 0 | _start_reader_threads | def _start_reader_threads(process, on_stdout, on_stderr):threads = []if on_stdout is not None:threads.append(threading.Thread(target=_stream_reader,args=(process.stdout, on_stdout),name="stream_reader_stdout",))if on_stderr is not None:threads.append(threading.Thread(target=_stream_reader,args=(process.stderr, on_stder... | 4 | 20 | 3 | 91 | 1 | 147 | 168 | 147 | process,on_stdout,on_stderr | ['threads'] | None | {"Assign": 1, "Expr": 3, "For": 1, "If": 2} | 5 | 22 | 5 | ["threads.append", "threading.Thread", "threads.append", "threading.Thread", "t.start"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server._robo_utils.process_py.Process.start", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.common.src.sema4ai.common.process_py.Pro... | The function (_start_reader_threads) defined within the public class called public.The function start at line 147 and ends at 168. It contains 20 lines of code and it has a cyclomatic complexity of 4. It takes 3 parameters, represented as [147.0] and does not return any value. It declares 5.0 functions, It has 5.0 func... |
Sema4AI_actions | Process | public | 0 | 0 | __init__ | def __init__(self,args: List[str],cwd: Optional[PathLike] = None,env: Optional[Dict[str, str]] = None,):self._args = argsself._uid = next(self._UID)self._cwd = cwd or Path.cwd()self._env = {**os.environ, **(env or {})}self._proc: Optional[subprocess.Popen] = Noneself.on_stderr = Callback()self.on_stdout = Callback() | 3 | 13 | 4 | 106 | 0 | 174 | 186 | 174 | self,args,cwd,env | [] | None | {"AnnAssign": 1, "Assign": 6} | 4 | 13 | 4 | ["next", "Path.cwd", "Callback", "Callback"] | 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 Process.The function start at line 174 and ends at 186. It contains 13 lines of code and it has a cyclomatic complexity of 3. It takes 4 parameters, represented as [174.0] and does not return any value. It declares 4.0 functions, It has 4.0 functions called... |
Sema4AI_actions | Process | public | 0 | 0 | is_alive | def is_alive(self):if self._proc is None:raise RuntimeError("Process is still None (start() not called before is_alive).")return is_process_alive(self._proc.pid) | 2 | 6 | 1 | 26 | 0 | 188 | 194 | 188 | self | [] | Returns | {"If": 1, "Return": 1} | 2 | 7 | 2 | ["RuntimeError", "is_process_alive"] | 0 | [] | The function (is_alive) defined within the public class called Process.The function start at line 188 and ends at 194. It contains 6 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 2.0 functions, and It has 2.0 functions ca... |
Sema4AI_actions | Process | public | 0 | 0 | returncode | def returncode(self):if self._proc is None:raise RuntimeError("Process is still None (start() not called before returncode).")return self._proc.poll() | 2 | 6 | 1 | 25 | 0 | 197 | 202 | 197 | self | [] | Returns | {"If": 1, "Return": 1} | 2 | 6 | 2 | ["RuntimeError", "self._proc.poll"] | 0 | [] | The function (returncode) defined within the public class called Process.The function start at line 197 and ends at 202. It contains 6 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 2.0 functions, and It has 2.0 functions ... |
Sema4AI_actions | Process | public | 0 | 0 | join | def join(self):if self._proc is None:raise RuntimeError("Process is still None (start() not called before join).")self._proc.wait() | 2 | 6 | 1 | 24 | 0 | 204 | 209 | 204 | self | [] | None | {"Expr": 1, "If": 1} | 2 | 6 | 2 | ["RuntimeError", "self._proc.wait"] | 6,259 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.tests.TestCollectors_py.TestCollectors.test_collector_metrics", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.tools.Vrops_py.Vrops.get_resources", "_.conte... | The function (join) defined within the public class called Process.The function start at line 204 and ends at 209. It contains 6 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 2.0 functions, It has 2.0 functions called inside w... |
Sema4AI_actions | Process | public | 0 | 0 | stream_to | def stream_to(self, stream):self.on_stdout.register(stream.write)self.on_stderr.register(stream.write) | 1 | 3 | 2 | 27 | 0 | 211 | 213 | 211 | self,stream | [] | None | {"Expr": 2} | 2 | 3 | 2 | ["self.on_stdout.register", "self.on_stderr.register"] | 0 | [] | The function (stream_to) defined within the public class called Process.The function start at line 211 and ends at 213. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [211.0] and does not return any value. It declares 2.0 functions, and It has 2.0 functions c... |
Sema4AI_actions | Process | public | 0 | 0 | start | def start(self, read_stderr: bool = True, read_stdout: bool = True, **kwargs) -> None:new_kwargs = build_subprocess_kwargs(self._cwd, self._env, stdout=subprocess.PIPE, stderr=subprocess.PIPE)new_kwargs.update(kwargs)log.debug("Subprocess start [args=%s,cwd=%s,uid=%d]", self._args, self._cwd, self._uid)proc = self._pro... | 3 | 19 | 4 | 131 | 0 | 215 | 234 | 215 | self,read_stderr,read_stdout,**kwargs | [] | None | {"Assign": 6, "Expr": 4, "If": 2} | 6 | 20 | 6 | ["build_subprocess_kwargs", "new_kwargs.update", "log.debug", "_popen_raise", "log.debug", "_start_reader_threads"] | 136 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3511986_dart_archive_pub_dartlang.third_party.cherrypy.test.test_bus_py.BusMethodTests.test_block", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3511986_dart_archive_pub_dartlang.third_party.cherrypy.test.test_bus_... | The function (start) defined within the public class called Process.The function start at line 215 and ends at 234. It contains 19 lines of code and it has a cyclomatic complexity of 3. It takes 4 parameters, represented as [215.0] and does not return any value. It declares 6.0 functions, It has 6.0 functions called in... |
Sema4AI_actions | Process | public | 0 | 0 | _on_stderr | def _on_stderr(self, line):if len(self.on_stderr) > 0:self.on_stderr(line.decode("utf-8", "replace")) | 2 | 3 | 2 | 30 | 0 | 236 | 238 | 236 | self,line | [] | None | {"Expr": 1, "If": 1} | 3 | 3 | 3 | ["len", "self.on_stderr", "line.decode"] | 0 | [] | The function (_on_stderr) defined within the public class called Process.The function start at line 236 and ends at 238. It contains 3 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [236.0] and does not return any value. It declares 3.0 functions, and It has 3.0 functions ... |
Sema4AI_actions | Process | public | 0 | 0 | _on_stdout | def _on_stdout(self, line):if len(self.on_stdout) > 0:self.on_stdout(line.decode("utf-8", "replace")) | 2 | 3 | 2 | 30 | 0 | 240 | 242 | 240 | self,line | [] | None | {"Expr": 1, "If": 1} | 3 | 3 | 3 | ["len", "self.on_stdout", "line.decode"] | 0 | [] | The function (_on_stdout) defined within the public class called Process.The function start at line 240 and ends at 242. It contains 3 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [240.0] and does not return any value. It declares 3.0 functions, and It has 3.0 functions ... |
Sema4AI_actions | Process | public | 0 | 0 | stop | def stop(self) -> None:if not self._proc:returnif self._proc.poll() is not None:returnif not self.is_alive():returnlog.debug("Subprocess kill [pid=%s,uid=%d]", self._proc.pid, self._uid)kill_process_and_subprocesses(self._proc.pid) | 4 | 9 | 1 | 60 | 0 | 244 | 253 | 244 | self | [] | None | {"Expr": 2, "If": 3, "Return": 3} | 4 | 10 | 4 | ["self._proc.poll", "self.is_alive", "log.debug", "kill_process_and_subprocesses"] | 35 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3392496_unipitechnology_evok.evok.evok_py.main", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3595150_twisted_txaws.txaws.reactor_py.get_exitcode_reactor", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Outp... | The function (stop) defined within the public class called Process.The function start at line 244 and ends at 253. It contains 9 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters and does not return any value. It declares 4.0 functions, It has 4.0 functions called inside w... |
Sema4AI_actions | Process | public | 0 | 0 | pid | def pid(self):return self._proc.pid | 1 | 2 | 1 | 11 | 0 | 256 | 257 | 256 | self | [] | Returns | {"Return": 1} | 0 | 2 | 0 | [] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3653784_wrobell_geotiler.geotiler.provider_py.providers"] | The function (pid) defined within the public class called Process.The function start at line 256 and ends at 257. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It has 1.0 function calling this function which is ["_.conte... |
Sema4AI_actions | Process | public | 0 | 0 | __str__ | def __str__(self):return f"Process [{subprocess.list2cmdline(self._args)}, cwd={self._cwd}, pid={self._proc.pid}, uid={self._uid}]" | 1 | 2 | 1 | 8 | 0 | 259 | 260 | 259 | self | [] | Returns | {"Return": 1} | 1 | 2 | 1 | ["subprocess.list2cmdline"] | 83 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3675814_usyd_blockchain_vandal.src.evm_cfg_py.EVMBasicBlock.__str__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3675814_usyd_blockchain_vandal.src.tac_cfg_py.TACBasicBlock.__str__", "_.content.gdrive.MyDrive.Phd... | The function (__str__) defined within the public class called Process.The function start at line 259 and ends at 260. 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 insi... |
Sema4AI_actions | Process | public | 0 | 0 | __repr__ | def __repr__(self):return str(self) | 1 | 2 | 1 | 10 | 0 | 262 | 263 | 262 | self | [] | Returns | {"Return": 1} | 1 | 2 | 1 | ["str"] | 54 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3581153_zetaops_pyoko.pyoko.listnode_py.ListNode.__repr__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3585282_geier_pycarddav.pycarddav.model_py.VCard.serialize", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Cre... | The function (__repr__) defined within the public class called Process.The function start at line 262 and ends at 263. 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 ins... |
Sema4AI_actions | public | public | 0 | 0 | build_subprocess_kwargs | def build_subprocess_kwargs(cwd, env, **kwargs) -> dict:startupinfo = Noneif sys.platform == "win32":# We don't want to show the shell on windows!startupinfo = subprocess.STARTUPINFO()startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOWstartupinfo.wShowWindow = subprocess.SW_HIDEstartupinfo = startupinfoif cwd:kwargs... | 4 | 13 | 3 | 72 | 1 | 266 | 280 | 266 | cwd,env,**kwargs | ['startupinfo'] | dict | {"Assign": 7, "AugAssign": 1, "If": 3, "Return": 1} | 1 | 15 | 1 | ["subprocess.STARTUPINFO"] | 6 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server._actions_process_pool_py.ProcessHandle.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.act... | The function (build_subprocess_kwargs) defined within the public class called public.The function start at line 266 and ends at 280. It contains 13 lines of code and it has a cyclomatic complexity of 4. It takes 3 parameters, represented as [266.0] and does not return any value. It declare 1.0 function, It has 1.0 func... |
Sema4AI_actions | public | public | 0 | 0 | build_python_launch_env | def build_python_launch_env(new_env_vars: dict[str, str]) -> dict[str, str]:"""Args:new_env_vars: If empty this means that this is an unmanaged env. In thiscase the environment used will be the same one used to run theaction server itself."""if sys.platform == "win32":env = {}for k, v in os.environ.items():env[k.upper(... | 4 | 15 | 1 | 111 | 1 | 283 | 313 | 283 | new_env_vars | ['env'] | dict[str, str] | {"Assign": 5, "Expr": 5, "For": 1, "If": 2, "Return": 1} | 7 | 31 | 7 | ["os.environ.items", "k.upper", "dict", "env.pop", "env.pop", "env.pop", "env.update"] | 4 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server._actions_import_py.import_action_package", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_ser... | The function (build_python_launch_env) defined within the public class called public.The function start at line 283 and ends at 313. It contains 15 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters and does not return any value. It declares 7.0 functions, It has 7.0 functi... |
Sema4AI_actions | public | public | 0 | 0 | _popen | def _popen(cmdline, **kwargs):try:popen = subprocess.Popen(cmdline, **kwargs)# Not sure why, but (just when running in VSCode) something as:# launching sys.executable actually got stuck unless a \n was written# (even if stdin was closed it wasn't enough).# -- note: this may be particular to my machine (fabioz), but it#... | 2 | 8 | 2 | 50 | 1 | 316 | 328 | 316 | cmdline,**kwargs | ['popen'] | Returns | {"Assign": 1, "Expr": 2, "Return": 2, "Try": 1} | 4 | 13 | 4 | ["subprocess.Popen", "_stdin_write", "log.exception", "join"] | 21 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3662260_ghostofgoes_getmac.getmac.getmac_py.ArpExe.get", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3662260_ghostofgoes_getmac.getmac.getmac_py.ArpFreebsd.get", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creati... | The function (_popen) defined within the public class called public.The function start at line 316 and ends at 328. It contains 8 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [316.0], and this function return a value. It declares 4.0 functions, It has 4.0 functions called... |
Sema4AI_actions | public | public | 0 | 0 | _popen_raise | def _popen_raise(cmdline, **kwargs):try:popen = subprocess.Popen(cmdline, **kwargs)# Not sure why, but (just when running in VSCode) something as:# launching sys.executable actually got stuck unless a \n was written# (even if stdin was closed it wasn't enough).# -- note: this may be particular to my machine (fabioz), b... | 2 | 8 | 2 | 49 | 1 | 331 | 343 | 331 | cmdline,**kwargs | ['popen'] | Returns | {"Assign": 1, "Expr": 2, "Return": 1, "Try": 1} | 4 | 13 | 4 | ["subprocess.Popen", "_stdin_write", "log.exception", "join"] | 4 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server._robo_utils.process_py.Process.start", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server.... | The function (_popen_raise) defined within the public class called public.The function start at line 331 and ends at 343. It contains 8 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [331.0], and this function return a value. It declares 4.0 functions, It has 4.0 functions ... |
Sema4AI_actions | public | public | 0 | 0 | _stdin_write | def _stdin_write(process, input):if process.stdin is not None:if input:try:process.stdin.write(input)except BrokenPipeError:pass# communicate() must ignore broken pipe errors.except OSError as exc:if exc.errno == errno.EINVAL:# bpo-19612, bpo-30418: On Windows, stdin.write() fails# with EINVAL if the child process exit... | 9 | 21 | 2 | 81 | 0 | 346 | 370 | 346 | process,input | [] | None | {"Expr": 2, "If": 4, "Try": 2} | 2 | 25 | 2 | ["process.stdin.write", "process.stdin.close"] | 5 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server._robo_utils.process_py._popen", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server._robo_u... | The function (_stdin_write) defined within the public class called public.The function start at line 346 and ends at 370. It contains 21 lines of code and it has a cyclomatic complexity of 9. It takes 2 parameters, represented as [346.0] and does not return any value. It declares 2.0 functions, It has 2.0 functions cal... |
Sema4AI_actions | public | public | 0 | 0 | _call | def _call(cmdline, **kwargs):try:subprocess.check_call(cmdline, **kwargs)except Exception:log.exception("Error running: %s", (" ".join(cmdline)))return None | 2 | 6 | 2 | 39 | 0 | 373 | 378 | 373 | cmdline,**kwargs | [] | Returns | {"Expr": 2, "Return": 1, "Try": 1} | 3 | 6 | 3 | ["subprocess.check_call", "log.exception", "join"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69765524_openshift_elliott.tests.test_errata_async_py.TestAsyncErrataAPI.test_get_cve_package_exclusions"] | The function (_call) defined within the public class called public.The function start at line 373 and ends at 378. It contains 6 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [373.0], and this function return a value. It declares 3.0 functions, It has 3.0 functions called ... |
Sema4AI_actions | public | public | 0 | 0 | kill_process_and_subprocesses | def kill_process_and_subprocesses(pid, soft_kill_timeout: float = 1.0):log.debug("Killing process and subprocesses of: %s", pid)import psutiltry:proc = psutil.Process(int(pid))proc_children = proc.children(recursive=True)all_processes = [proc] + proc_children# Terminate (soft-kill) all processesfor p in all_processes:t... | 9 | 26 | 2 | 151 | 3 | 381 | 414 | 381 | pid,soft_kill_timeout | ['proc_children', 'all_processes', 'proc'] | None | {"Assign": 4, "Expr": 7, "For": 2, "Try": 3} | 11 | 34 | 11 | ["log.debug", "psutil.Process", "int", "proc.children", "p.terminate", "log.debug", "psutil.wait_procs", "p.kill", "log.debug", "log.debug", "log.debug"] | 11 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server._actions_process_pool_py.ProcessHandle.kill", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_... | The function (kill_process_and_subprocesses) defined within the public class called public.The function start at line 381 and ends at 414. It contains 26 lines of code and it has a cyclomatic complexity of 9. It takes 2 parameters, represented as [381.0] and does not return any value. It declares 11.0 functions, It has... |
Sema4AI_actions | public | public | 0 | 0 | kill_subprocesses | def kill_subprocesses(pid: int | None = None, soft_kill_timeout: float = 2) -> None:"""Kills all subprocesses of the given pid (if not passed, kills all subprocesses of the current process)."""import psutilif pid is None:parent_process = psutil.Process()else:try:parent_process = psutil.Process(pid)except Exception:# If... | 11 | 35 | 2 | 207 | 3 | 417 | 464 | 417 | pid,soft_kill_timeout | ['parent_process', 'children_processes', 'names'] | None | {"Assign": 7, "Expr": 10, "For": 2, "If": 1, "Return": 1, "Try": 6} | 18 | 48 | 18 | ["psutil.Process", "psutil.Process", "log.exception", "list", "parent_process.children", "list", "parent_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"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server._cli_impl_py._command_requiring_datadir", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.common.src.sema4ai.common.autoexit_py... | The function (kill_subprocesses) defined within the public class called public.The function start at line 417 and ends at 464. It contains 35 lines of code and it has a cyclomatic complexity of 11. It takes 2 parameters, represented as [417.0] and does not return any value. It declares 18.0 functions, It has 18.0 funct... |
Sema4AI_actions | IProgressReporter | public | 1 | 1 | cancelled | def cancelled(self) -> bool:pass | 1 | 2 | 1 | 8 | 0 | 469 | 470 | 469 | self | [] | bool | {} | 0 | 2 | 0 | [] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94638225_rozari0_NezukoBot.nezuko.core.tasks_py.rm_task"] | The function (cancelled) defined within the public class called IProgressReporter, implement an interface, and it inherit another class.The function start at line 469 and ends at 470. 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 v... |
Sema4AI_actions | IProgressReporter | public | 1 | 1 | set_additional_info | def set_additional_info(self, additional_info: str) -> None:"""The progress reporter shows the title and elapsed time automatically.With this API it's possible to add additional info for the user to see.""" | 1 | 1 | 2 | 12 | 0 | 472 | 477 | 472 | self,additional_info | [] | None | {"Expr": 1} | 0 | 6 | 0 | [] | 0 | [] | The function (set_additional_info) defined within the public class called IProgressReporter, implement an interface, and it inherit another class.The function start at line 472 and ends at 477. It contains 1 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [472.0] and does no... |
Sema4AI_actions | public | public | 0 | 0 | check_output_interactive.noop | def noop(*args, **kwargs):pass | 1 | 2 | 2 | 10 | 0 | 506 | 507 | 506 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (check_output_interactive.noop) defined within the public class called public.The function start at line 506 and ends at 507. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [506.0] and does not return any value.. |
Sema4AI_actions | public | public | 0 | 0 | check_output_interactive.stream_reader | def stream_reader(stream, callback, contents_list: List[bytes]):for line in iter(stream.readline, b""):if not line:breakcontents_list.append(line)callback(line) | 3 | 6 | 3 | 42 | 0 | 529 | 534 | 529 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (check_output_interactive.stream_reader) defined within the public class called public.The function start at line 529 and ends at 534. It contains 6 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [529.0] and does not return any value.. |
Sema4AI_actions | public | public | 0 | 0 | check_output_interactive.check_progress_cancelled | def check_progress_cancelled(process, progress_reporter: IProgressReporter):try:while process.poll() is None:try:process.wait(1)except BaseException:if progress_reporter.cancelled:retcode = process.poll()if retcode is None:msg_str = f"Progress was cancelled (RCC pid: {process.pid} was killed).\n"msg = msg_str.encode("u... | 6 | 18 | 2 | 99 | 0 | 536 | 553 | 536 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (check_output_interactive.check_progress_cancelled) defined within the public class called public.The function start at line 536 and ends at 553. It contains 18 lines of code and it has a cyclomatic complexity of 6. It takes 2 parameters, represented as [536.0] and does not return any value.. |
Sema4AI_actions | public | public | 0 | 0 | check_output_interactive | def check_output_interactive(*popenargs,timeout=None,progress_reporter: Optional[IProgressReporter] = None,on_stderr=None,on_stdout=None,**kwargs,) -> bytes:"""This has the same API as subprocess.check_output, but allows us to work withthe contents being generated by the subprocess before the subprocess actuallyfinishe... | 15 | 70 | 6 | 373 | 7 | 480 | 609 | 480 | *popenargs,timeout,progress_reporter,on_stderr,on_stdout,**kwargs | ['threads', 'retcode', 't', 'msg_str', 'on_stderr', 'on_stdout', 'msg'] | bytes | {"AnnAssign": 3, "Assign": 12, "Expr": 15, "For": 3, "If": 11, "Return": 1, "Try": 5, "While": 1, "With": 1} | 33 | 130 | 33 | ["kwargs.get", "AssertionError", "kwargs.get", "AssertionError", "iter", "contents_list.append", "callback", "process.poll", "process.wait", "process.poll", "msg_str.encode", "log.info", "stderr_contents.insert", "stderr_contents.append", "on_stderr", "kill_process_and_subprocesses", "log.exception", "_popen_raise", "t... | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server._rcc_py.Rcc._run_rcc"] | The function (check_output_interactive) defined within the public class called public.The function start at line 480 and ends at 609. It contains 70 lines of code and it has a cyclomatic complexity of 15. It takes 6 parameters, represented as [480.0] and does not return any value. It declares 33.0 functions, It has 33.... |
Sema4AI_actions | public | public | 0 | 0 | launch_and_return_future.stream_reader | def stream_reader(stream, write_to):try:for line in iter(stream.readline, b""):if not line:breakwrite_to.write(line.decode("utf-8", "replace"))except Exception as e:log.error("Error reading stream:", e) | 4 | 8 | 2 | 53 | 0 | 670 | 677 | 670 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (launch_and_return_future.stream_reader) defined within the public class called public.The function start at line 670 and ends at 677. It contains 8 lines of code and it has a cyclomatic complexity of 4. It takes 2 parameters, represented as [670.0] and does not return any value.. |
Sema4AI_actions | public | public | 0 | 0 | launch_and_return_future.kill_if_running | def kill_if_running(*args, **kwargs):if process.poll() is None:# i.e.: still running.kill_process_and_subprocesses(process.pid) | 2 | 3 | 2 | 24 | 0 | 713 | 715 | 713 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (launch_and_return_future.kill_if_running) defined within the public class called public.The function start at line 713 and ends at 715. It contains 3 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [713.0] and does not return any value.. |
Sema4AI_actions | public | public | 0 | 0 | launch_and_return_future.on_monitor_cancelled | def on_monitor_cancelled():nonlocal force_statusforce_status = ProcessResultStatus.CANCELLEDkill_if_running() | 1 | 4 | 0 | 14 | 0 | 717 | 720 | 717 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (launch_and_return_future.on_monitor_cancelled) defined within the public class called public.The function start at line 717 and ends at 720. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
Sema4AI_actions | public | public | 0 | 0 | launch_and_return_future.cancel_if_needed | def cancel_if_needed(*args, **kwargs):if future.cancelled():kill_if_running() | 2 | 3 | 2 | 19 | 0 | 725 | 727 | 725 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (launch_and_return_future.cancel_if_needed) defined within the public class called public.The function start at line 725 and ends at 727. It contains 3 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [725.0] and does not return any value.. |
Sema4AI_actions | public | public | 0 | 0 | launch_and_return_future.report_output | def report_output():nonlocal force_statusfrom concurrent.futures import InvalidStateErrorfrom subprocess import TimeoutExpiredtry:try:process.wait(timeout)except TimeoutExpired:log.info("Timeout expired, killing process.")kill_if_running()# if it was still running after the timeout elapses, kill it.try:for t in threads... | 11 | 47 | 0 | 188 | 0 | 732 | 781 | 732 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (launch_and_return_future.report_output) defined within the public class called public.The function start at line 732 and ends at 781. It contains 47 lines of code and it has a cyclomatic complexity of 11. The function does not take any parameters and does not return any value.. |
Sema4AI_actions | public | public | 0 | 0 | launch_and_return_future | def launch_and_return_future(cmd: Sequence[str],environ: dict[str, str],cwd: str,timeout: int = 100,stdin: bytes = b"\n",monitor: Optional[IMonitor] = None,) -> "Future[ProcessRunResult]":"""Launches a process and returns a future that can be used to wait for the process tofinish and get its output. If the monitor is c... | 3 | 52 | 6 | 275 | 6 | 626 | 784 | 626 | cmd,environ,cwd,timeout,stdin,monitor | ['threads', 'stdout_contens', 'stderr_contens', 'full_env', 'force_status', 'process'] | 'Future[ProcessRunResult]' | {"AnnAssign": 3, "Assign": 6, "Expr": 22, "For": 4, "If": 5, "Return": 2, "Try": 6} | 46 | 159 | 46 | ["dict", "full_env.update", "build_subprocess_kwargs", "iter", "write_to.write", "line.decode", "log.error", "log.info", "join", "str", "subprocess.Popen", "_stdin_write", "io.StringIO", "io.StringIO", "threading.Thread", "threading.Thread", "t.start", "Future", "process.poll", "kill_process_and_subprocesses", "kill_if... | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.common.src.sema4ai.common.tools_py._get_tool_version", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.common.tests.sema4ai_common_tests.test_process_py.test_launch_an... | The function (launch_and_return_future) defined within the public class called public.The function start at line 626 and ends at 784. It contains 52 lines of code and it has a cyclomatic complexity of 3. It takes 6 parameters, represented as [626.0] and does not return any value. It declares 46.0 functions, It has 46.0... |
Sema4AI_actions | public | public | 0 | 0 | check_implements | def check_implements(x: T) -> T:"""Helper to check if a class implements some protocol.:important: It must be the last method in a class due tohttps://github.com/python/mypy/issues/9266Example:def __typecheckself__(self) -> None:_: IExpectedProtocol = check_implements(self)Mypy should complain if `self` is not implemen... | 1 | 2 | 1 | 12 | 0 | 8 | 22 | 8 | x | [] | T | {"Expr": 1, "Return": 1} | 0 | 15 | 0 | [] | 4 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.src.sema4ai.actions._action_py.Action.__typecheckself__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.src.sema4ai.actions._action_py.Context.__type... | The function (check_implements) defined within the public class called public.The function start at line 8 and ends at 22. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It has 4.0 functions calling this function which are ["... |
Sema4AI_actions | ActionResult | public | 0 | 1 | __init__ | def __init__(self, success: bool, message: str | None = None, result: T | None = None):self.success = successself.message = messageself.result = result | 1 | 6 | 4 | 40 | 0 | 45 | 50 | 45 | self,success,message,result | [] | None | {"Assign": 3} | 0 | 6 | 0 | [] | 6,245 | ["_.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 ActionResult, that inherit another class.The function start at line 45 and ends at 50. It contains 6 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [45.0] and does not return any value. It has 6245.0 functions c... |
Sema4AI_actions | ActionResult | public | 0 | 1 | as_dict | def as_dict(self) -> ActionResultDict[T]:return {"success": self.success, "message": self.message, "result": self.result} | 1 | 2 | 1 | 30 | 0 | 52 | 53 | 52 | self | [] | ActionResultDict[T] | {"Return": 1} | 0 | 2 | 0 | [] | 44 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3511986_dart_archive_pub_dartlang.app.handlers.api.package_versions_py.PackageVersions.show", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3670790_opencivicdata_pupa.pupa.tests.importers.test_base_importer_py.test_... | The function (as_dict) defined within the public class called ActionResult, that inherit another class.The function start at line 52 and ends at 53. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It has 44.0 functions calling... |
Sema4AI_actions | ActionResult | public | 0 | 1 | __str__ | def __str__(self):return f"ActionResult(success={self.success!r}, message={self.message!r}, result={self.result!r})" | 1 | 2 | 1 | 8 | 0 | 55 | 56 | 55 | self | [] | Returns | {"Return": 1} | 0 | 2 | 0 | [] | 83 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3675814_usyd_blockchain_vandal.src.evm_cfg_py.EVMBasicBlock.__str__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3675814_usyd_blockchain_vandal.src.tac_cfg_py.TACBasicBlock.__str__", "_.content.gdrive.MyDrive.Phd... | The function (__str__) defined within the public class called ActionResult, that inherit another class.The function start at line 55 and ends at 56. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It has 83.0 functions cal... |
Sema4AI_actions | ActionResult | public | 0 | 1 | make_failure | def make_failure(cls, message: str) -> "ActionResult[T]":return ActionResult(success=False, message=message, result=None) | 1 | 2 | 2 | 26 | 0 | 61 | 62 | 61 | cls,message | [] | 'ActionResult[T]' | {"Return": 1} | 1 | 2 | 1 | ["ActionResult"] | 3 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.common.src.sema4ai.common.gallery_py.GalleryActionPackages._load_metadata", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.common.src.sema4ai.common.gallery_py.Galler... | The function (make_failure) defined within the public class called ActionResult, that inherit another class.The function start at line 61 and ends at 62. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [61.0] and does not return any value. It declare 1.0 functi... |
Sema4AI_actions | ActionResult | public | 0 | 1 | make_success | def make_success(cls, result: T) -> "ActionResult[T]":return ActionResult(success=True, message=None, result=result) | 1 | 2 | 2 | 26 | 0 | 65 | 66 | 65 | cls,result | [] | 'ActionResult[T]' | {"Return": 1} | 1 | 2 | 1 | ["ActionResult"] | 3 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.common.src.sema4ai.common.gallery_py.GalleryActionPackages._load_metadata", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.common.src.sema4ai.common.gallery_py.Galler... | The function (make_success) defined within the public class called ActionResult, that inherit another class.The function start at line 65 and ends at 66. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [65.0] and does not return any value. It declare 1.0 functi... |
Sema4AI_actions | ICancelMonitorListener | public | 1 | 1 | __call__ | def __call__(self) -> Any:pass | 1 | 2 | 1 | 8 | 0 | 70 | 71 | 70 | self | [] | Any | {} | 0 | 2 | 0 | [] | 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 ICancelMonitorListener, implement an interface, and it inherit another class.The function start at line 70 and ends at 71. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any... |
Sema4AI_actions | IMonitor | public | 1 | 1 | cancel | def cancel(self) -> None:pass | 1 | 2 | 1 | 8 | 0 | 75 | 76 | 75 | self | [] | None | {} | 0 | 2 | 0 | [] | 7 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3687273_internap_netman.netman.core.switch_sessions_py.SwitchSessionManager._stop_timer", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3929643_esphome_aioesphomeapi.tests.test_client_py.test_bluetooth_device_connec... | The function (cancel) defined within the public class called IMonitor, implement an interface, and it inherit another class.The function start at line 75 and ends at 76. 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 7... |
Sema4AI_actions | IMonitor | public | 1 | 1 | check_cancelled | def check_cancelled(self) -> None:"""raises CancelledError (from concurrent.futures import CancelledError) if cancelled.""" | 1 | 1 | 1 | 8 | 0 | 78 | 81 | 78 | self | [] | None | {"Expr": 1} | 0 | 4 | 0 | [] | 0 | [] | The function (check_cancelled) defined within the public class called IMonitor, implement an interface, and it inherit another class.The function start at line 78 and ends at 81. 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 | IMonitor | public | 1 | 1 | is_cancelled | def is_cancelled(self) -> bool:"""returns True if cancelled, False otherwise.""" | 1 | 1 | 1 | 8 | 0 | 83 | 86 | 83 | self | [] | bool | {"Expr": 1} | 0 | 4 | 0 | [] | 0 | [] | The function (is_cancelled) defined within the public class called IMonitor, implement an interface, and it inherit another class.The function start at line 83 and ends at 86. 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 | IMonitor | public | 1 | 1 | add_cancel_listener | def add_cancel_listener(self, listener: ICancelMonitorListener):"""Adds a listener that'll be called when the monitor is cancelled.""" | 1 | 1 | 2 | 10 | 0 | 88 | 91 | 88 | self,listener | [] | None | {"Expr": 1} | 0 | 4 | 0 | [] | 0 | [] | The function (add_cancel_listener) defined within the public class called IMonitor, implement an interface, and it inherit another class.The function start at line 88 and ends at 91. It contains 1 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [88.0] and does not return any... |
Sema4AI_actions | public | public | 0 | 0 | run_in_thread.new_target | def new_target():try:result = target()except BaseException as e:fut.set_exception(e)else:fut.set_result(result) | 2 | 7 | 0 | 30 | 0 | 29 | 35 | 29 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (run_in_thread.new_target) defined within the public class called public.The function start at line 29 and ends at 35. 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.. |
Sema4AI_actions | public | public | 0 | 0 | run_in_thread | def run_in_thread(target: Callable[[], T], **kwargs) -> futures.Future[T]:"""Runs a given target in a thread returning a Future which can be used totrack its result.Args:target: The target to run in a thread. Will be called with no arguments.kwargs: Additional arguments to pass to the thread creation function.Returns:A... | 2 | 9 | 2 | 75 | 2 | 8 | 41 | 8 | target,**kwargs | ['t', 'result'] | futures.Future[T] | {"AnnAssign": 1, "Assign": 3, "Expr": 4, "If": 1, "Return": 1, "Try": 1} | 6 | 34 | 6 | ["futures.Future", "target", "fut.set_exception", "fut.set_result", "threading.Thread", "t.start"] | 10 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server._actions_process_pool_py.ProcessHandle.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.act... | The function (run_in_thread) defined within the public class called public.The function start at line 8 and ends at 41. It contains 9 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [8.0] and does not return any value. It declares 6.0 functions, It has 6.0 functions called i... |
Sema4AI_actions | public | public | 0 | 0 | run_in_thread_asyncio | def run_in_thread_asyncio(target: Callable[[], T],**kwargs,) -> asyncio.futures.Future[T]:"""Runs a given target in a thread returning an asyncio Future which can beawaited in an asyncio loop.Args:target: The target to run in a thread. Will be called with no arguments.kwargs: Additional arguments to pass to the thread ... | 1 | 7 | 2 | 47 | 1 | 44 | 67 | 44 | target,**kwargs | ['fut'] | asyncio.futures.Future[T] | {"Assign": 1, "Expr": 1, "Return": 1} | 2 | 24 | 2 | ["run_in_thread", "wrap_future"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server._api_oauth2_py.oauth2_status"] | The function (run_in_thread_asyncio) defined within the public class called public.The function start at line 44 and ends at 67. It contains 7 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [44.0] and does not return any value. It declares 2.0 functions, It has 2.0 function... |
Sema4AI_actions | public | public | 0 | 0 | check_valid_mutex_name | def check_valid_mutex_name(mutex_name):# To be windows/linux compatible we can't use non-valid filesystem names# (as on linux it's a file-based lock).regexp = re.compile(r'[\*\?"<>|/\\:]')result = regexp.findall(mutex_name)if result is not None and len(result) > 0:raise AssertionError("Mutex name is invalid: %s" % (mut... | 3 | 5 | 1 | 45 | 2 | 42 | 49 | 42 | mutex_name | ['regexp', 'result'] | None | {"Assign": 2, "If": 1} | 4 | 8 | 4 | ["re.compile", "regexp.findall", "len", "AssertionError"] | 0 | [] | The function (check_valid_mutex_name) defined within the public class called public.The function start at line 42 and ends at 49. It contains 5 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value. It declares 4.0 functions, and It has 4.0 funct... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.