def matches(self, line: str) -> bool:
        """Return whether the passed in PEP 508 string
        is the same requirement as this one.
        """
        if not isinstance(line, str):
            return False
        req = parse_line(line)
        return self.key == req.key or (
            isinstance(self, FileRequirement) and isinstance(req, FileRequirement) and self.url == req.url
        )
Return whether the passed in PEP 508 string
        is the same requirement as this one.
        
src/pdm/models/requirements.py