rewrite _process_parameter_type in auto_docstring.py to improve usability (#42431)
* rewrite to improve its usability
* rewrite to improve its usability
* Clarify comment about function parameter elements
* Update implementation of _process_parameter_type
* rewrite to improve its usability
* Clarify comment about function parameter elements
* reformat it a little bit
* reformat it a little bit
* used a wrong ruff version..... this one should be good
* update the string manipulation
* Trying for more consistency
* make fixup
* Try another approach
* Don't include "None" in the out_str when we're already setting optional
* Add some new-style types to GPT-J to see what happens
* Correct use of UnionType
* make fixup
* Add a little snarky comment about typing just because
* Correctly return the same strings as the old function
* Drop unnecessary args
* Remove redundant args information
* add one more elif statement to deal with the case when type hint is None
* add if statement to handle the parameter with default value
* Revert GPT-J changes
* Trigger tests
---------
Co-authored-by: Matt <Rocketknight1@users.noreply.github.com>
Co-authored-by: Matt <rocketknight1@gmail.com>