diff --git a/README.rst b/README.rst
index 9f3cf5f..81382f4 100644
--- a/README.rst
+++ b/README.rst
@@ -107,9 +107,10 @@ Users coming from Python 2 may expect the old behavior which might lead
 to bugs.  Use native ``async def`` coroutines or mark intentional
 ``return x`` usage with ``# noqa`` on the same line.
 
-**B902**: Invalid first argument used for method. Use ``self`` for
-instance methods, and `cls` for class methods (which includes `__new__`
-and `__init_subclass__`).
+**B902**: Invalid first argument used for method. Use ``self`` for instance
+methods, and `cls` for class methods (which includes `__new__` and
+`__init_subclass__`) or instance methods of metaclasses. Note that this lint
+can only detect metaclasses if they directly inherit from ``type``.
 
 **B950**: Line too long. This is a pragmatic equivalent of ``pycodestyle``'s
 E501: it considers "max-line-length" but only triggers when the value has been
diff --git a/bugbear.py b/bugbear.py
index d9dc7e7..42a9077 100644
--- a/bugbear.py
+++ b/bugbear.py
@@ -319,6 +319,10 @@ class BugBearVisitor(ast.NodeVisitor):
         ):
             expected_first_args = B902.cls
             kind = 'class'
+        elif any(getattr(x, 'id', None) == 'type'
+                 for x in self.node_stack[-2].bases):
+            expected_first_args = B902.cls
+            kind = 'metaclass instance'
         else:
             expected_first_args = B902.self
             kind = 'instance'

B902 requires first parameter named self for __init__ of metaclass
I have a metaclass defined like this:

    class StorageMeta(type):
        def __init__(cls, name, bases, d):

Naturally B902 flagged the first parameter of `__init__`, but I'm not sure if it's intended in the case of metaclasses. I can imagine arguments for and against this behavior.
diff --git a/tests/b902.py b/tests/b902.py
index 91e6bc1..7f8ffc1 100644
--- a/tests/b902.py
+++ b/tests/b902.py
@@ -47,3 +47,13 @@ class Warnings:
 
     def invalid_keyword_only(*, self):
         ...
+
+
+class Meta(type):
+    def __init__(cls, name, bases, d):
+        ...
+
+
+class OtherMeta(type):
+    def __init__(self, name, bases, d):
+        ...
diff --git a/tests/test_bugbear.py b/tests/test_bugbear.py
index f7c89d9..c94a60e 100644
--- a/tests/test_bugbear.py
+++ b/tests/test_bugbear.py
@@ -146,6 +146,7 @@ class BugbearTestCase(unittest.TestCase):
                 B902(39, 22, vars=("*args", 'instance', 'self')),
                 B902(45, 30, vars=("**kwargs", 'instance', 'self')),
                 B902(48, 32, vars=("*, self", 'instance', 'self')),
+                B902(58, 17, vars=("'self'", 'metaclass instance', 'cls')),
             )
         )
 

pip install -e .
parse_log_pytest
requirements.txt
pytest
3.9
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
attrs==25.3.0
exceptiongroup==1.2.2
flake8==7.2.0
-e git+https://github.com/PyCQA/flake8-bugbear.git@c91bb7e24891cc3d1e3f1396dd280385c4557b48#egg=flake8_bugbear
iniconfig==2.1.0
mccabe==0.7.0
packaging==24.2
pluggy==1.5.0
pycodestyle==2.13.0
pyflakes==3.3.1
pytest==8.3.5
tomli==2.2.1

name: flake8-bugbear
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=3.0.16=h5eee18b_0
  - pip=25.0=py39h06a4308_0
  - python=3.9.21=he870216_1
  - readline=8.2=h5eee18b_0
  - setuptools=75.8.0=py39h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - tzdata=2025a=h04d1e81_0
  - wheel=0.45.1=py39h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - attrs==25.3.0
      - exceptiongroup==1.2.2
      - flake8==7.2.0
      - iniconfig==2.1.0
      - mccabe==0.7.0
      - packaging==24.2
      - pluggy==1.5.0
      - pycodestyle==2.13.0
      - pyflakes==3.3.1
      - pytest==8.3.5
      - tomli==2.2.1
prefix: /opt/conda/envs/flake8-bugbear

tests/test_bugbear.py::BugbearTestCase::test_b902
tests/test_bugbear.py::BugbearTestCase::test_selfclean_bugbear
tests/test_bugbear.py::BugbearTestCase::test_b001 tests/test_bugbear.py::BugbearTestCase::test_b002 tests/test_bugbear.py::BugbearTestCase::test_b003 tests/test_bugbear.py::BugbearTestCase::test_b004 tests/test_bugbear.py::BugbearTestCase::test_b005 tests/test_bugbear.py::BugbearTestCase::test_b006 tests/test_bugbear.py::BugbearTestCase::test_b007 tests/test_bugbear.py::BugbearTestCase::test_b301_b302_b305 tests/test_bugbear.py::BugbearTestCase::test_b303_b304 tests/test_bugbear.py::BugbearTestCase::test_b306 tests/test_bugbear.py::BugbearTestCase::test_b901 tests/test_bugbear.py::BugbearTestCase::test_b950 tests/test_bugbear.py::BugbearTestCase::test_selfclean_test_bugbear
README.rst bugbear.py
README.rst bugbear.py