code quality/check #1101
Mariusthvdb
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
Code is automatically formatted with black and also isort is run. See here https://github.com/bramstroker/homeassistant-powercalc/blob/master/.github/workflows/format-code.yml#L34. I don't think black or any linting tool (like flake8) enforces constants to be on alphabetical order and also not dictionary keys, but I need to research that. I definitely agree that this must be alphabetically ordered. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
when editing the https://github.com/bramstroker/homeassistant-powercalc/blob/master/custom_components/powercalc/aliases.py file I couldn't help but notice the non alphabetical order of it.
Having PR my small share in core Home Assistant code, this surprised be tbh, as that has very strict checks for that.
Wouldn't it be a sound suggestion to adopt that in Powercalc too (Black/Lint etc etc), and use it like below (not completely sure, didn't actually blackify it yet...)
Black online code formatter seems indicate it being ok
Beta Was this translation helpful? Give feedback.
All reactions