BUG GH49716 Improve type hint accuracy for pandas.read_sql_query
- [ ] closes #49716
- [ ] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [x] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [x] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [x] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.

@phofl @WillAyd I have added description of what this PR tries to fix to `doc/source/whatsnew/v1.5.3.rst`, and I have modified the type hints to strict the keys to be strings for when a dictionary is passed into `params`.

On the other hand, I feel very confident that there are legitimate use case for parametrizing types such as `int`, `datetime`, `bool`, among other simple Pythonic data types, if not arbitrary types in general. The original issue #49716 states that the IDEs would complain that passing in `int` and `bool` violated the type hints, and I think that is a real bug that degrades developer experience.

I am not sure what test cases to write for a type hint change. It would be great if you can clarify. Thank you. This pull request is stale because it has been open for thirty days with no activity. Please [update](https://pandas.pydata.org/pandas-docs/stable/development/contributing.html#updating-your-pull-request) and respond to this comment if you're still interested in working on this.