-
Notifications
You must be signed in to change notification settings - Fork 219
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor FunctionArgNamesCheck (N803,N804,N805)
The previous implementation repeated the N803 (lowercase name) check three times. This change reworks the function's logic to avoid code duplication. It also let me remove some nested function calls. In the process, I noticed two additional things that could be improved (but I'm only doing one of them here): 1. We were previously returning after the first naming error, perhaps as an optimization, but I think it's more helpful to return all of the errors we can detect from within this check. 2. The "ignored names" set is (unnecessarily?) used for the N804/N805 first argument checks. We have some test cases that expected this behavior, so I'm retaining it for backwards compatibility.
- Loading branch information
Showing
1 changed file
with
28 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters