Skip to content

Commit 20c8adc

Browse files
n24q02mclaude
andauthored
fix: format README code blocks the way ruff 0.16 wants them (#964)
ruff 0.16 formats Python inside Markdown fences; 0.15 never read Markdown at all. So README.md has been drifting from a rule nothing enforced yet, and the pending ruff bump (#961) fails on it before it can land: unformatted: File would be reformatted --> README.md:141:16 Fixing this on main rather than on the Renovate branch: the drift belongs to main, not to the bump, and a commit pushed onto a Renovate branch is lost the next time Renovate regenerates it. Body is the output of `ruff format` under 0.16.2 with no hand edits, and it touches no .py file. Both versions are green on the result: ruff 0.15.21 format --check -> 70 files already formatted ruff 0.16.2 format --check -> 81 files already formatted The 70/81 gap is the Markdown files the old version does not look at, which is why this is safe to land before the bump. Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
1 parent f426f9c commit 20c8adc

1 file changed

Lines changed: 10 additions & 5 deletions

File tree

README.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,12 @@ embeddings_256 = list(model.embed(documents, dim=256))
138138
# Each embedding: numpy array of shape (256,), L2-normalized
139139

140140
# Query with instruction (for retrieval tasks)
141-
queries = list(model.query_embed(
142-
["What is Qwen3?"],
143-
task="Given a question, retrieve relevant passages",
144-
))
141+
queries = list(
142+
model.query_embed(
143+
["What is Qwen3?"],
144+
task="Given a question, retrieve relevant passages",
145+
)
146+
)
145147
```
146148

147149
### Reranking
@@ -194,7 +196,9 @@ CustomModelSpec(
194196
model_id="onnx-community/gte-multilingual-base",
195197
hf="onnx-community/gte-multilingual-base",
196198
model_file="onnx/model_quantized.onnx",
197-
dim=768, pooling="CLS", normalization=True,
199+
dim=768,
200+
pooling="CLS",
201+
normalization=True,
198202
).register()
199203

200204
model = TextEmbedding("onnx-community/gte-multilingual-base")
@@ -229,6 +233,7 @@ deps don't co-resolve with the lean runtime pins):
229233
```python
230234
# pip install "optimum[exporters]" torch transformers onnx
231235
from qwen3_embed.export import export_to_onnx
236+
232237
export_to_onnx("intfloat/multilingual-e5-base", "./e5-onnx")
233238
```
234239

0 commit comments

Comments
 (0)