Proxlight / Proxlight-Designer-v2

MIT License
123 stars 53 forks source link

feat: `pep 484` adherence, remove `make_label` function and fix typos #15

Closed joao-vitor-souza closed 1 year ago

joao-vitor-souza commented 1 year ago

This PR puts get_color, get_coordinates, get_dimensions, get_text_properties and find between functions out of generate_code scope, decreasing its complexity;

Static type all functions, according to PEP 484;

Put this piece of code:

width, height = get_dimensions(element)
x, y = get_coordinates(element)

which is commom to all if-elif-else statements, in the for-loop scope, so it's not necessary to write it in every statement;

Remove the unused make_label function;

Finally, it fixes the LICENSE link in README.md