Skip to content

Remove redundant Python statements, imports, and branches in Amber #9543

Description

@aglinxinyuan

Task Summary

Remove redundant Python statements, unused imports, unnecessary control-flow branches, and legacy idioms across amber/src/main/python/ and amber/src/main/scala/org/apache/texera/web/resource/aiassistant/type_annotation_visitor.py with no behavior change.

Scope

  • Remove redundant pass statements in docstring-only abstract methods and marker classes (internal_marker.py, buffered_item_writer.py, readonly_virtual_document.py, udf_operator.py).
  • Remove unused import core, unnecessary dict unpacking, and redundant temporary-return variables (iceberg_utils.py, timestamp.py, backpressure_handler.py), plus redundant else/elif branches after return (attribute_type_utils.py, table.py, document_factory.py, iceberg_catalog_instance.py).
  • Simplify container/default constructors, string formatting, super(), generator expressions, datetime.UTC, @functools.cache, and duplicate staticmethod decorator checks / unused enumerate index (exception_manager.py, async_rpc_client.py, one_to_one_partitioner.py, attribute_type.py, schema.py, proxy_client.py, proxy_server.py, heartbeat.py, expression_evaluator.py, type_annotation_visitor.py).

Task Type

  • Refactor / Cleanup

Activity

  1. aglinxinyuan commented on Nov 19, 2026

    @aglinxinyuan
    ContributorAuthor

    /take

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions