[ty] Honor shadowed-type-variable independently for nested classes (#30588)
Disabling `invalid-generic-class` currently also erroneously suppresses
`shadowed-type-variable` diagnostics on nested classes, even when
`shadowed-type-variable` is enabled. With this fix,
`shadowed-type-variable` controls those diagnostics independently.
## Test plan
Save this example as `example.py`.
```python
class Outer[T]:
class Inner[T]:
pass
```
Run `ty check --python-version 3.12 --ignore invalid-generic-class
--error shadowed-type-variable example.py` with a build of ty from each
branch. Before the fix, ty reports no diagnostics. With the fix, it
reports `shadowed-type-variable` for `Inner`’s `T`. Replacing `--error
shadowed-type-variable` with `--ignore shadowed-type-variable`
suppresses the diagnostic.