Skip to content

Commit 29f1f9c

Browse files
thrcleclaude
andcommitted
style: apply black formatting
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 2fc067e commit 29f1f9c

4 files changed

Lines changed: 16 additions & 6 deletions

File tree

src/lang2sql/adapters/storage/okf_bundle.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,12 @@ def _scope_dir(self, entry: FedEntry) -> Path:
110110

111111
def _concept_path(self, entry: FedEntry) -> Path:
112112
folder = _KIND_FOLDER.get(entry.kind, "misc")
113-
slug = re.sub(r'[/\\]', '-', entry.term.strip()).lower().replace(" ", "_").replace(":", "-")
113+
slug = (
114+
re.sub(r"[/\\]", "-", entry.term.strip())
115+
.lower()
116+
.replace(" ", "_")
117+
.replace(":", "-")
118+
)
114119
path = self._scope_dir(entry) / folder / f"{slug}.md"
115120
if not path.resolve().is_relative_to(self.base_dir.resolve()):
116121
raise ValueError(f"unsafe path derived from term: {entry.term!r}")

src/lang2sql/tools/confirm_ingest.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,9 @@ async def run(self, args: dict[str, Any], ctx: "HarnessContext") -> ToolResult:
112112
return ToolResult(call_id="", content="No candidates selected.")
113113

114114
entity = (
115-
"" if layer == "guild" else (channel_id if layer == "channel" else ctx.identity.user_id)
115+
""
116+
if layer == "guild"
117+
else (channel_id if layer == "channel" else ctx.identity.user_id)
116118
)
117119
registered: list[str] = []
118120
for cand in selected:
@@ -161,5 +163,3 @@ def _select(
161163
return None
162164
result.append(candidates[idx])
163165
return result
164-
165-

src/lang2sql/tools/semantic_federation.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ def _validate_layer(
4242
return layer, "❌ 채널 컨텍스트 없이 channel 레이어에 등록할 수 없습니다."
4343
return layer, None
4444

45+
4546
from ..tools.enrich_schema import (
4647
_KV_PREFIX as _ENRICH_PREFIX,
4748
_KV_RELATIONSHIPS as _ENRICH_RELATIONSHIPS,

tests/test_confirm_ingest.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ def _make_ctx(
4141
is_admin: bool = False,
4242
channel_id: str = "c1",
4343
) -> HarnessContext:
44-
identity = Identity(user_id="u1", guild_id="g1", channel_id=channel_id, is_admin=is_admin)
44+
identity = Identity(
45+
user_id="u1", guild_id="g1", channel_id=channel_id, is_admin=is_admin
46+
)
4547
from lang2sql.ingestion import FileSource, IngestionPipeline, LLMExtractor
4648
from lang2sql.memory import (
4749
InjectAllRecall,
@@ -233,7 +235,9 @@ def test_confirm_channel_layer_blocked_without_channel_id() -> None:
233235
_seed_pending(store, scope, "defs.md", [_SAMPLE[0]])
234236

235237
result = asyncio.run(
236-
ConfirmIngest().run({"ref": "defs.md", "accept": "all", "layer": "channel"}, ctx)
238+
ConfirmIngest().run(
239+
{"ref": "defs.md", "accept": "all", "layer": "channel"}, ctx
240+
)
237241
)
238242
assert result.is_error
239243
assert "channel" in result.content

0 commit comments

Comments
 (0)