This reverts commit 12175d3588.
The upstream has fixed the regression:
https://github.com/PyCQA/pylint/issues/7375
which was actually not in pylint itself but in its dependency:
https://github.com/PyCQA/astroid/pull/1763
https://github.com/PyCQA/astroid/releases/tag/v2.12.6
Change-Id: I1bf36e0c6db14a10ff4eab57bae238401dbd7fd0
Closes: OS#5668