Skip to content

chameleon 4.4.49

Choose a tag to compare

@github-actions github-actions released this 20 Jul 04:44

Fixed

  • The Python inheritance lint false-positived on every subscripted-generic base.
    Derivation strips the generic type-param (_strip_type_params, v4.4.36) so a
    typed cohort's dominant base is BaseRepository, but _py_positional_bases
    compared the raw BaseRepository[Shipment] and never matched, firing
    inheritance-convention-violation on every generic repository on every edit --
    the enforcement-side twin of the derivation asymmetry v4.4.36/37 fixed. The
    lint now strips the subscript with the SAME _strip_type_params, and the base
    split is bracket-depth-aware so a multi-arg generic (Generic[T, U]) is not
    fractured on its internal comma. A genuinely wrong base still flags. Verified
    end-to-end: class VehicleRepository(BaseRepository[Vehicle]) in the FastAPI
    fixture no longer fires the rule.

    The bracket-aware comma splitter was de-duplicated in the process: hook_helper
    carried an identical _split_top_level; both now share lint_engine's copy so
    they cannot drift.