Skip to content

Commit 1d64486

Browse files
committed
feat: clean up build script
1 parent 32d03ac commit 1d64486

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

src/ansys/dpf/core/operators/build.py

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,6 @@ def build_pin_data(pins, output=False):
146146
not in TYPES_WITHOUT_PYTHON_IMPLEMENTATION # Types without python implementations can't be typechecked
147147
)
148148

149-
# if not type_list_for_annotation:
150-
# pass
151-
152149
pin_name = specification.name
153150
pin_name = pin_name.replace("<", "_")
154151
pin_name = pin_name.replace(">", "_")
@@ -164,9 +161,6 @@ def build_pin_data(pins, output=False):
164161
document = specification.document
165162
document_pin_docstring = document.replace("\n", "\n ")
166163

167-
# if output and multiple_types:
168-
# pass
169-
170164
pin_data = {
171165
"id": id,
172166
"name": pin_name,
@@ -216,7 +210,6 @@ def build_operator(
216210
category,
217211
specification_description,
218212
):
219-
# global all_input_output_types, types_without_concrete_definiton
220213
input_pins = []
221214
if specification.inputs:
222215
input_pins = build_pin_data(specification.inputs)
@@ -250,10 +243,6 @@ def build_operator(
250243
"definition_location": definition_location,
251244
}
252245
)
253-
# if not definition_location:
254-
# types_without_concrete_definiton.update([annotation_type])
255-
256-
# all_input_output_types.update(annotation_import_types)
257246

258247
data = {
259248
"operator_name": operator_name,
@@ -280,7 +269,6 @@ def build_operator(
280269
with open(mustache_file, "r") as f:
281270
cls = chevron.render(f, data)
282271
try:
283-
# return cls
284272
return black.format_str(cls, mode=black.FileMode())
285273
except Exception as e:
286274
print(f"{operator_name=}")
@@ -353,11 +341,6 @@ def build_operators():
353341
# Convert Markdown descriptions to RST
354342
specification_description = translator.convert(specification.description)
355343

356-
# if scripting_name not in ("stress", "propertyfield_get_attribute", "mesh_support_provider"):
357-
# continue
358-
# if "stress" == scripting_name:
359-
# pass
360-
361344
# Write to operator file
362345
operator_file = os.path.join(category_path, scripting_name + ".py")
363346
with open(operator_file, "w", encoding="utf-8", newline="\u000a") as f:
@@ -416,11 +399,7 @@ def build_operators():
416399

417400

418401
if __name__ == "__main__":
419-
# all_input_output_types = set()
420-
# types_without_concrete_definiton = set()
421402
dpf.set_default_server_context(dpf.AvailableServerContexts.premium)
422403
dpf.start_local_server(config=dpf.AvailableServerConfigs.LegacyGrpcServer)
423404
build_operators()
424405
dpf.SERVER.shutdown()
425-
# print(all_input_output_types)
426-
# print(types_without_concrete_definiton)

0 commit comments

Comments
 (0)