You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
These should be changed to:
def convert_kv(key, val, attr_type, attr=None):
def convert_bool(key, val, attr_type, attr=None):
def convert_none(key, val, attr_type, attr=None):
And the following - or something similar, inserted after each LOG statement found in each method.
attr = dict() if attr is None else attr
if not isinstance(attr, dict):
raise TypeError("Unexpected type: attr={a}, type={t} vs dict".format(a=attr, t=type(attr).__name__))
The text was updated successfully, but these errors were encountered:
Examining v1.6.6 - I see 3 methods with mutable object in signature.
This is never a good idea.
def convert_kv(key, val, attr_type, attr={}):
def convert_bool(key, val, attr_type, attr={}):
def convert_none(key, val, attr_type, attr={}):
These should be changed to:
def convert_kv(key, val, attr_type, attr=None):
def convert_bool(key, val, attr_type, attr=None):
def convert_none(key, val, attr_type, attr=None):
And the following - or something similar, inserted after each LOG statement found in each method.
The text was updated successfully, but these errors were encountered: