diff options
-rw-r--r-- | coverage/plugin_support.py | 4 | ||||
-rw-r--r-- | coverage/sqldata.py | 4 |
2 files changed, 2 insertions, 6 deletions
diff --git a/coverage/plugin_support.py b/coverage/plugin_support.py index 1b5ba8d7..dfe5a4ec 100644 --- a/coverage/plugin_support.py +++ b/coverage/plugin_support.py @@ -110,11 +110,9 @@ class Plugins: if specialized is not None: specialized.append(plugin) - def __nonzero__(self): + def __bool__(self): return bool(self.order) - __bool__ = __nonzero__ - def __iter__(self): return iter(self.order) diff --git a/coverage/sqldata.py b/coverage/sqldata.py index a7df987f..7fca3248 100644 --- a/coverage/sqldata.py +++ b/coverage/sqldata.py @@ -316,7 +316,7 @@ class CoverageData(SimpleReprMixin): self._create_db() return self._dbs[threading.get_ident()] - def __nonzero__(self): + def __bool__(self): if (threading.get_ident() not in self._dbs and not os.path.exists(self._filename)): return False try: @@ -326,8 +326,6 @@ class CoverageData(SimpleReprMixin): except CoverageException: return False - __bool__ = __nonzero__ - @contract(returns="bytes") def dumps(self): """Serialize the current data to a byte string. |