Client.write_data
default value {}
should be changed
#1104
Labels
Milestone
Client.write_data
default value {}
should be changed
#1104
hvac/hvac/v1/__init__.py
Line 351 in ede8622
https://pylint.pycqa.org/en/latest/user_guide/messages/warning/dangerous-default-value.html
It seems this default was a bad idea.
As far as I know, all the code this value will go through will not mutate the value, but we should fix this before that situation changes.
I think we'll be able to default it to
None
and everything will still work correctly even if we pass it topost
that way; worst case it doesn't and we default to{}
inside the function if it'sNone
.Either way this change won't be breaking and will prevent future pain, breakage, and surprise.
I found this in a downstream project that uses pylint. It raises the question of whether we should maybe be using pylint, or perhaps #1059 would have caught it as well?
The text was updated successfully, but these errors were encountered: