Inspectopedia 2026.3 Help

Unused type parameter default

Reports a type parameter default (PEP 696) that can never be used because a parameter typed with that type variable has its own default value.

When such a parameter is omitted, its default value determines the type variable; when an argument is supplied, the argument determines it. Either way the declared type parameter default is never applied.

def f[T = int](a: T = 0) -> T: # 'int' is never used: f() yields Literal[0], f(x) yields the type of x return a

Locating this inspection

By ID

Can be used to locate inspection in e.g. Qodana configuration files, where you can quickly enable or disable it, or adjust its settings.

PyShadowedTypeParameterDefault
Via Settings dialog

Path to the inspection settings via IntelliJ Platform IDE Settings dialog, when you need to adjust inspection settings directly from your IDE.

Settings or Preferences | Editor | Inspections | Python | Type hinting

Inspection ID: PyShadowedTypeParameterDefaultInspection

Suppressing Inspection

You can suppress this inspection by placing the following comment marker before the code fragment where you no longer want messages from this inspection to appear:

//noinspection PyShadowedTypeParameterDefault

More detailed instructions as well as other ways and options that you have can be found in the product documentation:

Inspection Details

By default bundled with:

CLion 2026.3, IntelliJ IDEA 2026.3, PyCharm 2026.3, Qodana for JVM 2026.3,

Last modified: 20 November 2026