[ty] linear variance inference for PEP-695 type parameters by ericmarkmartin · Pull Request #18713 · astral-sh/ruff (original) (raw)

@ericmarkmartin @carljm

optimization to re-use covariant polarity inference

refactor variance inferrence to get rid of explicit polarity

remove quotations from PyCon talk reference

fix some nits

post-rebase fixes

post-rebase fixes

clean up tests

add variance.rs

more cleanup

remove unneeded debugs

address some review comments

add tests

add property instance type variance case

fix failing classes test

add comment

collect attributes

collect all attributes

add union, intersection, and subtype tests

refactor variance composition, and TypeVar variance functions

Apply suggestions from code review

Co-authored-by: Jelle Zijlstra jelle.zijlstra@gmail.com

clippy/doc/pre-commit fixes

fix namedtuple handling

adjust dataclass handling

respect explicit variance encountered while inferring variance

clippy

update cyclic variance inference description

fix infimum -> supremum mistake

test description

add subclassing tests

remove outdated comment in properties tests

remove test marker from is_function_literal