Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor FunctionArgNamesCheck (N803,N804,N805) #225

Merged
merged 1 commit into from
Nov 7, 2023

Commits on Oct 22, 2023

  1. 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.
    jparise committed Oct 22, 2023
    Configuration menu
    Copy the full SHA
    ed396b5 View commit details
    Browse the repository at this point in the history