jackfirth / pyramda

Python package supporting heavy functional programming through currying. Translation of the Ramda library from javascript to python.
MIT License
127 stars 10 forks source link

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

Open AdamWagner opened 4 years ago

AdamWagner commented 4 years ago

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 commented 4 years ago

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.