Skip to content
This repository has been archived by the owner on Sep 4, 2023. It is now read-only.

pylint complains "No value for argument 'dict' in function call (no-value-for-parameter)" with R.pick #39

Open
AdamWagner opened this issue Jun 28, 2020 · 1 comment

Comments

@AdamWagner
Copy link

python v3.7.7
pylint v2.4.4
ramda v0.5.7

import ramda as R

old_list_of_objs = [{'name': 'a good name', 'age': 99, 'color': 'red'}, {'name': 'also a good name', 'age': 100, 'color': 'blue'}]

keys = ['name', 'age']

new_list_of_objs = list(map(R.pick(keys), old_list_of_objs)) # No value for argument 'dict' in function call (no-value-for-parameter)

R.pick does what it says on the label, but pylint complains. Of course this is resolvable by adding # pylint: disable=no-value-for-parameter before the line in question, but a linting error suggests that something may be awry with the library.

If this is user-error, I'd be grateful for an explanation of how I could avoid this linting error (other than with a disabling comment).

@jackfirth
Copy link
Owner

Is this for every Pyramda function or specifically just R.pick?

I'm guessing pylint doesn't understand that the Pyramda functions are curried, and there's probably no easy way to explain that to the linter.

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

No branches or pull requests

2 participants