1
0
mirror of https://github.com/esphome/esphome.git synced 2025-06-18 14:25:48 +01:00

python lint for platform components ()

This commit is contained in:
tomaszduda23
2024-11-26 21:56:43 +01:00
committed by GitHub
parent 3a8b41daa3
commit a3ef2ed7fd
5 changed files with 15 additions and 19 deletions
esphome/components
script

@ -394,9 +394,8 @@ def add_referenced_recursive(referenced_schemas, config_var, path, eat_schema=Fa
for k in schema.get(S_EXTENDS, []):
if k not in referenced_schemas:
referenced_schemas[k] = [path]
else:
if path not in referenced_schemas[k]:
referenced_schemas[k].append(path)
elif path not in referenced_schemas[k]:
referenced_schemas[k].append(path)
s1 = get_str_path_schema(k)
p = k.split(".")
@ -868,13 +867,12 @@ def convert(schema, config_var, path):
config_var[S_TYPE] = "use_id"
else:
print("TODO deferred?")
elif isinstance(data, str):
# TODO: Figure out why pipsolar does this
config_var["use_id_type"] = data
else:
if isinstance(data, str):
# TODO: Figure out why pipsolar does this
config_var["use_id_type"] = data
else:
config_var["use_id_type"] = str(data.base)
config_var[S_TYPE] = "use_id"
config_var["use_id_type"] = str(data.base)
config_var[S_TYPE] = "use_id"
else:
raise TypeError("Unknown extracted schema type")
elif config_var.get("key") == "GeneratedID":