diff --git a/src/pipdeptree/_models/package.py b/src/pipdeptree/_models/package.py index 6949abf..af98d60 100644 --- a/src/pipdeptree/_models/package.py +++ b/src/pipdeptree/_models/package.py @@ -226,18 +226,18 @@ def installed_version(self) -> str: return v return self.dist.version - @property - def is_missing(self) -> bool: - return self.installed_version == self.UNKNOWN_VERSION - def is_conflicting(self) -> bool: """If installed version conflicts with required version.""" # unknown installed version is also considered conflicting - if self.installed_version == self.UNKNOWN_VERSION: + if self.is_missing: return True return self.installed_version not in self._obj.specifier + @property + def is_missing(self) -> bool: + return self.installed_version == self.UNKNOWN_VERSION + def as_dict(self) -> dict[str, str]: return { "key": self.key,