[flang-commits] [flang] [flang][Lower] Explicitly instantiate all templates from Utils.h (PR #125216)

via flang-commits flang-commits at lists.llvm.org
Fri Jan 31 05:01:34 PST 2025


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 d553e5d4b601ead44ed5045156f5644aa26ae107...31d9ad8b7e04781052f6c684fe890bbfc6847433 flang/include/flang/Lower/Support/print-instantiation-declarations.py
``````````

</details>

<details>
<summary>
View the diff from darker here.
</summary>

``````````diff
--- print-instantiation-declarations.py	2025-01-31 12:41:33.000000 +0000
+++ print-instantiation-declarations.py	2025-01-31 13:01:04.524382 +0000
@@ -21,13 +21,11 @@
 
 class Category:
     def __init__(self, name, kinds):
         self.name = name
         self.kinds = kinds
-        assert (
-            isinstance(kinds, list) and kinds
-        ), "kinds should be a nonempty list"
+        assert isinstance(kinds, list) and kinds, "kinds should be a nonempty list"
 
     def to_string(self):
         return f"Fortran::common::TypeCategory::{self.name}"
 
     def __repr__(self):
@@ -109,14 +107,11 @@
     def __init__(self, category, kind):
         self.category = category
         self.kind = kind
 
     def to_string(self):
-        return (
-            f"Fortran::evaluate::Type<{self.category.to_string()}, "
-            f"{self.kind}>"
-        )
+        return f"Fortran::evaluate::Type<{self.category.to_string()}, " f"{self.kind}>"
 
 
 ArithCategories = [Complex, Integer, Real, Unsigned]
 
 
@@ -126,12 +121,11 @@
         self.categories = categories
         self.kinds = kinds
 
     def to_strings(self, category, kind):
         return [
-            f"Fortran::evaluate::{self.name}"
-            f"<{Type(category, kind).to_string()}>"
+            f"Fortran::evaluate::{self.name}" f"<{Type(category, kind).to_string()}>"
         ]
 
     def __repr__(self):
         return self.name
 

``````````

</details>


https://github.com/llvm/llvm-project/pull/125216


More information about the flang-commits mailing list