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 | setup.wrapped_action | def wrapped_action(func):return _register_callback(before_action_run, after_action_run, func) | 1 | 2 | 1 | 14 | 0 | 119 | 120 | 119 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (setup.wrapped_action) defined within the public class called public.The function start at line 119 and ends at 120. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
Sema4AI_actions | public | public | 0 | 0 | setup.wrapped_session | def wrapped_session(func):return _register_callback(before_all_actions_run, after_all_actions_run, func) | 1 | 4 | 1 | 14 | 0 | 125 | 128 | 125 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (setup.wrapped_session) defined within the public class called public.The function start at line 125 and ends at 128. 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 | setup | def setup(*args, **kwargs) -> Union[IActionCallback, Decorator[IActionCallback], Decorator[IActionsCallback]]:"""Run code before any actions start, or before each separate action.Receives as an argument the action or actions that will be run.Can be used as a decorator without arguments:```pythonfrom sema4ai.actions imp... | 6 | 21 | 2 | 115 | 2 | 26 | 132 | 26 | func | ['scope', 'gen'] | IActionCallback | {"Expr": 1} | 0 | 2 | 0 | [] | 46 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3511986_dart_archive_pub_dartlang.third_party.cherrypy._cpmodpy_py.handler", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3544998_workiva_furious.example.runner_py.main", "_.content.gdrive.MyDrive.Phd_Thesis.Datase... | The function (setup) defined within the public class called public.The function start at line 26 and ends at 132. It contains 21 lines of code and it has a cyclomatic complexity of 6. It takes 2 parameters, represented as [26.0] and does not return any value. It has 46.0 functions calling this function which are ["_.co... |
Sema4AI_actions | public | public | 0 | 0 | teardown | def teardown(func: IActionCallback) -> IActionCallback:... | 1 | 2 | 1 | 10 | 0 | 136 | 137 | 136 | func | [] | IActionCallback | {"Expr": 1} | 0 | 2 | 0 | [] | 5 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3707933_aiortc_aioquic.src.aioquic.quic.connection_py.QuicConnection._discard_epoch", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3929948_websocket_client_websocket_client.websocket._app_py.WebSocketApp.run_foreve... | The function (teardown) defined within the public class called public.The function start at line 136 and ends at 137. 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 5.0 functions calling this function which are ["_.con... |
Sema4AI_actions | public | public | 0 | 0 | teardown | def teardown(*, scope: Literal["action"] = "action") -> Decorator[IActionCallback]:... | 1 | 2 | 1 | 20 | 0 | 141 | 142 | 141 | func | [] | IActionCallback | {"Expr": 1} | 0 | 2 | 0 | [] | 5 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3707933_aiortc_aioquic.src.aioquic.quic.connection_py.QuicConnection._discard_epoch", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3929948_websocket_client_websocket_client.websocket._app_py.WebSocketApp.run_foreve... | The function (teardown) defined within the public class called public.The function start at line 141 and ends at 142. 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 5.0 functions calling this function which are ["_.con... |
Sema4AI_actions | public | public | 0 | 0 | teardown | def teardown(*, scope: Literal["session"]) -> Decorator[IActionsCallback]:... | 1 | 2 | 1 | 18 | 0 | 146 | 147 | 146 | func | [] | IActionCallback | {"Expr": 1} | 0 | 2 | 0 | [] | 5 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3707933_aiortc_aioquic.src.aioquic.quic.connection_py.QuicConnection._discard_epoch", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3929948_websocket_client_websocket_client.websocket._app_py.WebSocketApp.run_foreve... | The function (teardown) defined within the public class called public.The function start at line 146 and ends at 147. 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 5.0 functions calling this function which are ["_.con... |
Sema4AI_actions | public | public | 0 | 0 | teardown.wrapped_action | def wrapped_action(func: IActionCallback):after_action_run.register(func)return func | 1 | 3 | 1 | 15 | 0 | 198 | 200 | 198 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (teardown.wrapped_action) defined within the public class called public.The function start at line 198 and ends at 200. 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 | teardown.wrapped_session | def wrapped_session(func: IActionsCallback):after_all_actions_run.register(func)return func | 1 | 3 | 1 | 15 | 0 | 205 | 207 | 205 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (teardown.wrapped_session) defined within the public class called public.The function start at line 205 and ends at 207. 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 | teardown | def teardown(*args, **kwargs) -> Union[IActionCallback, Decorator[IActionCallback], Decorator[IActionsCallback]]:"""Run code after actions have been run, or after each separate action.Receives as an argument the action or actions that were executed, whichcontain (among other things) the resulting status and possible er... | 6 | 17 | 2 | 110 | 1 | 150 | 211 | 150 | func | ['scope'] | IActionCallback | {"Expr": 1} | 0 | 2 | 0 | [] | 5 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3707933_aiortc_aioquic.src.aioquic.quic.connection_py.QuicConnection._discard_epoch", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3929948_websocket_client_websocket_client.websocket._app_py.WebSocketApp.run_foreve... | The function (teardown) defined within the public class called public.The function start at line 150 and ends at 211. It contains 17 lines of code and it has a cyclomatic complexity of 6. It takes 2 parameters, represented as [150.0] and does not return any value. It has 5.0 functions calling this function which are ["... |
Sema4AI_actions | SessionCallback | public | 0 | 1 | __init__ | def __init__(self, skip_env_name, skip_always, *args, **kwargs):super().__init__(*args, **kwargs)self._called_already = set()self._skip_env_name = skip_env_nameself._skip_always = skip_always | 1 | 5 | 5 | 44 | 0 | 19 | 23 | 19 | self,skip_env_name,skip_always,*args,**kwargs | [] | None | {"Assign": 3, "Expr": 1} | 3 | 5 | 3 | ["__init__", "super", "set"] | 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 SessionCallback, that inherit another class.The function start at line 19 and ends at 23. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [19.0] and does not return any value. It declares 3.0 functi... |
Sema4AI_actions | SessionCallback | public | 0 | 1 | unregister | def unregister(self, callback):self._called_already.discard(callback)super().unregister(callback) | 1 | 3 | 2 | 23 | 0 | 25 | 27 | 25 | self,callback | [] | None | {"Expr": 2} | 3 | 3 | 3 | ["self._called_already.discard", "unregister", "super"] | 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 SessionCallback, that inherit another class.The function start at line 25 and ends at 27. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [25.0] and does not return any value. It declares 3.0 func... |
Sema4AI_actions | SessionCallback | public | 0 | 1 | __call__ | def __call__(self, *args, **kwargs):if self._reversed:iter_in = reversed(self._callbacks)else:iter_in = self._callbacksskip = os.environ.get(self._skip_env_name, "") in ("true", "1")if skip and self._skip_always:returnfor c in iter_in:if skip and c in self._called_already:continueself._called_already.add(c)try:c(*args,... | 9 | 18 | 3 | 108 | 0 | 29 | 50 | 29 | self,*args,**kwargs | [] | None | {"Assign": 3, "Expr": 3, "For": 1, "If": 4, "Return": 1, "Try": 1} | 5 | 22 | 5 | ["reversed", "os.environ.get", "self._called_already.add", "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 SessionCallback, that inherit another class.The function start at line 29 and ends at 50. It contains 18 lines of code and it has a cyclomatic complexity of 9. It takes 3 parameters, represented as [29.0] and does not return any value. It declares 5.0 funct... |
Sema4AI_actions | public | public | 0 | 0 | is_current_thread_main_thread | def is_current_thread_main_thread():return threading.current_thread() is threading.main_thread() | 1 | 2 | 0 | 16 | 0 | 15 | 16 | 15 | [] | Returns | {"Return": 1} | 2 | 2 | 2 | ["threading.current_thread", "threading.main_thread"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.src.sema4ai.actions._interrupts_py.create_interrupt_this_thread_callback"] | The function (is_current_thread_main_thread) defined within the public class called public.The function start at line 15 and ends at 16. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declares 2.0 functions, It has 2.0... | |
Sema4AI_actions | public | public | 0 | 0 | interrupt_main_thread | def interrupt_main_thread() -> None:"""Generates a KeyboardInterrupt in the main thread by sending a Ctrl+Cor by calling thread.interrupt_main().Note: if unable to send a Ctrl+C, the KeyboardInterrupt will only be raisedwhen the next Python instruction is about to be executed (so, it won't interrupta sleep(1000))."""if... | 3 | 7 | 0 | 52 | 0 | 19 | 59 | 19 | [] | None | {"Expr": 4, "If": 2} | 4 | 41 | 4 | ["os.kill", "os.getpid", "ctypes.windll.kernel32.CtrlRoutine", "_thread.interrupt_main"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.src.sema4ai.actions._interrupts_py.create_interrupt_this_thread_callback", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.tests.actions_core_tests.tes... | The function (interrupt_main_thread) defined within the public class called public.The function start at line 19 and ends at 59. 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 4.0 functions, It has 4.0 functions c... | |
Sema4AI_actions | public | public | 0 | 0 | create_interrupt_this_thread_callback.raise_on_this_thread | def raise_on_this_thread() -> None:log.debug("Interrupting main thread.")interrupt_main_thread() | 1 | 3 | 0 | 15 | 0 | 81 | 83 | 81 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (create_interrupt_this_thread_callback.raise_on_this_thread) defined within the public class called public.The function start at line 81 and ends at 83. 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 | create_interrupt_this_thread_callback.raise_on_this_thread | def raise_on_this_thread() -> None:log.debug("Interrupting thread: %s", tid)ctypes.pythonapi.PyThreadState_SetAsyncExc(ctypes.c_long(tid), ctypes.py_object(KeyboardInterrupt)) | 1 | 5 | 0 | 34 | 0 | 92 | 96 | 92 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (create_interrupt_this_thread_callback.raise_on_this_thread) defined within the public class called public.The function start at line 92 and ends at 96. It contains 5 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
Sema4AI_actions | public | public | 0 | 0 | create_interrupt_this_thread_callback | def create_interrupt_this_thread_callback() -> Callable[[], None]:"""The idea here is returning a callback that when called will generate aKeyboardInterrupt in the thread that called this function.If this is the main thread, this means that it'll emulate a Ctrl+C (whichmay stop I/O and sleep operations).For other threa... | 2 | 7 | 0 | 33 | 1 | 62 | 98 | 62 | ['tid'] | Callable[[], None] | {"Assign": 1, "Expr": 5, "If": 1, "Return": 1} | 8 | 37 | 8 | ["is_current_thread_main_thread", "log.debug", "interrupt_main_thread", "threading.get_ident", "log.debug", "ctypes.pythonapi.PyThreadState_SetAsyncExc", "ctypes.c_long", "ctypes.py_object"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.src.sema4ai.actions._interrupts_py.interrupt_on_timeout", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.tests.actions_core_tests.test_interrupt_py.te... | The function (create_interrupt_this_thread_callback) defined within the public class called public.The function start at line 62 and ends at 98. It contains 7 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 8.0 functions, It has... | |
Sema4AI_actions | _Timer | protected | 0 | 1 | __init__ | def __init__(self, timeout1, timeout2, on_timeout1, on_timeout2):Thread.__init__(self)self.timeout1 = timeout1self.timeout2 = timeout2self.on_timeout1 = on_timeout1self.on_timeout2 = on_timeout2self.finished = Event() | 1 | 7 | 5 | 46 | 0 | 102 | 108 | 102 | self,timeout1,timeout2,on_timeout1,on_timeout2 | [] | None | {"Assign": 5, "Expr": 1} | 2 | 7 | 2 | ["Thread.__init__", "Event"] | 6,243 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.AlertCollector_py.AlertCollector.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.ClusterAlertCollector_py.ClusterAlertCollec... | The function (__init__) defined within the protected class called _Timer, that inherit another class.The function start at line 102 and ends at 108. It contains 7 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [102.0] and does not return any value. It declares 2.0 functions... |
Sema4AI_actions | _Timer | protected | 0 | 1 | cancel | def cancel(self):"""Stop the timer if it hasn't finished yet."""self.finished.set() | 1 | 2 | 1 | 13 | 0 | 110 | 112 | 110 | self | [] | None | {"Expr": 2} | 1 | 3 | 1 | ["self.finished.set"] | 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 protected class called _Timer, that inherit another class.The function start at line 110 and ends at 112. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, It has... |
Sema4AI_actions | _Timer | protected | 0 | 1 | run | def run(self):if self.timeout1 > 0:self.finished.wait(self.timeout1)if not self.finished.is_set():self.on_timeout1()if self.timeout2 > 0:if self.timeout2 <= self.timeout1:self.on_timeout2()# The time already elapsedelse:timeout1 = self.timeout1if timeout1 < 0:timeout1 = 0self.finished.wait(self.timeout2 - timeout1)if n... | 7 | 16 | 1 | 107 | 0 | 114 | 133 | 114 | self | [] | None | {"Assign": 2, "Expr": 6, "If": 6} | 8 | 20 | 8 | ["self.finished.wait", "self.finished.is_set", "self.on_timeout1", "self.on_timeout2", "self.finished.wait", "self.finished.is_set", "self.on_timeout2", "self.finished.set"] | 596 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3511986_dart_archive_pub_dartlang.app.handlers.package_versions_py.PackageVersions.index", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3511986_dart_archive_pub_dartlang.third_party.cherrypy.test.benchmark_py.run_m... | The function (run) defined within the protected class called _Timer, that inherit another class.The function start at line 114 and ends at 133. It contains 16 lines of code and it has a cyclomatic complexity of 7. The function does not take any parameters and does not return any value. It declares 8.0 functions, It has... |
Sema4AI_actions | public | public | 0 | 0 | interrupt_on_timeout.print_and_interrupt | def print_and_interrupt():dump_threads(message=f"""{reason} took longer than expected and will be interrupted (took more than {interrupt_timeout:.1f}s).A thread dump will be shown below.-- Configure this timeout with '{arg_name_interrupt}' argument or '{env_var_name_interrupt}' environment variable.""")interrupt_thread... | 1 | 4 | 0 | 14 | 0 | 153 | 162 | 153 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (interrupt_on_timeout.print_and_interrupt) defined within the public class called public.The function start at line 153 and ends at 162. 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 | interrupt_on_timeout.print_threads | def print_threads():dump_threads(message=f"""{reason} is taking longer than expected(took more than {dump_threads_timeout:.1f}s).A thread dump prior to interruption will be shown below.-- Configure this timeout with '{arg_name_dump_threads}' argument or '{env_var_name_dump_threads}' environment variable.""") | 1 | 3 | 0 | 11 | 0 | 164 | 172 | 164 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (interrupt_on_timeout.print_threads) defined within the public class called public.The function start at line 164 and ends at 172. 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 | interrupt_on_timeout | def interrupt_on_timeout(dump_threads_timeout: float,interrupt_timeout: float,reason: str,arg_name_dump_threads: str,env_var_name_dump_threads: str,arg_name_interrupt: str,env_var_name_interrupt: str,):# Disabledif dump_threads_timeout <= 0 and interrupt_timeout <= 0:yieldreturninterrupt_thread = create_interrupt_this_... | 4 | 27 | 7 | 89 | 2 | 137 | 185 | 137 | dump_threads_timeout,interrupt_timeout,reason,arg_name_dump_threads,env_var_name_dump_threads,arg_name_interrupt,env_var_name_interrupt | ['interrupt_thread', 't'] | None | {"Assign": 3, "Expr": 7, "If": 1, "Return": 1, "Try": 1} | 7 | 49 | 7 | ["create_interrupt_this_thread_callback", "dump_threads", "interrupt_thread", "dump_threads", "_Timer", "t.start", "t.cancel"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.src.sema4ai.actions._commands_py.run"] | The function (interrupt_on_timeout) defined within the public class called public.The function start at line 137 and ends at 185. It contains 27 lines of code and it has a cyclomatic complexity of 4. It takes 7 parameters, represented as [137.0] and does not return any value. It declares 7.0 functions, It has 7.0 funct... |
Sema4AI_actions | public | public | 0 | 0 | dump_threads | def dump_threads(stream=None, message="Threads found"):if stream is None:stream = sys.stderrthread_id_to_name = {}try:for t in threading.enumerate():thread_id_to_name[t.ident] = "%s(daemon: %s)" % (t.name, t.daemon)except Exception:passstack_trace = ["====================================================================... | 8 | 30 | 2 | 199 | 3 | 188 | 222 | 188 | stream,message | ['stream', 'thread_id_to_name', 'stack_trace'] | None | {"Assign": 4, "Expr": 8, "For": 3, "If": 3, "Try": 1} | 16 | 35 | 16 | ["threading.enumerate", "items", "sys._current_frames", "stack_trace.append", "stack_trace.append", "thread_id_to_name.get", "stack_trace.append", "sys.stderr.write", "str", "traceback.extract_stack", "stack_trace.append", "stack_trace.append", "line.strip", "stack_trace.append", "stream.write", "join"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.src.sema4ai.actions._commands_py.run", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.src.sema4ai.actions._interrupts_py.interrupt_on_timeout"] | The function (dump_threads) defined within the public class called public.The function start at line 188 and ends at 222. It contains 30 lines of code and it has a cyclomatic complexity of 8. It takes 2 parameters, represented as [188.0] and does not return any value. It declares 16.0 functions, It has 16.0 functions c... |
Sema4AI_actions | public | public | 0 | 0 | _cache._cache.new_func.on_finish | def on_finish(*args, **kwargs):try:next(iter_in)except StopIteration:pass# Expectedfinally:cache.clear()callback.unregister(on_finish) | 3 | 8 | 2 | 32 | 0 | 21 | 28 | 21 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (_cache._cache.new_func.on_finish) defined within the public class called public.The function start at line 21 and ends at 28. It contains 8 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [21.0] and does not return any value.. |
Sema4AI_actions | public | public | 0 | 0 | _cache._cache.new_func.on_finish | def on_finish(*args, **kwargs):cache.clear()callback.unregister(on_finish) | 1 | 3 | 2 | 20 | 0 | 34 | 36 | 34 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (_cache._cache.new_func.on_finish) defined within the public class called public.The function start at line 34 and ends at 36. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [34.0] and does not return any value.. |
Sema4AI_actions | public | public | 0 | 0 | _cache.new_func | def new_func(*args, **kwargs):if cache:return cache[0]if inspect.isgeneratorfunction(func):iter_in = func(*args, **kwargs)cache.append(next(iter_in))def on_finish(*args, **kwargs):try:next(iter_in)except StopIteration:pass# Expectedfinally:cache.clear()callback.unregister(on_finish)callback.register(on_finish)else:cach... | 3 | 13 | 2 | 80 | 0 | 13 | 40 | 13 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (_cache.new_func) defined within the public class called public.The function start at line 13 and ends at 40. It contains 13 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [13.0] and does not return any value.. |
Sema4AI_actions | public | public | 0 | 0 | _cache | def _cache(callback, func):"""Helper function to create cache decorator for the result of callingsome function and clearing the cache when the given callback is called."""cache = []@functools.wraps(func)def new_func(*args, **kwargs):if cache:return cache[0]if inspect.isgeneratorfunction(func):iter_in = func(*args, **kw... | 1 | 6 | 2 | 30 | 2 | 5 | 49 | 5 | callback,func | ['cache', 'iter_in'] | Returns | {"Assign": 3, "Expr": 10, "If": 2, "Return": 3, "Try": 1} | 14 | 45 | 14 | ["inspect.isgeneratorfunction", "func", "cache.append", "next", "next", "cache.clear", "callback.unregister", "callback.register", "cache.append", "func", "cache.clear", "callback.unregister", "callback.register", "functools.wraps"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.src.sema4ai.actions.__init___py.action_cache", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.src.sema4ai.actions.__init___py.session_cache"] | The function (_cache) defined within the public class called public.The function start at line 5 and ends at 49. It contains 6 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [5.0], and this function return a value. It declares 14.0 functions, It has 14.0 functions called in... |
Sema4AI_actions | public | public | 0 | 0 | _iter_nodes | def _iter_nodes(node, internal_stack: Optional[List[Any]] = None, recursive=True) -> Iterator[Tuple[List[Any], Any]]:""":note: the yielded stack is actually always the same (mutable) list, so,clients that want to return it somewhere else should create a copy."""stack: List[Any]if internal_stack is None:stack = []if nod... | 14 | 32 | 3 | 227 | 1 | 23 | 64 | 23 | node,internal_stack,recursive | ['stack'] | Iterator[Tuple[List[Any], Any]] | {"AnnAssign": 1, "Assign": 2, "Expr": 12, "For": 4, "If": 9} | 15 | 42 | 15 | ["stack.append", "ast_module.iter_fields", "isinstance", "isinstance", "stack.append", "_iter_nodes", "stack.pop", "isinstance", "stack.append", "_iter_nodes", "stack.pop", "ast_module.iter_fields", "isinstance", "isinstance", "isinstance"] | 3 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.src.sema4ai.actions._lint_action_py._check_return_statement", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.src.sema4ai.actions._lint_action_py._iter... | The function (_iter_nodes) defined within the public class called public.The function start at line 23 and ends at 64. It contains 32 lines of code and it has a cyclomatic complexity of 14. It takes 3 parameters, represented as [23.0] and does not return any value. It declares 15.0 functions, It has 15.0 functions call... |
Sema4AI_actions | Error | public | 0 | 1 | __init__ | def __init__(self,msg: str,start: Tuple[int, int],end: Tuple[int, int],severity: int = DiagnosticSeverity.Error,):"""Note: `start` and `end` are tuples with (line, col)."""self.msg = msgself.start = startself.end = endself.severity = severityself.data: Any = None | 1 | 12 | 5 | 64 | 0 | 135 | 149 | 135 | self,msg,start,end,severity | [] | None | {"AnnAssign": 1, "Assign": 4, "Expr": 1} | 0 | 15 | 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 Error, that inherit another class.The function start at line 135 and ends at 149. It contains 12 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [135.0] and does not return any value. It has 6243.0 functions call... |
Sema4AI_actions | Error | public | 0 | 1 | to_dict | def to_dict(self):ret = {"msg": self.msg,"start": self.start,"end": self.end,"severity": self.severity,}tags = getattr(self, "tags", None)if tags:ret["tags"] = tagsif self.data is not None:ret["data"] = self.datareturn ret | 3 | 13 | 1 | 70 | 0 | 151 | 163 | 151 | self | [] | Returns | {"Assign": 4, "If": 2, "Return": 1} | 1 | 13 | 1 | ["getattr"] | 108 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15217004_shayypy_guilded_py.guilded.channel_py.CalendarChannel.create_event", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15217004_shayypy_guilded_py.guilded.channel_py.CalendarEvent.edit", "_.content.gdrive.MyDri... | The function (to_dict) defined within the public class called Error, that inherit another class.The function start at line 151 and ends at 163. It contains 13 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters, and this function return a value. It declare 1.0 function, It h... |
Sema4AI_actions | Error | public | 0 | 1 | __repr__ | def __repr__(self):import jsonreturn json.dumps(self.to_dict()) | 1 | 3 | 1 | 18 | 0 | 165 | 168 | 165 | self | [] | Returns | {"Return": 1} | 2 | 4 | 2 | ["json.dumps", "self.to_dict"] | 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 Error, that inherit another class.The function start at line 165 and ends at 168. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declares 2.0 functions, It... |
Sema4AI_actions | Error | public | 0 | 1 | to_lsp_diagnostic | def to_lsp_diagnostic(self) -> DiagnosticsTypedDict:tags = getattr(self, "tags", None)ret: DiagnosticsTypedDict = {"range": {"start": {"line": self.start[0], "character": self.start[1]},"end": {"line": self.end[0], "character": self.end[1]},},"severity": self.severity,"source": "sema4ai.actions","message": self.msg,}if... | 3 | 16 | 1 | 115 | 0 | 172 | 187 | 172 | self | [] | DiagnosticsTypedDict | {"AnnAssign": 1, "Assign": 3, "If": 2, "Return": 1} | 1 | 16 | 1 | ["getattr"] | 0 | [] | The function (to_lsp_diagnostic) defined within the public class called Error, that inherit another class.The function start at line 172 and ends at 187. It contains 16 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value. It declare 1.0 function... |
Sema4AI_actions | public | public | 0 | 0 | _make_error | def _make_error(node: ast_module.AST, msg, severity=DiagnosticSeverity.Error, coldelta=0) -> Error:if isinstance(node, ast_module.FunctionDef):return Error(msg,(node.lineno, node.col_offset + coldelta),(node.lineno, node.col_offset + coldelta + len(node.name)),severity,)elif (hasattr(node, "lineno")and hasattr(node, "c... | 8 | 32 | 4 | 168 | 0 | 190 | 221 | 190 | node,msg,severity,coldelta | [] | Error | {"If": 2, "Return": 3} | 9 | 32 | 9 | ["isinstance", "Error", "len", "hasattr", "hasattr", "hasattr", "hasattr", "Error", "Error"] | 4 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.src.sema4ai.actions._lint_action_py._check_docstring_contents", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.src.sema4ai.actions._lint_action_py._ch... | The function (_make_error) defined within the public class called public.The function start at line 190 and ends at 221. It contains 32 lines of code and it has a cyclomatic complexity of 8. It takes 4 parameters, represented as [190.0] and does not return any value. It declares 9.0 functions, It has 9.0 functions call... |
Sema4AI_actions | public | public | 0 | 0 | _check_return_type | def _check_return_type(node: ast_module.FunctionDef, kind: _Kind) -> Iterator[Error]:return_type = node.returnsif not return_type:yield _make_error(node,f"@{kind} without return annotation defined ""(`str` considered as the return type).",severity=DiagnosticSeverity.Warning,coldelta=4,) | 2 | 10 | 2 | 47 | 1 | 224 | 233 | 224 | node,kind | ['return_type'] | Iterator[Error] | {"Assign": 1, "Expr": 1, "If": 1} | 1 | 10 | 1 | ["_make_error"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.src.sema4ai.actions._lint_action_py.iter_lint_errors"] | The function (_check_return_type) defined within the public class called public.The function start at line 224 and ends at 233. It contains 10 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [224.0] and does not return any value. It declare 1.0 function, It has 1.0 function ... |
Sema4AI_actions | public | public | 0 | 0 | _check_return_statement | def _check_return_statement(node: ast_module.FunctionDef, kind: _Kind) -> Iterator[Error]:for _stack, maybe_return_node in _iter_nodes(node, recursive=True):if isinstance(maybe_return_node, ast_module.Return):breakelse:# Return not found!yield _make_error(node,f"@{kind} without a `return` (`@{kind}` must have a return ... | 3 | 12 | 2 | 58 | 0 | 236 | 248 | 236 | node,kind | [] | Iterator[Error] | {"Expr": 1, "For": 1, "If": 1} | 3 | 13 | 3 | ["_iter_nodes", "isinstance", "_make_error"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.src.sema4ai.actions._lint_action_py.iter_lint_errors"] | The function (_check_return_statement) defined within the public class called public.The function start at line 236 and ends at 248. It contains 12 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [236.0] and does not return any value. It declares 3.0 functions, It has 3.0 fu... |
Sema4AI_actions | public | public | 0 | 0 | _is_data_source_param | def _is_data_source_param(param_name: str, node: ast_module.FunctionDef) -> bool:# This is a bit of a hack, but it's a quick way to check if the parameter is a# data source parameter.# Ideally we'd actually do some code inference to get the actual type of the# annotation (and not just check the name of the python varia... | 5 | 10 | 2 | 63 | 1 | 251 | 265 | 251 | param_name,node | ['unparsed'] | bool | {"Assign": 1, "For": 1, "If": 3, "Return": 3} | 2 | 15 | 2 | ["lower", "ast.unparse"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.src.sema4ai.actions._lint_action_py._check_docstring_contents"] | The function (_is_data_source_param) defined within the public class called public.The function start at line 251 and ends at 265. It contains 10 lines of code and it has a cyclomatic complexity of 5. It takes 2 parameters, represented as [251.0] and does not return any value. It declares 2.0 functions, It has 2.0 func... |
Sema4AI_actions | public | public | 0 | 0 | _check_docstring_contents | def _check_docstring_contents(pm: Optional[PluginManager],node: ast_module.FunctionDef,docstring: str,kind: _Kind,) -> Iterator[Error]:import docstring_parserfrom sema4ai.actions._commands import _is_managed_paramassert docstring, "Expected docstring to be given."arguments = node.argscontents = docstring_parser.parse(d... | 20 | 67 | 4 | 304 | 6 | 268 | 354 | 268 | pm,node,docstring,kind | ['doc_desc_len', 'doc_desc', 'desc', 'contents', 'arguments', 'param_name_to_description'] | Iterator[Error] | {"Assign": 8, "Expr": 5, "For": 2, "If": 11, "Return": 1} | 12 | 87 | 12 | ["docstring_parser.parse", "contents.short_description.strip", "_make_error", "len", "_make_error", "param_name_to_description.pop", "_is_managed_param", "_get_managed_param_type", "_make_error", "_is_data_source_param", "_make_error", "_make_error"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.src.sema4ai.actions._lint_action_py.iter_lint_errors"] | The function (_check_docstring_contents) defined within the public class called public.The function start at line 268 and ends at 354. It contains 67 lines of code and it has a cyclomatic complexity of 20. It takes 4 parameters, represented as [268.0] and does not return any value. It declares 12.0 functions, It has 12... |
Sema4AI_actions | public | public | 0 | 0 | _get_kind | def _get_kind(decorator: ast_module.expr) -> _Kind | None:if isinstance(decorator, ast_module.Call):check = decorator.funcelse:check = decoratorif isinstance(check, ast_module.Name):decorator_name = check.idelif isinstance(check, ast_module.Attribute):name = check.attrif isinstance(check.value, ast_module.Name):module_... | 11 | 30 | 1 | 164 | 4 | 357 | 399 | 357 | decorator | ['decorator_name', 'module_name', 'check', 'name'] | _Kind | None | {"Assign": 6, "If": 10, "Return": 9} | 4 | 43 | 4 | ["isinstance", "isinstance", "isinstance", "isinstance"] | 6 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3913947_vincentbernat_snimpy.snimpy.mib_py.getColumns", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3913947_vincentbernat_snimpy.snimpy.mib_py.getNodes", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Outpu... | The function (_get_kind) defined within the public class called public.The function start at line 357 and ends at 399. It contains 30 lines of code and it has a cyclomatic complexity of 11. The function does not take any parameters and does not return any value. It declares 4.0 functions, It has 4.0 functions called in... |
Sema4AI_actions | public | public | 0 | 0 | iter_lint_errors | def iter_lint_errors(action_contents_file: Union[str, bytes], pm: Optional[PluginManager] = None) -> Iterator[Error]:ast = ast_module.parse(action_contents_file, "<string>")for _stack, node in _iter_nodes(ast, recursive=False):if isinstance(node, ast_module.FunctionDef):for decorator in node.decorator_list:kind = _get_... | 9 | 30 | 2 | 170 | 3 | 402 | 435 | 402 | action_contents_file,pm | ['docstring', 'kind', 'ast'] | Iterator[Error] | {"AnnAssign": 1, "Assign": 3, "Expr": 5, "For": 2, "If": 5} | 11 | 34 | 11 | ["ast_module.parse", "_iter_nodes", "isinstance", "_get_kind", "_make_error", "ast_module.get_docstring", "docstring.strip", "_check_return_type", "_check_return_statement", "_make_error", "_check_docstring_contents"] | 9 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.tests.actions_tests.test_lint_actions_py.test_lint_action_argument_untyped", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.tests.actions_tests.test_l... | The function (iter_lint_errors) defined within the public class called public.The function start at line 402 and ends at 435. It contains 30 lines of code and it has a cyclomatic complexity of 9. It takes 2 parameters, represented as [402.0] and does not return any value. It declares 11.0 functions, It has 11.0 functio... |
Sema4AI_actions | public | public | 0 | 0 | format_lint_results | def format_lint_results(lint_result: LintResultTypedDict,) -> Optional[FormattedLintResult]:... | 1 | 4 | 1 | 14 | 0 | 458 | 461 | 458 | lint_result | [] | Optional[FormattedLintResult] | {"Expr": 1} | 0 | 4 | 0 | [] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server._actions_import_py._add_actions_to_db", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.src.sema4ai.actions._args_dispa... | The function (format_lint_results) defined within the public class called public.The function start at line 458 and ends at 461. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It has 2.0 functions calling this function which ... |
Sema4AI_actions | public | public | 0 | 0 | format_lint_results | def format_lint_results(lint_result: LintResultTypedDict,) -> Optional[FormattedLintResult]:... | 1 | 4 | 1 | 14 | 0 | 465 | 468 | 458 | lint_result | [] | Optional[FormattedLintResult] | {"Expr": 1} | 0 | 4 | 0 | [] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server._actions_import_py._add_actions_to_db", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.src.sema4ai.actions._args_dispa... | The function (format_lint_results) defined within the public class called public.The function start at line 465 and ends at 468. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It has 2.0 functions calling this function which ... |
Sema4AI_actions | public | public | 0 | 0 | format_lint_results | def format_lint_results(lint_result: Union[dict, LintResultTypedDict],) -> Optional[FormattedLintResult]:f = lint_result.get("file")errors = lint_result.get("errors")if not isinstance(f, str) or not isinstance(errors, list):return Nonemsg_parts = []msg_parts.append(f"Action lint error(s) found at file: {f}")msg_parts.a... | 6 | 27 | 1 | 178 | 9 | 471 | 501 | 471 | lint_result | ['line', 'found_critical', 'pos', 'errors', 'severity_msg', 'msg_parts', 'severity_level', 'f', 'message'] | Optional[FormattedLintResult] | {"Expr": 1} | 0 | 4 | 0 | [] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server._actions_import_py._add_actions_to_db", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.src.sema4ai.actions._args_dispa... | The function (format_lint_results) defined within the public class called public.The function start at line 471 and ends at 501. It contains 27 lines of code and it has a cyclomatic complexity of 6. The function does not take any parameters and does not return any value. It has 2.0 functions calling this function which... |
Sema4AI_actions | public | public | 0 | 0 | _log_before_action_run | def _log_before_action_run(action: IAction):log.start_task(action.name,action.module_name,action.filename,action.method.__code__.co_firstlineno + 1,getattr(action.method, "__doc__", ""),) | 1 | 8 | 1 | 45 | 0 | 9 | 16 | 9 | action | [] | None | {"Expr": 1} | 2 | 8 | 2 | ["log.start_task", "getattr"] | 0 | [] | The function (_log_before_action_run) defined within the public class called public.The function start at line 9 and ends at 16. It contains 8 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2.0 functions, and It has 2.0 functi... |
Sema4AI_actions | public | public | 0 | 0 | _log_after_action_run | def _log_after_action_run(action: IAction):status = action.statuslog.end_task(action.name, action.module_name, status, action.message) | 1 | 3 | 1 | 30 | 1 | 19 | 21 | 19 | action | ['status'] | None | {"Assign": 1, "Expr": 1} | 1 | 3 | 1 | ["log.end_task"] | 0 | [] | The function (_log_after_action_run) defined within the public class called public.The function start at line 19 and ends at 21. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, and It has 1.0 function... |
Sema4AI_actions | public | public | 0 | 0 | setup_cli_auto_logging | def setup_cli_auto_logging(config: Optional[log.AutoLogConfigBase]):# This needs to be called before importing code which needs to show in the log# (user or library).from sema4ai.actions._hooks import after_action_run, before_action_runwith log.setup_auto_logging(config):with before_action_run.register(_log_before_acti... | 2 | 10 | 1 | 55 | 0 | 25 | 38 | 25 | config | [] | None | {"Expr": 2, "Try": 1, "With": 2} | 4 | 14 | 4 | ["log.setup_auto_logging", "before_action_run.register", "after_action_run.register", "log.close_log_outputs"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.src.sema4ai.actions._commands_py.run"] | The function (setup_cli_auto_logging) defined within the public class called public.The function start at line 25 and ends at 38. It contains 10 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 4.0 functions, It has 4.0 functions... |
Sema4AI_actions | public | public | 0 | 0 | setup_log_output | def setup_log_output(output_dir: Path,max_file_size: str = "1MB",max_files: int = 5,log_name: str = "log.html",):from robocorp import log# This can be called after user code is imported (but still prior to its# execution).return log.add_log_output(output_dir=output_dir,max_file_size=max_file_size,max_files=max_files,lo... | 1 | 13 | 4 | 54 | 0 | 8 | 23 | 8 | output_dir,max_file_size,max_files,log_name | [] | Returns | {"Return": 1} | 1 | 16 | 1 | ["log.add_log_output"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.src.sema4ai.actions._commands_py.run"] | The function (setup_log_output) defined within the public class called public.The function start at line 8 and ends at 23. It contains 13 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [8.0], and this function return a value. It declare 1.0 function, It has 1.0 function cal... |
Sema4AI_actions | public | public | 0 | 0 | setup_log_output_to_port.write | def write(msg: str):q.put(msg) | 1 | 2 | 1 | 13 | 0 | 70 | 71 | 70 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (setup_log_output_to_port.write) defined within the public class called public.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 value.. |
Sema4AI_actions | public | public | 0 | 0 | setup_log_output_to_port.write_in_thread | def write_in_thread():while True:msg = q.get()if isinstance(msg, _Finish):breaktry:client_socket.send(msg.encode("utf-8"))except Exception:try:writing = _LogErrorLock.tlocal._writingexcept Exception:writing = _LogErrorLock.tlocal._writing = Falseif writing:# Prevent recursing printing errors.return_LogErrorLock.tlocal.... | 7 | 22 | 0 | 91 | 0 | 73 | 98 | 73 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (setup_log_output_to_port.write_in_thread) defined within the public class called public.The function start at line 73 and ends at 98. It contains 22 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 | setup_log_output_to_port | def setup_log_output_to_port() -> Iterator[None]:import queueport_in_env: Optional[str] = os.environ.get("S4_ACTIONS_LOG_LISTENER_PORT")if not port_in_env:port_in_env = os.environ.get("ROBOCORP_TASKS_LOG_LISTENER_PORT")if not port_in_env:yieldreturnfrom robocorp import logtry:port = int(port_in_env)except Exception:log... | 8 | 45 | 0 | 198 | 6 | 35 | 117 | 35 | ['writing', 'client_socket', 'port_in_env', 't', 'port', 'msg'] | Iterator[None] | {"AnnAssign": 2, "Assign": 10, "Expr": 15, "If": 5, "Return": 4, "Try": 7, "While": 1, "With": 1} | 23 | 83 | 23 | ["os.environ.get", "os.environ.get", "int", "log.critical", "socket.socket", "client_socket.connect", "log.exception", "queue.Queue", "q.put", "q.get", "isinstance", "client_socket.send", "msg.encode", "log.exception", "threading.Thread", "t.start", "log.add_in_memory_log_output", "q.put", "_Finish", "t.join", "t.is_al... | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.src.sema4ai.actions._commands_py.run"] | The function (setup_log_output_to_port) defined within the public class called public.The function start at line 35 and ends at 117. It contains 45 lines of code and it has a cyclomatic complexity of 8. The function does not take any parameters and does not return any value. It declares 23.0 functions, It has 23.0 func... | |
Sema4AI_actions | ManagedParameterHeuristic | public | 0 | 0 | is_managed_node | def is_managed_node(self, param_name: str, *, node: FunctionDef) -> bool:return False | 1 | 2 | 3 | 19 | 0 | 13 | 14 | 13 | self,param_name,node | [] | bool | {"Return": 1} | 0 | 2 | 0 | [] | 0 | [] | The function (is_managed_node) defined within the public class called ManagedParameterHeuristic.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 3 parameters, represented as [13.0] and does not return any value.. |
Sema4AI_actions | ManagedParameterHeuristic | public | 0 | 0 | is_managed_param | def is_managed_param(self, param_name: str, *, param: inspect.Parameter) -> bool:return False | 1 | 2 | 3 | 21 | 0 | 16 | 17 | 16 | self,param_name,param | [] | bool | {"Return": 1} | 0 | 2 | 0 | [] | 0 | [] | The function (is_managed_param) defined within the public class called ManagedParameterHeuristic.The function start at line 16 and ends at 17. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [16.0] and does not return any value.. |
Sema4AI_actions | ManagedParameterHeuristic | public | 0 | 0 | create_managed_param | def create_managed_param(self,request_contexts: Optional["RequestContexts"],annotation: type,original_kwargs: Dict[str, Any],param_name: str,) -> Any:return None | 1 | 8 | 5 | 34 | 0 | 19 | 26 | 19 | self,request_contexts,annotation,original_kwargs,param_name | [] | Any | {"Return": 1} | 0 | 8 | 0 | [] | 0 | [] | The function (create_managed_param) defined within the public class called ManagedParameterHeuristic.The function start at line 19 and ends at 26. It contains 8 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [19.0] and does not return any value.. |
Sema4AI_actions | ManagedParameterHeuristic | public | 0 | 0 | get_managed_param_type_from_annotation | def get_managed_param_type_from_annotation(self, annotation: type) -> type | None:return None | 1 | 2 | 2 | 15 | 0 | 28 | 29 | 28 | self,annotation | [] | type | None | {"Return": 1} | 0 | 2 | 0 | [] | 0 | [] | The function (get_managed_param_type_from_annotation) defined within the public class called ManagedParameterHeuristic.The function start at line 28 and ends at 29. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [28.0] and does not return any value.. |
Sema4AI_actions | ManagedParameterHeuristic | public | 0 | 0 | get_managed_param_type_from_node | def get_managed_param_type_from_node(self, param_name: str, node: FunctionDef) -> type | None:return None | 1 | 4 | 3 | 19 | 0 | 31 | 34 | 31 | self,param_name,node | [] | type | None | {"Return": 1} | 0 | 4 | 0 | [] | 0 | [] | The function (get_managed_param_type_from_node) defined within the public class called ManagedParameterHeuristic.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.. |
Sema4AI_actions | ManagedParameterHeuristic | public | 0 | 0 | create_managed_param | def create_managed_param(self,request_contexts: Optional["RequestContexts"],annotation: type,original_kwargs: Dict[str, Any],param_name: str,) -> Any:from sema4ai.actions._secret import Secret, is_secret_subclassuse_class: Optional[Any] = Noneif is_secret_subclass(annotation):use_class = Secretif use_class is not None:... | 5 | 20 | 5 | 105 | 0 | 45 | 71 | 45 | self,request_contexts,annotation,original_kwargs,param_name | [] | Any | {"Return": 1} | 0 | 8 | 0 | [] | 0 | [] | The function (create_managed_param) defined within the public class called ManagedParameterHeuristic.The function start at line 45 and ends at 71. It contains 20 lines of code and it has a cyclomatic complexity of 5. It takes 5 parameters, represented as [45.0] and does not return any value.. |
Sema4AI_actions | ManagedParameterHeuristic | public | 0 | 0 | is_managed_node | def is_managed_node(self, param_name: str, *, node: FunctionDef) -> bool:return self._is_secret_node(param_name, node) | 1 | 2 | 3 | 26 | 0 | 73 | 74 | 73 | self,param_name,node | [] | bool | {"Return": 1} | 0 | 2 | 0 | [] | 0 | [] | The function (is_managed_node) defined within the public class called ManagedParameterHeuristic.The function start at line 73 and ends at 74. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [73.0] and does not return any value.. |
Sema4AI_actions | ManagedParameterHeuristicSecret | public | 0 | 1 | _is_secret_node | def _is_secret_node(self, param_name: str, node: FunctionDef) -> bool:import astargs: ast.arguments = node.argsfor arg in args.args:if arg.arg == param_name:if arg.annotation:unparsed = ast.unparse(arg.annotation)if unparsed in ("Secret","actions.Secret","sema4ai.actions.Secret",):return Truereturn Falsereturn False | 5 | 15 | 3 | 73 | 0 | 76 | 93 | 76 | self,param_name,node | [] | bool | {"AnnAssign": 1, "Assign": 1, "For": 1, "If": 3, "Return": 3} | 1 | 18 | 1 | ["ast.unparse"] | 0 | [] | The function (_is_secret_node) defined within the public class called ManagedParameterHeuristicSecret, that inherit another class.The function start at line 76 and ends at 93. It contains 15 lines of code and it has a cyclomatic complexity of 5. It takes 3 parameters, represented as [76.0] and does not return any value... |
Sema4AI_actions | ManagedParameterHeuristic | public | 0 | 0 | is_managed_param | def is_managed_param(self, param_name: str, *, param: inspect.Parameter) -> bool:from sema4ai.actions._secret import is_secret_subclassif is_secret_subclass(param.annotation):return Truereturn False | 2 | 5 | 3 | 39 | 0 | 95 | 100 | 95 | self,param_name,param | [] | bool | {"Return": 1} | 0 | 2 | 0 | [] | 0 | [] | The function (is_managed_param) defined within the public class called ManagedParameterHeuristic.The function start at line 95 and ends at 100. It contains 5 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [95.0] and does not return any value.. |
Sema4AI_actions | ManagedParameterHeuristic | public | 0 | 0 | get_managed_param_type_from_annotation | def get_managed_param_type_from_annotation(self, annotation: type) -> type | None:from sema4ai.actions._secret import Secret, is_secret_subclassif is_secret_subclass(annotation):return Secretreturn None | 2 | 5 | 2 | 33 | 0 | 102 | 107 | 102 | self,annotation | [] | type | None | {"Return": 1} | 0 | 2 | 0 | [] | 0 | [] | The function (get_managed_param_type_from_annotation) defined within the public class called ManagedParameterHeuristic.The function start at line 102 and ends at 107. It contains 5 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [102.0] and does not return any value.. |
Sema4AI_actions | ManagedParameterHeuristic | public | 0 | 0 | get_managed_param_type_from_node | def get_managed_param_type_from_node(self, param_name: str, node: FunctionDef) -> type | None:from sema4ai.actions._secret import Secretif self._is_secret_node(param_name, node):return Secretreturn None | 2 | 7 | 3 | 39 | 0 | 109 | 116 | 109 | self,param_name,node | [] | type | None | {"Return": 1} | 0 | 4 | 0 | [] | 0 | [] | The function (get_managed_param_type_from_node) defined within the public class called ManagedParameterHeuristic.The function start at line 109 and ends at 116. It contains 7 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [109.0] and does not return any value.. |
Sema4AI_actions | ManagedParameterHeuristic | public | 0 | 0 | create_managed_param | def create_managed_param(self,request_contexts: Optional["RequestContexts"],annotation: type,original_kwargs: Dict[str, Any],param_name: str,) -> Any:from sema4ai.actions._secret import OAuth2Secret, is_oauth2_secret_subclassuse_class: Optional[Any] = Noneif is_oauth2_secret_subclass(annotation):use_class = OAuth2Secre... | 5 | 20 | 5 | 106 | 0 | 120 | 146 | 120 | self,request_contexts,annotation,original_kwargs,param_name | [] | Any | {"Return": 1} | 0 | 8 | 0 | [] | 0 | [] | The function (create_managed_param) defined within the public class called ManagedParameterHeuristic.The function start at line 120 and ends at 146. It contains 20 lines of code and it has a cyclomatic complexity of 5. It takes 5 parameters, represented as [120.0] and does not return any value.. |
Sema4AI_actions | ManagedParameterHeuristic | public | 0 | 0 | is_managed_param | def is_managed_param(self, param_name: str, *, param: inspect.Parameter) -> bool:from sema4ai.actions._secret import is_secret_subclassif is_secret_subclass(param.annotation):return Truereturn False | 2 | 5 | 3 | 39 | 0 | 148 | 153 | 95 | self,param_name,param | [] | bool | {"Return": 1} | 0 | 2 | 0 | [] | 0 | [] | The function (is_managed_param) defined within the public class called ManagedParameterHeuristic.The function start at line 148 and ends at 153. It contains 5 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [95.0] and does not return any value.. |
Sema4AI_actions | ManagedParameterHeuristic | public | 0 | 0 | get_managed_param_type_from_annotation | def get_managed_param_type_from_annotation(self, annotation: type) -> type | None:from sema4ai.actions._secret import Secret, is_secret_subclassif is_secret_subclass(annotation):return Secretreturn None | 2 | 5 | 2 | 33 | 0 | 155 | 161 | 102 | self,annotation | [] | type | None | {"Return": 1} | 0 | 2 | 0 | [] | 0 | [] | The function (get_managed_param_type_from_annotation) defined within the public class called ManagedParameterHeuristic.The function start at line 155 and ends at 161. It contains 5 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [102.0] and does not return any value.. |
Sema4AI_actions | ManagedParameterHeuristic | public | 0 | 0 | create_managed_param | def create_managed_param(self,request_contexts: Optional["RequestContexts"],annotation: type,original_kwargs: Dict[str, Any],param_name: str,) -> Any:try:from sema4ai.data import DataSource# type: ignoreexcept Exception:return Noneuse_class: Optional[Any] = Nonedatasource_name = self._get_datasource_name(annotation)if ... | 6 | 29 | 5 | 146 | 0 | 165 | 202 | 165 | self,request_contexts,annotation,original_kwargs,param_name | [] | Any | {"Return": 1} | 0 | 8 | 0 | [] | 0 | [] | The function (create_managed_param) defined within the public class called ManagedParameterHeuristic.The function start at line 165 and ends at 202. It contains 29 lines of code and it has a cyclomatic complexity of 6. It takes 5 parameters, represented as [165.0] and does not return any value.. |
Sema4AI_actions | ManagedParameterHeuristicDataSource | public | 0 | 1 | _is_data_source_annotation | def _is_data_source_annotation(self, cls: type) -> bool:return self._get_datasource_name(cls) is not None | 1 | 2 | 2 | 21 | 0 | 204 | 205 | 204 | self,cls | [] | bool | {"Return": 1} | 1 | 2 | 1 | ["self._get_datasource_name"] | 0 | [] | The function (_is_data_source_annotation) defined within the public class called ManagedParameterHeuristicDataSource, that inherit another class.The function start at line 204 and ends at 205. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [204.0] and does not... |
Sema4AI_actions | ManagedParameterHeuristicDataSource | public | 0 | 1 | _get_type_and_first_arg | def _get_type_and_first_arg(self, annotation: type) -> Optional[tuple[type, type]]:from typing import get_originorigin = get_origin(annotation)if origin is not None:args = typing.get_args(annotation)if len(args) > 0:return origin, args[0]return None | 3 | 8 | 2 | 60 | 0 | 207 | 215 | 207 | self,annotation | [] | Optional[tuple[type, type]] | {"Assign": 2, "If": 2, "Return": 2} | 3 | 9 | 3 | ["get_origin", "typing.get_args", "len"] | 0 | [] | The function (_get_type_and_first_arg) defined within the public class called ManagedParameterHeuristicDataSource, that inherit another class.The function start at line 207 and ends at 215. It contains 8 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [207.0] and does not re... |
Sema4AI_actions | ManagedParameterHeuristicDataSource | public | 0 | 1 | _get_datasource_name | def _get_datasource_name(self, cls: type) -> Optional[str]:"""Args:cls: The class to check.Returns:The datasource name if the class is a DataSource, otherwise None.If the datasource is a union of DataSources, returns an empty string."""from typing import Annotatedtry:from sema4ai.data import DataSource, DataSourceSpec#... | 18 | 53 | 2 | 226 | 0 | 217 | 292 | 217 | self,cls | [] | Optional[str] | {"Assign": 4, "Expr": 1, "If": 11, "Return": 6, "Try": 5} | 17 | 76 | 17 | ["issubclass", "typing.get_origin", "all", "self._get_datasource_name", "typing.get_args", "self._get_type_and_first_arg", "issubclass", "ValueError", "issubclass", "typing.get_args", "len", "ValueError", "len", "ValueError", "isinstance", "typing.get_origin", "ValueError"] | 0 | [] | The function (_get_datasource_name) defined within the public class called ManagedParameterHeuristicDataSource, that inherit another class.The function start at line 217 and ends at 292. It contains 53 lines of code and it has a cyclomatic complexity of 18. It takes 2 parameters, represented as [217.0] and does not ret... |
Sema4AI_actions | ManagedParameterHeuristic | public | 0 | 0 | is_managed_param | def is_managed_param(self, param_name: str, *, param: inspect.Parameter) -> bool:return self._is_data_source_annotation(param.annotation) | 1 | 2 | 3 | 28 | 0 | 294 | 295 | 294 | self,param_name,param | [] | bool | {"Return": 1} | 0 | 2 | 0 | [] | 0 | [] | The function (is_managed_param) defined within the public class called ManagedParameterHeuristic.The function start at line 294 and ends at 295. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [294.0] and does not return any value.. |
Sema4AI_actions | ManagedParameterHeuristic | public | 0 | 0 | get_managed_param_type_from_annotation | def get_managed_param_type_from_annotation(self, annotation: type) -> type | None:try:from sema4ai.data import DataSource# type: ignoreexcept Exception:return Noneif self._is_data_source_annotation(annotation):return DataSourcereturn None | 3 | 8 | 2 | 38 | 0 | 297 | 306 | 297 | self,annotation | [] | type | None | {"Return": 1} | 0 | 2 | 0 | [] | 0 | [] | The function (get_managed_param_type_from_annotation) defined within the public class called ManagedParameterHeuristic.The function start at line 297 and ends at 306. It contains 8 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [297.0] and does not return any value.. |
Sema4AI_actions | ManagedParameters | public | 0 | 0 | __init__ | def __init__(self, param_name_to_instance: Dict[str, Any]):self._param_name_to_instance = param_name_to_instanceself._heuristics: list[ManagedParameterHeuristic] = [ManagedParameterHeuristicRequest(),ManagedParameterHeuristicSecret(),ManagedParameterHeuristicOAuth2Secret(),ManagedParameterHeuristicDataSource(),] | 1 | 8 | 2 | 46 | 0 | 317 | 324 | 317 | self,param_name_to_instance | [] | None | {"AnnAssign": 1, "Assign": 1} | 4 | 8 | 4 | ["ManagedParameterHeuristicRequest", "ManagedParameterHeuristicSecret", "ManagedParameterHeuristicOAuth2Secret", "ManagedParameterHeuristicDataSource"] | 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 ManagedParameters.The function start at line 317 and ends at 324. It contains 8 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [317.0] and does not return any value. It declares 4.0 functions, It has 4.0 functio... |
Sema4AI_actions | ManagedParameterHeuristic | public | 0 | 0 | is_managed_param | def is_managed_param(self, param_name: str, *, param: inspect.Parameter) -> bool:return False | 1 | 2 | 3 | 21 | 0 | 327 | 328 | 16 | self,param_name,param | [] | bool | {"Return": 1} | 0 | 2 | 0 | [] | 0 | [] | The function (is_managed_param) defined within the public class called ManagedParameterHeuristic.The function start at line 327 and ends at 328. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [16.0] and does not return any value.. |
Sema4AI_actions | ManagedParameterHeuristic | public | 0 | 0 | is_managed_param | def is_managed_param(self, param_name: str, *, param: inspect.Parameter) -> bool:raise NotImplementedError() | 1 | 2 | 3 | 23 | 0 | 331 | 332 | 331 | self,param_name,param | [] | bool | {"Return": 1} | 0 | 2 | 0 | [] | 0 | [] | The function (is_managed_param) defined within the public class called ManagedParameterHeuristic.The function start at line 331 and ends at 332. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [331.0] and does not return any value.. |
Sema4AI_actions | ManagedParameterHeuristic | public | 0 | 0 | is_managed_param | def is_managed_param(self,param_name: str,*,node: Optional[FunctionDef] = None,param: Optional[inspect.Parameter] = None,) -> bool:if param_name in self._param_name_to_instance:return Trueif node is not None:assert (param is None), "Either node or param is expected, but not both at the same time."for heuristic in self.... | 9 | 25 | 4 | 121 | 0 | 334 | 364 | 334 | self,param_name,param | [] | bool | {"Return": 1} | 0 | 2 | 0 | [] | 0 | [] | The function (is_managed_param) defined within the public class called ManagedParameterHeuristic.The function start at line 334 and ends at 364. It contains 25 lines of code and it has a cyclomatic complexity of 9. It takes 4 parameters, represented as [334.0] and does not return any value.. |
Sema4AI_actions | ManagedParameters | public | 0 | 0 | get_request_contexts | def get_request_contexts(self,new_kwargs: Dict[str, Any],original_kwargs: Dict[str, Any],) -> Optional["RequestContexts"]:"""Returns the action context or None if the context wasn't really set."""from sema4ai.actions._action_context import RequestContextsfrom sema4ai.actions._request import Requestrequest = new_kwargs.... | 5 | 18 | 3 | 111 | 0 | 366 | 389 | 366 | self,new_kwargs,original_kwargs | [] | Optional['RequestContexts'] | {"Assign": 5, "Expr": 1, "If": 4, "Return": 2} | 5 | 24 | 5 | ["new_kwargs.get", "original_kwargs.get", "Request.model_validate", "self._param_name_to_instance.get", "RequestContexts"] | 0 | [] | The function (get_request_contexts) defined within the public class called ManagedParameters.The function start at line 366 and ends at 389. It contains 18 lines of code and it has a cyclomatic complexity of 5. It takes 3 parameters, represented as [366.0] and does not return any value. It declares 5.0 functions, and ... |
Sema4AI_actions | ManagedParameters | public | 0 | 0 | inject_managed_params | def inject_managed_params(self,sig: inspect.Signature,request_contexts: Optional["RequestContexts"],new_kwargs: Dict[str, Any],original_kwargs: Dict[str, Any],) -> Dict[str, Any]:use_kwargs = new_kwargs.copy()for param in sig.parameters.values():if (param.name not in use_kwargsand param.name in self._param_name_to_inst... | 7 | 23 | 5 | 142 | 0 | 391 | 416 | 391 | self,sig,request_contexts,new_kwargs,original_kwargs | [] | Dict[str, Any] | {"Assign": 4, "For": 2, "If": 3, "Return": 1} | 3 | 26 | 3 | ["new_kwargs.copy", "sig.parameters.values", "heuristic.create_managed_param"] | 0 | [] | The function (inject_managed_params) defined within the public class called ManagedParameters.The function start at line 391 and ends at 416. It contains 23 lines of code and it has a cyclomatic complexity of 7. It takes 5 parameters, represented as [391.0] and does not return any value. It declares 3.0 functions, and ... |
Sema4AI_actions | ManagedParameters | public | 0 | 0 | get_managed_param_type | def get_managed_param_type(self, param_name: str, *, param: inspect.Parameter) -> type:raise NotImplementedError() | 1 | 4 | 3 | 23 | 0 | 419 | 422 | 419 | self,param_name,param | [] | type | {} | 1 | 4 | 1 | ["NotImplementedError"] | 0 | [] | The function (get_managed_param_type) defined within the public class called ManagedParameters.The function start at line 419 and ends at 422. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [419.0] and does not return any value. It declare 1.0 function, and I... |
Sema4AI_actions | ManagedParameters | public | 0 | 0 | get_managed_param_type | def get_managed_param_type(self, param_name: str, *, node: FunctionDef) -> str:raise NotImplementedError() | 1 | 2 | 3 | 21 | 0 | 425 | 426 | 425 | self,param_name,param | [] | type | {} | 1 | 4 | 1 | ["NotImplementedError"] | 0 | [] | The function (get_managed_param_type) defined within the public class called ManagedParameters.The function start at line 425 and ends at 426. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [425.0] and does not return any value. It declare 1.0 function, and I... |
Sema4AI_actions | ManagedParameters | public | 0 | 0 | get_managed_param_type | def get_managed_param_type(self,param_name: str,*,param: Optional[inspect.Parameter] = None,node: Optional[FunctionDef] = None,) -> type | str:from sema4ai.actions._request import Requestif param_name == "request":return Requestif node is None and param is None:raise ValueError("Either node or param are required.")if n... | 12 | 33 | 4 | 155 | 0 | 428 | 466 | 428 | self,param_name,param | [] | type | {} | 1 | 4 | 1 | ["NotImplementedError"] | 0 | [] | The function (get_managed_param_type) defined within the public class called ManagedParameters.The function start at line 428 and ends at 466. It contains 33 lines of code and it has a cyclomatic complexity of 12. It takes 4 parameters, represented as [428.0] and does not return any value. It declare 1.0 function, and ... |
Sema4AI_actions | ManagedParameters | public | 0 | 0 | __typecheckself__ | def __typecheckself__(self) -> None:from sema4ai.actions._protocols import check_implements_: EPManagedParameters = check_implements(self) | 1 | 3 | 1 | 23 | 0 | 468 | 471 | 468 | self | [] | None | {"AnnAssign": 1} | 1 | 4 | 1 | ["check_implements"] | 0 | [] | The function (__typecheckself__) defined within the public class called ManagedParameters.The function start at line 468 and ends at 471. 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... |
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 imp... | 1 | 2 | 1 | 12 | 0 | 28 | 44 | 28 | x | [] | T | {"Expr": 1, "Return": 1} | 0 | 17 | 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 28 and ends at 44. 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 | IAction | public | 1 | 1 | input_schema | def input_schema(self) -> Dict[str, Any]:"""The input schema from the function signature.Example:```{"properties": {"value": {"type": "integer","description": "Some value.","title": "Value","default": 0}},"type": "object"}```""" | 1 | 1 | 1 | 13 | 0 | 71 | 90 | 71 | self | [] | Dict[str, Any] | {"Expr": 1} | 0 | 20 | 0 | [] | 0 | [] | The function (input_schema) defined within the public class called IAction, implement an interface, and it inherit another class.The function start at line 71 and ends at 90. 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 | IAction | public | 1 | 1 | output_schema | def output_schema(self) -> Dict[str, Any]:"""The output schema based on the function signature.Example:```{"type": "string","description": ""}```""" | 1 | 1 | 1 | 13 | 0 | 93 | 105 | 93 | self | [] | Dict[str, Any] | {"Expr": 1} | 0 | 13 | 0 | [] | 0 | [] | The function (output_schema) defined within the public class called IAction, implement an interface, and it inherit another class.The function start at line 93 and ends at 105. 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 | IAction | public | 1 | 1 | managed_params_schema | def managed_params_schema(self) -> Dict[str, Any]:"""The schema for the managed parameters.Example:```{"my_password": {"type": "Secret"},"request": {"type": "Request"}}```""" | 1 | 1 | 1 | 13 | 0 | 108 | 124 | 108 | self | [] | Dict[str, Any] | {"Expr": 1} | 0 | 17 | 0 | [] | 0 | [] | The function (managed_params_schema) defined within the public class called IAction, implement an interface, and it inherit another class.The function start at line 108 and ends at 124. 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... |
Sema4AI_actions | IAction | public | 1 | 1 | name | def name(self) -> str:"""The name of the action.""" | 1 | 1 | 1 | 8 | 0 | 127 | 130 | 127 | self | [] | str | {"Expr": 1} | 0 | 4 | 0 | [] | 9 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3537748_rainerf_ricodebug.src.plugins.Navigation.ctags_support_py.EntryNode.data", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3537748_rainerf_ricodebug.src.views.notificationframe_py.NotificationFrame.__init__", ... | The function (name) defined within the public class called IAction, implement an interface, and it inherit another class.The function start at line 127 and ends at 130. 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. It has 9.... |
Sema4AI_actions | IAction | public | 1 | 1 | lineno | def lineno(self) -> int:"""The line where the action is declared.""" | 1 | 1 | 1 | 8 | 0 | 133 | 136 | 133 | self | [] | int | {"Expr": 1} | 0 | 4 | 0 | [] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3689772_zalando_stups_senza.tests.test_error_handling_py.test_store_exception", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3689772_zalando_stups_senza.tests.test_error_handling_py.test_store_nested_exception"] | The function (lineno) defined within the public class called IAction, implement an interface, and it inherit another class.The function start at line 133 and ends at 136. 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. It has ... |
Sema4AI_actions | IAction | public | 1 | 1 | run | def run(self) -> Any:"""Runs the action and returns its result.""" | 1 | 1 | 1 | 8 | 0 | 138 | 141 | 138 | self | [] | Any | {"Expr": 1} | 0 | 4 | 0 | [] | 596 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3511986_dart_archive_pub_dartlang.app.handlers.package_versions_py.PackageVersions.index", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3511986_dart_archive_pub_dartlang.third_party.cherrypy.test.benchmark_py.run_m... | The function (run) defined within the public class called IAction, implement an interface, and it inherit another class.The function start at line 138 and ends at 141. 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. It has 596... |
Sema4AI_actions | IAction | public | 1 | 1 | failed | def failed(self) -> bool:"""Returns true if the action failed.(in which case usually exc_info is not None).""" | 1 | 1 | 1 | 8 | 0 | 144 | 148 | 144 | self | [] | bool | {"Expr": 1} | 0 | 5 | 0 | [] | 0 | [] | The function (failed) defined within the public class called IAction, implement an interface, and it inherit another class.The function start at line 144 and ends at 148. 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 | IContext | public | 1 | 1 | show | def show(self, msg: str, end: str = "", kind: str = "", flush: Optional[bool] = None):pass | 1 | 4 | 5 | 31 | 0 | 152 | 155 | 152 | self,msg,end,kind,flush | [] | None | {} | 0 | 4 | 0 | [] | 30 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3578708_ulno_ulnoiot_upy.examples.lightboard.lightboard_test_py.show", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3578708_ulno_ulnoiot_upy.examples.lightboard.main_py.animation_next", "_.content.gdrive.MyDrive.Ph... | The function (show) defined within the public class called IContext, implement an interface, and it inherit another class.The function start at line 152 and ends at 155. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [152.0] and does not return any value. It h... |
Sema4AI_actions | IContext | public | 1 | 1 | show_error | def show_error(self, msg: str, flush: Optional[bool] = None):pass | 1 | 2 | 3 | 19 | 0 | 157 | 158 | 157 | self,msg,flush | [] | None | {} | 0 | 2 | 0 | [] | 0 | [] | The function (show_error) defined within the public class called IContext, implement an interface, and it inherit another class.The function start at line 157 and ends at 158. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [157.0] and does not return any value... |
Sema4AI_actions | IContext | public | 1 | 1 | register_lifecycle_prints | def register_lifecycle_prints(self) -> Iterator[None]:pass | 1 | 2 | 1 | 11 | 0 | 161 | 162 | 161 | self | [] | Iterator[None] | {} | 0 | 2 | 0 | [] | 0 | [] | The function (register_lifecycle_prints) defined within the public class called IContext, implement an interface, and it inherit another class.The function start at line 161 and ends at 162. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not retur... |
Sema4AI_actions | ICallback | public | 1 | 1 | register | def register(self, callback):pass | 1 | 2 | 2 | 8 | 0 | 170 | 171 | 170 | self,callback | [] | None | {} | 0 | 2 | 0 | [] | 904 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3625043_uber_tchannel_python.tests.integration.json.test_json_server_py.json_server", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3625043_uber_tchannel_python.tests.integration.test_error_handling_py.mock_server",... | The function (register) defined within the public class called ICallback, implement an interface, and it inherit another class.The function start at line 170 and ends at 171. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [170.0] and does not return any value.... |
Sema4AI_actions | ICallback | public | 1 | 1 | unregister | def unregister(self, callback):pass | 1 | 2 | 2 | 8 | 0 | 173 | 174 | 173 | self,callback | [] | None | {} | 0 | 2 | 0 | [] | 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 ICallback, implement an interface, and it inherit another class.The function start at line 173 and ends at 174. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [173.0] and does not return any valu... |
Sema4AI_actions | IAutoUnregisterContextManager | public | 1 | 1 | __enter__ | def __enter__(self):pass | 1 | 2 | 1 | 6 | 0 | 178 | 179 | 178 | 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 IAutoUnregisterContextManager, implement an interface, and it inherit another class.The function start at line 178 and ends at 179. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not ... |
Sema4AI_actions | IAutoUnregisterContextManager | public | 1 | 1 | __exit__ | def __exit__(self, exc_type, exc_val, exc_tb):pass | 1 | 2 | 4 | 12 | 0 | 181 | 182 | 181 | self,exc_type,exc_val,exc_tb | [] | None | {} | 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 IAutoUnregisterContextManager, implement an interface, and it inherit another class.The function start at line 181 and ends at 182. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [181.0] and does n... |
Sema4AI_actions | IOnActionFuncFoundCallback | public | 1 | 1 | __call__ | def __call__(self, func: Callable, *args, **kwargs):pass | 1 | 2 | 4 | 16 | 0 | 186 | 187 | 186 | self,func,*args,**kwargs | [] | None | {} | 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 IOnActionFuncFoundCallback, implement an interface, and it inherit another class.The function start at line 186 and ends at 187. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [186.0] and does not ... |
Sema4AI_actions | ICallback | public | 1 | 1 | register | def register(self, callback: Callable) -> IAutoUnregisterContextManager:pass | 1 | 2 | 2 | 12 | 0 | 189 | 190 | 189 | self,callback | [] | None | {} | 0 | 2 | 0 | [] | 904 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3625043_uber_tchannel_python.tests.integration.json.test_json_server_py.json_server", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3625043_uber_tchannel_python.tests.integration.test_error_handling_py.mock_server",... | The function (register) defined within the public class called ICallback, implement an interface, and it inherit another class.The function start at line 189 and ends at 190. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [189.0] and does not return any value.... |
Sema4AI_actions | ICallback | public | 1 | 1 | unregister | def unregister(self, callback: Callable) -> None:pass | 1 | 2 | 2 | 12 | 0 | 192 | 193 | 192 | self,callback | [] | None | {} | 0 | 2 | 0 | [] | 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 ICallback, implement an interface, and it inherit another class.The function start at line 192 and ends at 193. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [192.0] and does not return any valu... |
Sema4AI_actions | IOnActionFuncFoundCallback | public | 1 | 1 | __call__ | def __call__(self, path: Path, action_names: Set[str]):pass | 1 | 2 | 3 | 17 | 0 | 197 | 198 | 197 | self,func,*args,**kwargs | [] | None | {} | 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 IOnActionFuncFoundCallback, implement an interface, and it inherit another class.The function start at line 197 and ends at 198. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [197.0] and does not ... |
Sema4AI_actions | ICallback | public | 1 | 1 | register | def register(self, callback: Callable[[Path, Set[str]], Any]) -> IAutoUnregisterContextManager:pass | 1 | 4 | 2 | 24 | 0 | 200 | 203 | 200 | self,callback | [] | None | {} | 0 | 2 | 0 | [] | 904 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3625043_uber_tchannel_python.tests.integration.json.test_json_server_py.json_server", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3625043_uber_tchannel_python.tests.integration.test_error_handling_py.mock_server",... | The function (register) defined within the public class called ICallback, implement an interface, and it inherit another class.The function start at line 200 and ends at 203. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [200.0] and does not return any value.... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.