Upgrade pylint to 4.0.0, add mypy to the allowlist
diff --git a/astroid/interpreter/_import/util.py b/astroid/interpreter/_import/util.py
index 976fc00..8b8725f 100644
--- a/astroid/interpreter/_import/util.py
+++ b/astroid/interpreter/_import/util.py
@@ -83,7 +83,6 @@
 
             # Repair last_submodule_search_locations
             if last_submodule_search_locations:
-                # pylint: disable=unsubscriptable-object
                 last_item = last_submodule_search_locations[-1]
                 # e.g. for failure example above, add 'a/b' and keep going
                 # so that find_spec('a.b.c', path=['a', 'a/b']) succeeds
diff --git a/pylintrc b/pylintrc
index 63db8dd..2957fff 100644
--- a/pylintrc
+++ b/pylintrc
@@ -42,7 +42,7 @@
 # A comma-separated list of package or module names from where C extensions may
 # be loaded. Extensions are loading into the active Python interpreter and may
 # run arbitrary code
-extension-pkg-whitelist=
+extension-pkg-whitelist=mypy
 
 # Minimum supported python version
 py-version = 3.10.0
diff --git a/requirements_dev.txt b/requirements_dev.txt
index 77a6fd9..9f5ea56 100644
--- a/requirements_dev.txt
+++ b/requirements_dev.txt
@@ -3,5 +3,5 @@
 # Tools used during development, prefer running these with pre-commit
 black
 pre-commit
-pylint>=3.2.7
+pylint>=4.0.0
 ruff
diff --git a/tests/test_raw_building.py b/tests/test_raw_building.py
index bb7c733..969178c 100644
--- a/tests/test_raw_building.py
+++ b/tests/test_raw_building.py
@@ -10,7 +10,7 @@
 
 from __future__ import annotations
 
-import _io
+import _io  # pylint: disable=wrong-import-order
 import logging
 import os
 import sys