[clang] [libclang/python] Fix bug in `SourceRange.__contains__`, add tests (PR #101802)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 7 10:59:03 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 5edb49355a37b9e4168c4c07fdc0c6623107a735...4a54dad6d0a310f87a17ea2abab357c9145d74eb clang/bindings/python/tests/cindex/test_source_range.py clang/bindings/python/clang/cindex.py
``````````
</details>
<details>
<summary>
View the diff from darker here.
</summary>
``````````diff
--- clang/cindex.py 2024-08-07 17:54:35.000000 +0000
+++ clang/cindex.py 2024-08-07 17:58:32.380252 +0000
@@ -267,11 +267,11 @@
f = File(f)
else:
f = None
self._data = (f, int(l.value), int(c.value), int(o.value))
return self._data
-
+
def __le__(self, other):
if self.line < other.line:
return True
if self.line == other.line and self.column <= other.column:
return True
``````````
</details>
https://github.com/llvm/llvm-project/pull/101802
More information about the cfe-commits
mailing list