import dataclasses
import types
from typing import Any

from _typeshed import Incomplete

def is_builtin_class(cls: type) -> bool: ...

class FunctionBuilder:
    current_function: Incomplete
    functions: Incomplete
    globals: Incomplete
    indent_level: Incomplete
    namespace: Incomplete
    prev_function: Incomplete
    def __init__(self) -> None:
        ...
    def __ior__(self, other): ...
    def __enter__(self): ...
    def __exit__(self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: types.TracebackType | None): ...
    def function(self, name: str, args: list,
                 return_type=dataclasses.MISSING,
                 locals: Incomplete | None = ...) -> FunctionBuilder: ...
    def _with_new_block(self, name: str,
                        condition: str | None = None,
                        comment: Any = '') -> FunctionBuilder: ...
    def for_(self, condition: str) -> FunctionBuilder: ...
    def if_(self, condition: str, comment: Any = ...) -> FunctionBuilder: ...
    def elif_(self, condition: str) -> FunctionBuilder: ...
    def else_(self) -> FunctionBuilder: ...
    def try_(self) -> FunctionBuilder: ...
    def except_(self, cls: type, var_name: str | None = ..., *custom_classes: type): ...
    def except_multi(self, *classes: type): ...
    def break_(self): ...
    def add_line(self, line: str): ...
    def add_lines(self, *lines: str): ...
    def increase_indent(self): ...
    def decrease_indent(self): ...
    def finalize_function(self): ...
    def create_functions(self, _globals: Incomplete | None = ...): ...
