.. _bad-thread-instantiation:

bad-thread-instantiation / W1506
================================

**Message emitted:**

threading.Thread needs the target function

**Description:**

*The warning is emitted when a threading.Thread class is instantiated without the target function being passed. By default, the first parameter is the group param, not the target param.*


**Correct code:**

.. literalinclude:: /data/messages/b/bad-thread-instantiation/good.py
   :language: python

**Additional details:**

You can help us make the doc better `by contributing <https://github.com/PyCQA/pylint/issues/5953>`_ !


Created by the `stdlib <https://github.com/PyCQA/pylint/blob/main/pylint/checkers/stdlib.py>`__ checker.