mirror of
https://github.com/qdrant/landing_page.git
synced 2026-10-09 12:58:31 +02:00
Generate multiple code snippets from a single source file (#2146)
* Support generating multiple snippets from one source file * Convert Python code snippets from one source file * Add code snippets for C#, Go, Java, Rust and TS * Make intro less Python-oriented * Add client installation instructions for all languages * Cleanup python code --------- Co-authored-by: xzfc <xzfcpw@gmail.com>
This commit is contained in:
@@ -94,7 +94,7 @@ class LanguageJava(Language):
|
||||
assert RE_CODE.match(EXAMPLE_CODE) is not None
|
||||
|
||||
@classmethod
|
||||
def shorten(cls, contents: str) -> str:
|
||||
def shorten(cls, contents: str) -> dict[str, str]:
|
||||
if (m := LanguageJava.RE_CODE.match(contents)) is None:
|
||||
msg = "Invalid snippet format"
|
||||
raise ValueError(msg)
|
||||
|
||||
Reference in New Issue
Block a user