diff --git a/packages/pyright-internal/src/analyzer/typeInlayHintsWalker.ts b/packages/pyright-internal/src/analyzer/typeInlayHintsWalker.ts index 5e50ed620535..dd40648b650d 100644 --- a/packages/pyright-internal/src/analyzer/typeInlayHintsWalker.ts +++ b/packages/pyright-internal/src/analyzer/typeInlayHintsWalker.ts @@ -142,6 +142,9 @@ export class TypeInlayHintsWalker extends ParseTreeWalker { if (p.paramName?.startsWith('__')) { continue; } + if (p.paramName === p.argument.name) { + continue; + } if (p.paramName) { this.featureItems.push({ inlayHintType: 'parameter',