You are referring to type parameter syntax, which was described in PEP 695.
You will find in the document a “variance inference” section, which answers your question:
This PEP eliminates the need for variance to be specified for type parameters. Instead, type checkers will infer the variance of type parameters based on their usage within a class. Type parameters are inferred to be invariant, covariant, or contravariant depending on how they are used.