pimoroni / unicorn-hat

Python library for Unicorn pHAT and HAT. 32 or 64 blinding ws2812 pixels for your Raspberry Pi
https://shop.pimoroni.com/products/unicorn-hat
MIT License
370 stars 131 forks source link

Adding unsafe flag to disable warnings while running #143

Open wetnun opened 3 years ago

wetnun commented 3 years ago

Per issue #142

Gadgetoid commented 2 years ago

Thank you.

I'm a year and change behind the curve here, but I think the Pythonic way to do this would be to convert that warning to a warning and allow warnings to be squashed with a helper function. Python has a module explicitly for warnings that - in retrospect - we should be using. Hindsight is 2020, eh! (and so is this PR... eeek)

Warnings: https://docs.python.org/3/library/warnings.html

I don't expect you to take this on, but you deserve some kind of response and am leaving this message for future me to figure this out.