Adafruit_CircuitPython_LED_Animation icon indicating copy to clipboard operation
Adafruit_CircuitPython_LED_Animation copied to clipboard

consider making keyword-only parameters for some animations

Open tlyu opened this issue 3 years ago • 2 comments

Recent issues like #108, which seem to be the result of API changes in a base class, might be mitigated if the less-used parameters for animation classes like Comet were declared as keyword-only.

tlyu avatar Jan 25 '23 04:01 tlyu

This is admittedly a breaking API change for anyone depending on supplying positional arguments for parameters that have defaults. Most (all?) of the examples seem to use keyword arguments for everything except the pixels object. Arguably, the API has already recently been broken in this way with the addition of the background_color parameter to Comet.

tlyu avatar Jan 25 '23 16:01 tlyu

I think this is a good change, but needs to be weighed against what would change in terms of existing Learn guides and other documentation. @kattni, tagging you about this as a heads up, happy to talk about what that would entail.

tekktrik avatar Jan 27 '23 23:01 tekktrik