[libc-commits] [libc] [libc] added yaml_combined files, frontend for new headergen (PR #96833)
via libc-commits
libc-commits at lists.llvm.org
Thu Jun 27 14:08:00 PDT 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {darker}-->
:warning: Python code formatter, darker found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
darker --check --diff -r 1fa9f506d33a25c83f23862abd2400f1df3c413e...688394c59dbd4cf000e92dca5ff49c5b5dc812e8 libc/newhdrgen/class_implementation/classes/function.py libc/newhdrgen/yaml_to_classes.py
``````````
</details>
<details>
<summary>
View the diff from darker here.
</summary>
``````````diff
--- class_implementation/classes/function.py 2024-06-27 21:02:23.000000 +0000
+++ class_implementation/classes/function.py 2024-06-27 21:07:34.296264 +0000
@@ -14,11 +14,13 @@
self, standards, return_type, name, arguments, guard=None, attributes=[]
):
self.standards = standards
self.return_type = return_type
self.name = name
- self.arguments = [arg if isinstance(arg, str) else arg['type'] for arg in arguments]
+ self.arguments = [
+ arg if isinstance(arg, str) else arg["type"] for arg in arguments
+ ]
self.guard = guard
self.attributes = attributes
def __str__(self):
attributes_str = " ".join(self.attributes)
--- yaml_to_classes.py 2024-06-27 21:02:23.000000 +0000
+++ yaml_to_classes.py 2024-06-27 21:07:34.335887 +0000
@@ -49,22 +49,22 @@
for function_data in yaml_data.get("functions", []):
arguments = [arg["type"] for arg in function_data["arguments"]]
guard = function_data.get("guard", None)
attributes = function_data.get("attributes", None)
- standards = function_data.get("standards", None),
+ standards = (function_data.get("standards", None),)
header.add_function(
Function(
standards,
function_data["return_type"],
function_data["name"],
arguments,
guard,
attributes,
)
)
-
+
for object_data in yaml_data.get("objects", []):
header.add_object(
Object(object_data["object_name"], object_data["object_type"])
)
``````````
</details>
https://github.com/llvm/llvm-project/pull/96833
More information about the libc-commits
mailing list