Move methods to `BaseLayout` (#5015)

* Move methods to `BaseLayout` and change typing, see https://github.com/PyCQA/pylint/pull/5004#discussion_r708532947

2 files changed