Back

ruff #22124

[ty] route constructor calls through bindings

by Hugo-Polloli · Feb 06, 2026 at 19:12 UTC · scan-40dcbe385eb544ef

Critical Risk (95%)

Get this automatically on every PR

Install the Axiomo GitHub App to get Signals as check runs and PR comments on every pull request.

Install App

Risk Assessment

Risk level: Critical (95%)

Risk Drivers

  • large_diff: Large change: 1838 lines modified
  • multiple_concerns: Spans 9 directories
  • missing_tests: Added 849 lines of code but only 0 lines of tests
  • large_addition_no_tests: Large block of added code (269+ consecutive lines) with no test changes
  • api_surface_change: API surface changed in 4 file(s)

Intent

5/5 criteria met

Route constructor calls through bindings to ensure instance-typed returns

Non-Goals

  • - Refactor the entire type system
  • - Update unrelated semantics
  • - Address unrelated performance issues

Acceptance Criteria

  • Route constructor calls through bindings

    types.rs and bind.rs show changes utilizing constructor_bindings()

  • Delete the legacy constructor call path

    class.rs removal of legacy code

  • Ensure constructor overload resolution is deterministic

    Updates in types.rs and builder.rs reflect overload checks

  • Maintain method-specific lint checks

    consistency in call site handling in bind.rs

  • Add test coverage for constructor variants

    mdtest/constructor.md additions confirm new tests

Confidence: 95.0% Source: pr description AI: openai

Contributors

Hugo-Polloli PR Author 4 commits ~ Established
Account Age: 3247 days
Prior PRs: 9
Merged: 5

Established contributor with 5 merged PRs. unfamiliar with 9 files being modified.

Evidence

Evidence Completeness: 43.0%
ci_passing Unavailable
build_successful Unavailable
tests_passing Passing
Missing: lint_passing, security_scan_clean, coverage_maintained

Supply Chain

None Risk
Modifies dependencies
Modifies lockfile
Modifies CI config
Modifies build scripts

Focus Files

Review 3 high-priority file(s)

crates/ty_python_semantic/src/types.rs +1298

1298 lines changed; Source code

high
crates/ty_python_semantic/src/types/call/bind.rs +123

123 lines changed; Source code

high
crates/ty_python_semantic/src/types/infer/builder.rs +176

176 lines changed; Source code

high
crates/ty_python_semantic/src/types/class.rs +43

Source code

medium
crates/ty_python_semantic/resources/mdtest/call/constructor.md +111

111 lines changed

medium
crates/ty_python_semantic/resources/mdtest/call/union.md +41

Standard file

low
crates/ty_python_semantic/resources/mdtest/decorators.md +13

Standard file

low
crates/ty_python_semantic/resources/mdtest/type_of/generics.md +17

Standard file

low
crates/ty_python_semantic/resources/mdtest/generics/legacy/classes.md +6

Standard file

low
crates/ty_python_semantic/resources/mdtest/generics/pep695/classes.md +6

Standard file

low

+1 more files

Triage

196

minutes to review

extensive

effort level

none

staleness risk

Schedule dedicated review time; consider pair review

Recommendation

REQUEST CHANGES 39.0% readiness

Critical risk level requires changes before approval

Next Steps

Concern

Consider breaking into smaller PRs

Question

Why is lint_passing missing? Consider adding this check.

Question

Why is security_scan_clean missing? Consider adding this check.