Skip to content

Conversation

@TApplencourt
Copy link
Contributor

Remove unused OptionGroup import in some cindex.py example.

@llvmbot llvmbot added clang Clang issues not falling into any other category clang:as-a-library libclang and C++ API labels Dec 15, 2025
@llvmbot
Copy link
Member

llvmbot commented Dec 15, 2025

@llvm/pr-subscribers-clang

Author: Thomas Applencourt (TApplencourt)

Changes

Remove unused OptionGroup import in some cindex.py example.


Full diff: https://github.com/llvm/llvm-project/pull/172369.diff

2 Files Affected:

  • (modified) clang/bindings/python/examples/cindex/cindex-dump.py (+1-1)
  • (modified) clang/bindings/python/examples/cindex/cindex-includes.py (+1-1)
diff --git a/clang/bindings/python/examples/cindex/cindex-dump.py b/clang/bindings/python/examples/cindex/cindex-dump.py
index 10c3e4ba2dba4..97b0e6682855a 100644
--- a/clang/bindings/python/examples/cindex/cindex-dump.py
+++ b/clang/bindings/python/examples/cindex/cindex-dump.py
@@ -63,7 +63,7 @@ def main():
     from clang.cindex import Index
     from pprint import pprint
 
-    from optparse import OptionParser, OptionGroup
+    from optparse import OptionParser
 
     global opts
 
diff --git a/clang/bindings/python/examples/cindex/cindex-includes.py b/clang/bindings/python/examples/cindex/cindex-includes.py
index 4e8bae19005cd..ea066a7e91082 100644
--- a/clang/bindings/python/examples/cindex/cindex-includes.py
+++ b/clang/bindings/python/examples/cindex/cindex-includes.py
@@ -18,7 +18,7 @@ def main():
     import sys
     from clang.cindex import Index
 
-    from optparse import OptionParser, OptionGroup
+    from optparse import OptionParser
 
     parser = OptionParser("usage: %prog [options] {filename} [clang-args*]")
     parser.disable_interspersed_args()

Copy link
Contributor

@DeinAlptraum DeinAlptraum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@DeinAlptraum DeinAlptraum merged commit 385f186 into llvm:main Dec 16, 2025
15 checks passed
@TApplencourt TApplencourt deleted the python_example_remove_import branch December 16, 2025 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clang:as-a-library libclang and C++ API clang Clang issues not falling into any other category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants