inky
inky copied to clipboard
Use constants or something elegant for all the magic numbers
The Python Inky library is full of assorted pieces of hex and binary. And so are we. We probably wan't to collect these magic numbers as constants or some other more elegant solution that allows us to mostly update those values when the inky library updates to fix something.
Just to clarify what I meant in our slack conversation... it is probably enough to change the magic numbers into module attributes, so that they are compile-time inlined but still named... if we even decide to do this.
Anything else is probably overkill and likely confusing to read.
Sure, that'd be my first attempt. But I'd like to be able to use those in tests as well, which I don't believe is possible. Or we actually just duplicate those attributes that the tests need I guess. To not over-engineer things.
just duplicate those attributes that the tests need I guess. To not over-engineer things.
This!