diff options
author | Laurent Peuch <cortex@worlddomination.be> | 2019-12-19 02:29:36 +0100 |
---|---|---|
committer | Laurent Peuch <cortex@worlddomination.be> | 2019-12-19 02:29:36 +0100 |
commit | ea758028d05720288f30645c116d002415f5817d (patch) | |
tree | aa0add421c2d1b24458660aa9577c8869a5650ec | |
parent | 71cff4829d509ff7335784e4d1df8a8457153bd9 (diff) | |
download | logilab-common-ea758028d05720288f30645c116d002415f5817d.tar.gz |
[mypy/fix] Incompatible types in assignment
-rw-r--r-- | logilab/common/interface.py | 2 | ||||
-rw-r--r-- | 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.""" |