From ea758028d05720288f30645c116d002415f5817d Mon Sep 17 00:00:00 2001 From: Laurent Peuch Date: Thu, 19 Dec 2019 02:29:36 +0100 Subject: [mypy/fix] Incompatible types in assignment --- logilab/common/interface.py | 2 +- logilab/common/shellutils.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/logilab/common/interface.py b/logilab/common/interface.py index 7cf1027..ab0e529 100644 --- a/logilab/common/interface.py +++ b/logilab/common/interface.py @@ -28,9 +28,9 @@ __docformat__ = "restructuredtext en" class Interface(object): """Base class for interfaces.""" + @classmethod def is_implemented_by(cls, instance): return implements(instance, cls) - is_implemented_by = classmethod(is_implemented_by) def implements(obj, interface): diff --git a/logilab/common/shellutils.py b/logilab/common/shellutils.py index 792ae45..d03ae16 100644 --- a/logilab/common/shellutils.py +++ b/logilab/common/shellutils.py @@ -221,6 +221,7 @@ def unzip(archive, destdir): outfile.close() +@deprecated('Use subprocess.Popen instead') class Execute: """This is a deadlock safe version of popen2 (no stdin), that returns an object with errorlevel, out and err. @@ -231,8 +232,6 @@ class Execute: self.out, self.err = cmd.communicate() self.status = os.WEXITSTATUS(cmd.returncode) -Execute = deprecated('Use subprocess.Popen instead')(Execute) - class ProgressBar(object): """A simple text progression bar.""" -- cgit v1.2.1