Skip to content

Remove unused code and redundant settings across Python, tooling and CI #9676

Description

@aglinxinyuan

Task Summary

Remove unused code, and settings that repeat a default or another entry, from the Amber Python runtime, the Python test resources of the workflow compiler and operators, the bin/ licensing, local-dev and observability scripts, repository configuration, and three GitHub workflows, without changing behavior:

  • Amber Python runtime: use defaultdict instead of the deprecated typing.DefaultDict in StatisticsManager and [] instead of list() in BroadcastPartitioner. In LargeBinaryOutputStream, raise OSError (which IOError aliases), wrap the best-effort cleanup delete in contextlib.suppress, and drop the pass after flush's docstring.
  • Operator verification test resources: drop ten pytexera imports and RAW_TYPE_MAPPING that py_op_driver.py never reads (user code runs in its own namespace seeded by from pytexera import *), the uncalled _string_columns helper and two dict copies in compare.py, and the unused io and re imports in hf_parse_probe.py. Write quoted annotations, open(..., "r"), startswith plus a slice, and a placeholder-free f-string in their plain forms.
  • bin/ scripts: simplify check_binary_deps.py, concat_license_binary.py, audit_jar_licenses.py and generate_notice_binary.py (tuple startswith, one regex group instead of an unpacked match, plain strings for placeholder-free f-strings, a direct bool return, unquoted annotations under from __future__ import annotations, removesuffix, _ for unused loop names). Drop two # noqa: E402 comments that suppress nothing under Ruff and the never-passed version parameter of _seed_jvm_layout in test_local_dev_tui.py. In bin/observability/smoke_test.py, stop returning an unread status from _post, build the trace id from one uuid4().hex, and drop a leaked = False that both branches of the following try overwrite.
  • Repository configuration: drop line-length = 88 and max-complexity = 10 (Ruff's defaults) from amber/pyproject.toml, the root user-resources/ entry that **/user-resources/ already covers in .dockerignore, the "" case that TARGET="${1:-all}" makes unreachable in bin/fix-format.sh, the --proto_path that repeats -I in bin/frontend-proto-gen.sh, bin/k8s/templates/aws/.gitkeep now that the folder holds a template, npm-init's main and placeholder test script in bin/y-websocket-server/package.json (the image runs npx y-websocket), and a bin/observability/docker-compose.yml comment that points at a start_app.sh the repository does not have.
  • Workflows: drop the github.event_name == 'issue_comment' && github.event.action == 'created' checks from three job conditions in comment-commands.yml (the workflow only runs on created comments) and a || '' after a typeof ... === 'string' guard in pr-assignment.yml. In benchmarks-pr-comment.yml, drop the per-benchmark commit and date, the sample count, the delta labels and a second status pass that nothing reads, and build the PR-only CSV table only when there is no comparison to show.

Introduced by:

Usage removed by:

This is a pure cleanup with no behavior change.

Task Type

  • Refactor / Cleanup

Activity

  1. self-assigned this
    on Nov 24, 2026
  2. added a commit that references this issue on Nov 25, 2026
    aefc7ec
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