Overriden methods of C/C++ extensions
See original GitHub issueOriginally reported by: Florian Bruhin (Bitbucket: The-Compiler, GitHub: The-Compiler)
When subclassing a method of a class defined in a C/C++ extension, such as this example using the PyQt GUI framework:
from PyQt5.QtCore import QSize
from PyQt5.QtWidgets import QLineEdit, QApplication
class LineEdit(QLineEdit):
def sizeHint(self):
return QSize(128, 128)
app = QApplication([])
le = LineEdit()
le.show()
app.exec_()
vulture doesn’t detect that sizeHint is called via C++:
foo.py:7: Unused function 'sizeHint'
Maybe if a class inherits from a non-Python class, and an existing method is overridden, it should always be considered used?
Issue Analytics
- State:
- Created 8 years ago
- Comments:19 (19 by maintainers)
Top Results From Across the Web
How to override an existing extension method - Stack Overflow
Extension methods cannot be overridden since they are not instance methods and they are not virtual. The compiler will complain ...
Read more >Overriding extension methods (Should know) | Instant .NET ...
Extension methods cannot be overridden the way classes and instance methods are. They are overridden by a slight trick in how the compiler...
Read more >Overriding Chrome pages
Override pages are a way to substitute an HTML file from your extension for a page that Google Chrome normally provides.
Read more >How to override Save method in standard controller extension?
I am wriiting a extension on Case object. There I want to write a save method with my own logic and want this...
Read more >Extension Methods in C# - C# Corner
Extension methods cannot be used to override existing methods. The concept of extension methods cannot be applied to fields, properties or ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Now that we have a repository for whitelist generators at https://github.com/RJ722/vulture-whitelist-generators, I think we can close this issue.
Hey Jendrik,
Ongoing action occurring at https://github.com/RJ722/vulture-whitelist-generators/tree/generate. I’ve an ongoing PR which is just one final review from @The-Compiler away from alpha release 1. 😛