Skip to content

Commit 8af3c86

Browse files
committed
Pre-commit.
1 parent 93a34b9 commit 8af3c86

File tree

1 file changed

+6
-2
lines changed
  • stac_fastapi/sfeos_helpers/stac_fastapi/sfeos_helpers/models

1 file changed

+6
-2
lines changed

stac_fastapi/sfeos_helpers/stac_fastapi/sfeos_helpers/models/patch.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,9 @@ def validate_model(cls, data: Any):
112112
data["es_key"] = f"['{data['key']}']"
113113
data["es_nest"] = "".join([f"['{part}']" for part in data["parts"]])
114114
data["es_location"] = data["es_nest"] + data["es_key"]
115-
data["variable_name"] = f"{data['nest'].replace('.','_').replace(':','_')}_{data['key'].replace(':','_')}"
115+
data[
116+
"variable_name"
117+
] = f"{data['nest'].replace('.','_').replace(':','_')}_{data['key'].replace(':','_')}"
116118
data["param_key"] = data["location"].translate(replacements)
117119

118120
if "index" in data:
@@ -124,6 +126,8 @@ def validate_model(cls, data: Any):
124126

125127
data["es_location"] = data["es_location"] + f"[{data['es_index']}]"
126128

127-
data["variable_name"] = f"{data['location'].replace('.','_').replace(':','_')}_{data['index']}"
129+
data[
130+
"variable_name"
131+
] = f"{data['location'].replace('.','_').replace(':','_')}_{data['index']}"
128132

129133
return data

0 commit comments

Comments
 (0)