.. _redundant-typehint-argument:

redundant-typehint-argument / R6006
===================================

**Message emitted:**

Type `%s` is used more than once in union type annotation. Remove redundant typehints.

**Description:**

*Duplicated type arguments will be skipped by `mypy` tool, therefore should be removed to avoid confusion.*

**Problematic code:**

.. literalinclude:: /data/messages/r/redundant-typehint-argument/bad.py
   :language: python

**Correct code:**

.. literalinclude:: /data/messages/r/redundant-typehint-argument/good.py
   :language: python




.. note::
  This message is emitted by the optional :ref:`'typing'<pylint.extensions.typing>`
   checker which requires the ``pylint.extensions.typing`` plugin to be loaded.

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