Repository: apache/airflow
File: providers/common/sql/src/airflow/providers/common/sql/operators/generic_transfer.pyi (Python)

Code before:

class GenericTransfer(BaseOperator):
    template_fields: Sequence[str]
    template_ext: Sequence[str]
    template_fields_renderers: ClassVar[dict]
    ui_color: str
    sql: Incomplete
    destination_table: Incomplete
    source_conn_id: Incomplete
    source_hook_params: Incomplete
    destination_conn_id: Incomplete
    destination_hook_params: Incomplete
    rows_processor: Incomplete
    preoperator: Incomplete
    insert_args: Incomplete
    page_size: Incomplete
    def __init__(
        self,
        *,
        sql: str | list[str],
        destination_table: str,
        source_conn_id: str,
        source_hook_params: dict | None = None,
        destination_conn_id: str,
        destination_hook_params: dict | None = None,
        rows_processor: Callable[[Any, Context], Any] = lambda rows, **context: rows,
        preoperator: str | list[str] | None = None,
        insert_args: dict | None = None,
        page_size: int | None = None,
        **kwargs,
    ) -> None: ...
    @classmethod
    def get_hook(cls, conn_id: str, hook_params: dict | None = None) -> DbApiHook: ...
    @cached_property
    def source_hook(self) -> DbApiHook: ...
    @cached_property
    def destination_hook(self) -> DbApiHook: ...
    def get_paginated_sql(self, offset: int) -> str: ...
    def render_template_fields(
        self, context: Context, jinja_env: jinja2.Environment | None = None
    ) -> None: ...
    def execute(self, context: Context): ...
    def execute_complete(self, context: Context, event: dict[Any, Any] | None = None) -> Any: ...


Review comment (suggestion):
Shouldn't this definition be the same as in the regular python file? (The `| None` missing)

Code after:

class GenericTransfer(BaseOperator):
    template_fields: Sequence[str]
    template_ext: Sequence[str]
    template_fields_renderers: ClassVar[dict]
    ui_color: str
    sql: Incomplete
    destination_table: Incomplete
    source_conn_id: Incomplete
    source_hook_params: Incomplete
    destination_conn_id: Incomplete
    destination_hook_params: Incomplete
    rows_processor: Incomplete
    preoperator: Incomplete
    insert_args: Incomplete
    page_size: Incomplete
    def __init__(
        self,
        *,
        sql: str | list[str],
        destination_table: str,
        source_conn_id: str,
        source_hook_params: dict | None = None,
        destination_conn_id: str,
        destination_hook_params: dict | None = None,
        rows_processor: Callable[..., list[Any]] | None = None,
        preoperator: str | list[str] | None = None,
        insert_args: dict | None = None,
        page_size: int | None = None,
        **kwargs,
    ) -> None: ...
    @classmethod
    def get_hook(cls, conn_id: str, hook_params: dict | None = None) -> DbApiHook: ...
    @cached_property
    def source_hook(self) -> DbApiHook: ...
    @cached_property
    def destination_hook(self) -> DbApiHook: ...
    def get_paginated_sql(self, offset: int) -> str: ...
    def render_template_fields(
        self, context: Context, jinja_env: jinja2.Environment | None = None
    ) -> None: ...
    def execute(self, context: Context): ...
    def execute_complete(self, context: Context, event: dict[Any, Any] | None = None) -> Any: ...