[clang] [libclang/python] Simplify __eq__ operators (PR #140540)

2025-05-19 Thread Jannick Kremer via cfe-commits
DeinAlptraum wrote: The `# type: ignore [no-any-return]` are added in cases where the return type cannot be inferred, usually the libclang library functions called on the `conf.lib` object, since they are added dynamically. By combining the library call with the `isinstance` check, even withou

[clang] [libclang/python] Simplify __eq__ operators (PR #140540)

2025-05-19 Thread Jannick Kremer via cfe-commits
DeinAlptraum wrote: @Endilll I don't see the `__ne__` operator being addded in the diff If you are referring to the "Fix formatting again, again" commit, that just readds the operator after accidentally removing it in the "Fix formatting" commit (I had some issues with my editor yesterday) htt

[clang] [libclang/python] Simplify __eq__ operators (PR #140540)

2025-05-19 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: Why does the diff show that you add `__ne__` operator, even though it's already present? What am I missing? https://github.com/llvm/llvm-project/blob/f3d36b15f6dde7ca2d080279274d5d0f4bfc8c30/clang/bindings/python/clang/cindex.py#L397-L403 https://github.com

[clang] [libclang/python] Simplify __eq__ operators (PR #140540)

2025-05-19 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum updated https://github.com/llvm/llvm-project/pull/140540 >From 51df5f4eb979edb7cc761276fe846626641bd6b4 Mon Sep 17 00:00:00 2001 From: Jannick Kremer Date: Mon, 19 May 2025 22:36:05 +0900 Subject: [PATCH 1/4] [libclang/python] Simplfy __eq__ operators This allows

[clang] [libclang/python] Simplify __eq__ operators (PR #140540)

2025-05-19 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum updated https://github.com/llvm/llvm-project/pull/140540 >From 51df5f4eb979edb7cc761276fe846626641bd6b4 Mon Sep 17 00:00:00 2001 From: Jannick Kremer Date: Mon, 19 May 2025 22:36:05 +0900 Subject: [PATCH 1/3] [libclang/python] Simplfy __eq__ operators This allows

[clang] [libclang/python] Simplify __eq__ operators (PR #140540)

2025-05-19 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum updated https://github.com/llvm/llvm-project/pull/140540 >From 51df5f4eb979edb7cc761276fe846626641bd6b4 Mon Sep 17 00:00:00 2001 From: Jannick Kremer Date: Mon, 19 May 2025 22:36:05 +0900 Subject: [PATCH 1/2] [libclang/python] Simplfy __eq__ operators This allows

[clang] [libclang/python] Simplify __eq__ operators (PR #140540)

2025-05-19 Thread via cfe-commits
github-actions[bot] wrote: :warning: Python code formatter, darker found issues in your code. :warning: You can test this locally with the following command: ``bash darker --check --diff -r HEAD~1...HEAD clang/bindings/python/clang/cindex.py `` View the diff from dark

[clang] [libclang/python] Simplify __eq__ operators (PR #140540)

2025-05-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Jannick Kremer (DeinAlptraum) Changes This allows us to remove a few type: ignores. --- Full diff: https://github.com/llvm/llvm-project/pull/140540.diff 1 Files Affected: - (modified) clang/bindings/python/clang/cindex.py (+3-9)

[clang] [libclang/python] Simplify __eq__ operators (PR #140540)

2025-05-19 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum created https://github.com/llvm/llvm-project/pull/140540 This allows us to remove a few type: ignores. >From 51df5f4eb979edb7cc761276fe846626641bd6b4 Mon Sep 17 00:00:00 2001 From: Jannick Kremer Date: Mon, 19 May 2025 22:36:05 +0900 Subject: [PATCH] [libclang/p