Skip to content

Commit

Permalink
Make pylint aware of "stateless_property" decorator
Browse files Browse the repository at this point in the history
Mark it as defining property, so pylint knows accessing those properties
is about the value, not the function.
  • Loading branch information
marmarek committed Jun 27, 2024
1 parent 1afef07 commit 3362ffc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions .pylintrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[MASTER]
persistent=no
ignore=tests
init-hook="import astroid.bases; astroid.bases.POSSIBLE_PROPERTIES.add('stateless_property')"

[MESSAGES CONTROL]
# abstract-class-little-used: see http://www.logilab.org/ticket/111138
Expand Down
3 changes: 1 addition & 2 deletions qubes/vm/qubesvm.py
Original file line number Diff line number Diff line change
Expand Up @@ -2143,7 +2143,7 @@ def is_qrexec_running(self, stubdom=False):
:py:obj:`False` otherwise.
:rtype: bool
"""
if self.xid < 0: # pylint: disable=comparison-with-callable
if self.xid < 0:
return False
name = self.name + '-dm' if stubdom else self.name
return os.path.exists('/var/run/qubes/qrexec.%s' % name)
Expand Down Expand Up @@ -2281,7 +2281,6 @@ def start_time(self):
def icon(self):
"""freedesktop icon name, suitable for use in
:py:meth:`PyQt4.QtGui.QIcon.fromTheme`"""
# pylint: disable=comparison-with-callable
raw_icon_name = self.label.name
if self.klass == 'TemplateVM':
return 'templatevm-' + raw_icon_name
Expand Down

0 comments on commit 3362ffc

Please sign in to comment.