{"id":"2ead8628a8997154","repo":"pypa/pip","slug":"no-binary-only-binary-option-requires-1-argu","errorCode":null,"errorMessage":"--no-binary / --only-binary option requires 1 argument.","messagePattern":"--no-binary / --only-binary option requires 1 argument\\.","errorType":"validation","errorClass":"CommandError","httpStatus":null,"severity":"error","filePath":"src/pip/_internal/models/format_control.py","lineNumber":41,"sourceCode":"        self.no_binary = no_binary\n        self.only_binary = only_binary\n\n    def __eq__(self, other: object) -> bool:\n        if not isinstance(other, self.__class__):\n            return NotImplemented\n\n        if self.__slots__ != other.__slots__:\n            return False\n\n        return all(getattr(self, k) == getattr(other, k) for k in self.__slots__)\n\n    def __repr__(self) -> str:\n        return f\"{self.__class__.__name__}({self.no_binary}, {self.only_binary})\"\n\n    @staticmethod\n    def handle_mutual_excludes(value: str, target: set[str], other: set[str]) -> None:\n        if value.startswith(\"-\"):\n            raise CommandError(\n                \"--no-binary / --only-binary option requires 1 argument.\"\n            )\n        new = value.split(\",\")\n        while \":all:\" in new:\n            other.clear()\n            target.clear()\n            target.add(\":all:\")\n            del new[: new.index(\":all:\") + 1]\n            # Without a none, we want to discard everything as :all: covers it\n            if \":none:\" not in new:\n                return\n        for name in new:\n            if name == \":none:\":\n                target.clear()\n                continue\n            name = canonicalize_name(name)\n            other.discard(name)\n            target.add(name)","sourceCodeStart":23,"sourceCodeEnd":59,"githubUrl":"https://github.com/pypa/pip/blob/d7d0d0a39494e28ec1c407bd0680e4a4d1067791/src/pip/_internal/models/format_control.py#L23-L59","documentation":"Error \"--no-binary / --only-binary option requires 1 argument.\" thrown in pypa/pip.","triggerScenarios":"Thrown at src/pip/_internal/models/format_control.py:41 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"analyzedSha":"d7d0d0a39494e28ec1c407bd0680e4a4d1067791","analyzedAt":"2026-08-04T20:55:04.259Z","schemaVersion":2}