mozilla / active-data-recipes

A repository of various activedata queries and recipes
Mozilla Public License 2.0
9 stars 24 forks source link

Don't recursively check for context values in functions other than run #117

Closed ahal closed 5 years ago

ahal commented 5 years ago

The extract_arguments function assumes that 'args' will be the second argument of each function. However, we can only be certain of this in the 'run' function which we control. We shouldn't make this assumption for other user defined functions.

This does mean that there might be context we miss. Unfortunately we can never guarantee we'll find all context values using 'inspect'. I think we might need to switch to a more declarative approach.