With mypy, is there any way to check the variance of the type parameter `T` in a generic function?

With mypy, I can check the variance of the type parameter T in a generic class as shown below:

class A: ...
class B(A): ...
class C(B): ...

class Cls[T]:
    def meth(self, x: T) -> None: ...

cls1: Cls[A] = Cls[B]() # Error
cls2: Cls[B] = Cls[B]() # No error
cls3: Cls[C] = Cls[B]() # No error
# So `T` is `Contravariant`.

Now, is there any way to check the variance of the type parameter T in a generic function?

class A: ...
class B(A): ...
class C(B): ...

       # ↓ What variance is it?
def func[T](x: T) -> None: ...

Variance only applies to class-scoped variables, those in functions don’t have a variance. That’s because variance defines the sub/superclass relationship between two versions of the class specialised to specific types. But a generic function is never specialised, the typevar is solved separately for every call. So it doesn’t matter. There’s a brief mention of this in the typing spec.