Skip to content

Latest commit

 

History

History
20 lines (14 loc) · 489 Bytes

unused-argument.md

File metadata and controls

20 lines (14 loc) · 489 Bytes

Pattern: Unused argument

Issue: -

Description

Method arguments that are declared and not used in the code are most likely an error due to incomplete refactoring. Such arguments take up space in the code and can lead to confusion by readers. Use or remove them to resolve this issue.

Example of incorrect code:

def some_method(firstArg, secondArg):
    return firstArg*2

Example of correct code:

def some_method(firstArg):
    return firstArg*2