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

Critical issue: Missing mandatory keyword argument in function call PYL-E1125 #421

Open
philipjonsen opened this issue Sep 19, 2024 · 2 comments

Comments

@philipjonsen
Copy link

Description
The function call does not pass a mandatory keyword-only argument. This is an error.

Bad practice

def func(foo, *args, test):
print(foo, test)

func(10, 20, 30) # Missing required keyword argument 'test'

Recommended

def func(foo, *args, test):
print(foo, test)

func(10, 20, 30, test=False)

Founder between https://github.com/eth2.0-deposit-cli/blob/master/staking_deposit/key_handling/keystore.py#L90-L90

Missing mandatory keyword argument 'iv' in function call:

https://github.com/eth2.0-deposit-cli/blob/master/staking_deposit/key_handling/keystore.py#L154-L154

image

@yorickdowne
Copy link
Contributor

Thanks for the report. We’ll take a look over at ethstaker deposit cli. Timely too, we just started an audit run :/

@yorickdowne
Copy link
Contributor

Looks like just a linter error. **kwargs is being passed, which means the keyword arguments are there

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@yorickdowne @philipjonsen and others