Skip to content

Commit b758c69

Browse files
web-flowSnuffy2
authored andcommitted
Fix potential mutable issue
1 parent a57fcce commit b758c69

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

custom_components/places/sensor.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1715,7 +1715,13 @@ def parse_bracket(self, curr_options):
17151715
)
17161716
return none_opt, next_opt
17171717

1718-
def get_option_state(self, opt, incl=[], excl=[], incl_attr={}, excl_attr={}):
1718+
def get_option_state(
1719+
self, opt, incl=None, excl=None, incl_attr=None, excl_attr=None
1720+
):
1721+
incl = [] if incl is None else incl
1722+
excl = [] if excl is None else excl
1723+
incl_attr = {} if incl_attr is None else incl_attr
1724+
excl_attr = {} if excl_attr is None else excl_attr
17191725
if opt is not None and opt:
17201726
opt = opt.lower().strip()
17211727
_LOGGER.debug(f"({self.get_attr(CONF_NAME)}) [get_option_state] Option: {opt}")

0 commit comments

Comments
 (0)