ctfsolver.find_usage.manager_gathering ====================================== .. py:module:: ctfsolver.find_usage.manager_gathering Attributes ---------- .. autoapisummary:: ctfsolver.find_usage.manager_gathering.manager Classes ------- .. autoapisummary:: ctfsolver.find_usage.manager_gathering.ManagerGathering Module Contents --------------- .. py:class:: ManagerGathering(*args, **kwargs) Bases: :py:obj:`ctfsolver.managers.manager_functions.ManagerFunction`, :py:obj:`ctfsolver.managers.manager_folder.ManagerFolder` ManagerFunction provides utility methods for introspecting and managing functions within a class and Python source files. This class includes methods to: - List all callable functions defined in the class. - Retrieve references to function usages in a given file. - Extract function definitions from Python files using the AST module. .. method:: get_self_functions() Lists all callable functions of the class instance, excluding special methods. .. method:: get_function_reference(function, file) Finds and returns all lines in the specified file where the given function name appears. :param function: The name of the function to search for. :type function: str :param file: The path to the file to search in. :type file: str :returns: Lines from the file containing the function name. :rtype: list[str] :raises ValueError: If the function is not found in the class. .. method:: get_functions_from_file(file_path, function_name=None) Parses the given Python file and returns function definitions using AST. :param file_path: Path to the Python file. :type file_path: Path :param function_name: Specific function name to search for. :type function_name: str, optional :returns: List of function definitions, a single function definition, or None. :rtype: list[ast.FunctionDef] | ast.FunctionDef | None .. method:: find_function_from_file(file_path, function_name) Deprecated. Use get_functions_from_file instead. .. py:attribute:: gathering_target .. py:attribute:: manager_error .. py:attribute:: manager_class .. py:method:: initializing_all_ancestors(*args, **kwargs) Description: Initializes all the ancestors of the class .. py:method:: handling_global_config() .. py:method:: get_gathering_target() .. py:method:: get_org_information() .. py:method:: renaming_method() .. py:method:: adding_to_file(filename, method_source) .. py:method:: tabbing(text, num = 1, function=False, space=True, space_num=4) .. py:method:: gathering_all_solution_files() .. py:method:: check_functions(target_info, solution_info, solution_name) .. py:method:: method_enumeration(target_methods, method_name) Enumerates methods in target_methods that match method_name with optional numbering (e.g., foo, foo_1, foo_2). .. py:method:: main() .. py:data:: manager