-
Notifications
You must be signed in to change notification settings - Fork 0
Known Issues
There is no satisfying way to mark a function argument as being intentionally unused, see the whole saga here. This case most commonly arises for arguments of a derived class method that is overriding a base class method.
To be more specific, there is no elegant way to suppress the unused variable hint diagnostic that is emitted by Pyright and ultimately displayed by Neovim. Note that this is not the reportUnusedVariable diagnostic, which is never applied to function arguments.
Prepending an unused function argument with _ does not suppress the hint. Workarounds such as setting pyright.disableTaggedHints operates on entire files, not on a case-by-case basis.
Current preference is to use del:
class Derived(Base):
def override(self, x, y):
del x, y
# ...But this can't be used with lambdas.
See also this related Neovim issue.