[clang] [libclang/python] Add equality comparison operators for File (PR #130383)

via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 7 19:04:56 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 e22579a6752801a5d3ced59c7a2e2499d547c657...8a206611120c15010381e1570c2b4d7548142dbd clang/bindings/python/clang/cindex.py clang/bindings/python/tests/cindex/test_file.py
``````````

</details>

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

``````````diff
--- clang/cindex.py	2025-03-08 02:59:32.000000 +0000
+++ clang/cindex.py	2025-03-08 03:04:33.084605 +0000
@@ -3469,11 +3469,13 @@
 
     def __repr__(self):
         return "<File: %s>" % (self.name)
 
     def __eq__(self, other) -> bool:
-        return isinstance(other, File) and bool(conf.lib.clang_File_isEqual(self, other))
+        return isinstance(other, File) and bool(
+            conf.lib.clang_File_isEqual(self, other)
+        )
 
     def __ne__(self, other) -> bool:
         return not self.__eq__(other)
 
     @staticmethod

``````````

</details>


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


More information about the cfe-commits mailing list