def METHOD_NAME(self, spec: str) -> tuple[Spec, bool]:
    """Parse the given spec string and also return `true` if it's an ignore.
    :raises: CmdLineSpecParser.BadSpecError if the address selector could not be parsed.
    """
    is_ignore = False
    if spec.startswith("-"):
        is_ignore = True
        spec = spec[1:]
    (
        (
            path_component,
            target_component,
            generated_component,
            parameters,
        ),
        wildcard,
    ) = native_engine.address_spec_parse(spec)
    if wildcard == "::":
        return RecursiveGlobSpec(directory=self._normalize_spec_path(path_component)), is_ignore
    if wildcard == ":":
        return DirGlobSpec(directory=self._normalize_spec_path(path_component)), is_ignore
    if target_component or generated_component or parameters:
        return (
            AddressLiteralSpec(
                path_component=self._normalize_spec_path(path_component),
                target_component=target_component,
                generated_component=generated_component,
                parameters=FrozenDict(sorted(parameters)),
            ),
            is_ignore,
        )
    if "*" in path_component:
        return FileGlobSpec(spec), is_ignore
    if PurePath(spec).suffix:
        return FileLiteralSpec(self._normalize_spec_path(spec)), is_ignore
    spec_path = self._normalize_spec_path(spec)
    if spec_path == ".":
        return DirLiteralSpec(""), is_ignore
    # Some paths that look like dirs can actually be files without extensions.
    if Path(self._root_dir, spec_path).is_file():
        return FileLiteralSpec(spec_path), is_ignore
    return DirLiteralSpec(spec_path), is_ignore