Pass `ast::PythonVersion` to `type_hint_resolves_to_any` (#16236)
This is a follow-up to #16170 to use `ast::PythonVersion` in the
`type_hint_resolves_to_any` call chain, as suggested (and implemented!)
by Alex
[here](https://github.com/astral-sh/ruff/pull/16170#discussion_r1960015181).
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>