mirror of
https://github.com/qdrant/landing_page.git
synced 2026-09-30 16:38:31 +02:00
Snipets tooling update
- update README - generate-md.py: ignore trailing newlines when complaining about diffs - all langs: add more dependencies to templates - all langs: support @hide-start and @hide-end for multi-line hiding - go: also allow one-line imports - java: allow declarations other than `main` method - python, typescript: implement `unshorten` for implicit imports and client initialization - python: add mypy config as `datasets` lacks type py.typed - python: hide `# mypy:` annotations - typescript: add tsconfig that allows top-level `await`s - typescript: depend on @types/node to fix `import ... from "crypto"`
This commit is contained in:
@@ -52,11 +52,11 @@ def main() -> None:
|
||||
snippet_dir / f"{lang.NAME}.md",
|
||||
)
|
||||
handwritten = (snippet_dir / f"{lang.NAME}.md").read_text()
|
||||
if handwritten != generated:
|
||||
if handwritten.rstrip("\n") != generated.rstrip("\n"):
|
||||
print_and_colorize_diff(
|
||||
difflib.unified_diff(
|
||||
handwritten.splitlines(keepends=True),
|
||||
generated.splitlines(keepends=True),
|
||||
handwritten.rstrip("\n").splitlines(keepends=True),
|
||||
generated.rstrip("\n").splitlines(keepends=True),
|
||||
fromfile=str(handwritten_fname),
|
||||
tofile=str(generated_fname),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user