diff --git a/.pylintrc b/.pylintrc index f161de012..8cb7a35fd 100644 --- a/.pylintrc +++ b/.pylintrc @@ -53,4 +53,4 @@ defining-attr-methods=__init__,__new__,setUp max-args=10 [TYPECHECK] -ignored-classes=WebElementWrapper,AnsiCodes +ignored-classes=WebElementWrapper,AnsiCodes,UnsetObject diff --git a/qutebrowser/utils/objreg.py b/qutebrowser/utils/objreg.py index d83727c9a..f663b02a3 100644 --- a/qutebrowser/utils/objreg.py +++ b/qutebrowser/utils/objreg.py @@ -26,7 +26,17 @@ import functools from PyQt5.QtCore import QCoreApplication, QObject -_UNSET = object() +class UnsetObject: + + """Class for an unset object. + + Only used (rather than object) so we can tell pylint to shut up about it. + """ + + __slots__ = () + + +_UNSET = UnsetObject() class ObjectRegistry(collections.UserDict):