diff -r 76c0f3ed7ac5 -r a1a6ff3e5486 VultureChecker/vulture.py --- a/VultureChecker/vulture.py Tue Oct 06 19:29:52 2015 +0200 +++ b/VultureChecker/vulture.py Tue Oct 06 20:01:23 2015 +0200 @@ -18,7 +18,12 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. # +# +# # Patched to support the Python 3.5 async functionality. +# Patched to support PyQt's @pyqtSlot decorator to consider slots as +# always used. +# Patches: Copyright (C) 2015 Detlev Offenbach <detlev@die-offenbachs.de> # from __future__ import print_function @@ -63,6 +68,7 @@ self.defined_attrs = [] self.defined_funcs = [] + self.defined_slots = [] # @pyqtSlot support self.defined_props = [] self.defined_vars = [] self.used_attrs = [] @@ -175,6 +181,11 @@ if getattr(decorator, 'id', None) == 'property': self.defined_props.append(self._get_item(node, 'property')) break + elif getattr(decorator, 'func', None) is not None: + # @pyqtSlot support + if getattr(getattr(decorator, 'func'), 'id') == 'pyqtSlot': + self.defined_slots.append(self._get_item(node, 'slot')) + break else: # Function is not a property. if not _ignore_function(node.name):