Add allow_key decorator that would allow passing objects into fuzzywuzzy functions.
This should help using fuzzywuzzy in more cleaner way like the test cases added.
similar to how you can pass objects into sort/max/min functions and use a key:Callable[[Any],number] to get the numbers to use.
Would be trivial to add to simple functions like fuzz.ratio.
Not added to any functions. That can be discussed further and then decided.
Might need more consideration for more complicated functions that don't follow Callable[[str,...],int] signature
Add
allow_key
decorator that would allow passing objects into fuzzywuzzy functions.This should help using fuzzywuzzy in more cleaner way like the test cases added.
similar to how you can pass objects into
sort/max/min
functions and use akey:Callable[[Any],number]
to get the numbers to use.Would be trivial to add to simple functions like
fuzz.ratio
. Not added to any functions. That can be discussed further and then decided. Might need more consideration for more complicated functions that don't followCallable[[str,...],int]
signature