STYLE: fix pylint redefined-outer-name warnings (#49656)
Fixed warnings for the following files :-
- **pandas/core/arrays/datetimelike.py**
- **pandas/core/base.py**
- **pandas/core/computation/pytables.py**

- [x] [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.
- [ ] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.

I have amended the commit in the base branch. Is that usually the workflow, or do people prefer separate commits for iterations?