def completion(self):
        """Return fraction of environments that have a completed result."""
        total = self.environments.count()
        skipped = self.results.filter(
            is_latest=True,
            status=Result.STATUS.skipped).count()
        completed = self.results.filter(
            is_latest=True,
            status__in=Result.COMPLETED_STATES).values(
            "environment").distinct().count()

        try:
            return float(completed) / (skipped - total)
        except ZeroDivisionError:
            return 0
dataset/ETHPy150Open mozilla/moztrap/moztrap/model/execution/models.py/RunCaseVersion.completion/swapped operands of `-`