MCPcopy
hub / github.com/MinishLab/semble / _resolve_content

Function _resolve_content

src/semble/cli.py:86–96  ·  view source on GitHub ↗

Resolve --content and the deprecated --include-text-files into a list of ContentType values.

(content: list[str], include_text_files: bool)

Source from the content-addressed store, hash-verified

84
85
86def _resolve_content(content: list[str], include_text_files: bool) -> list[ContentType]:
87 """Resolve --content and the deprecated --include-text-files into a list of ContentType values."""
88 if include_text_files:
89 warnings.warn(
90 "--include-text-files is deprecated and will be removed in a future version. Use --content all instead.",
91 DeprecationWarning,
92 stacklevel=2,
93 )
94 if include_text_files or "all" in content:
95 return [ContentType.CODE, ContentType.DOCS, ContentType.CONFIG]
96 return [ContentType(c) for c in content]
97
98
99def _load_index(path: str, content: list[ContentType]) -> SembleIndex:

Callers 2

_mcp_mainFunction · 0.85
_cli_mainFunction · 0.85

Calls 1

ContentTypeClass · 0.90

Tested by

no test coverage detected