pylint: disable invalid-repr-returned in Series.__repr__
- [x] closed one of the issues in #48855 
- [x] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).

Since the params passed are for getting the repr string. This should not be an issue and `to_string` will return a `str`

Hi @MarcoGorelli 

Will the cancelled test be re-run? yeah, don't worry about it - I'll take a look later in the week, curious to see if there's a way to avoid having to turn off the warning at all 🤔 not sure what the issue is - if it's already string, I'd rather not add an unnecessary `str(` to please pylint. I'm surprised that no error is caught in `frame.py` in the same function. I'll take a look Thanks @vamsi-verma-s 