mirror of
https://github.com/qdrant/qdrant-client.git
synced 2026-07-26 12:41:06 -05:00
* new: drop python 3.8 support, update type hints * fix: remove 3.8 from ci * fix: update type hints * fix: make netlify use python3.10 * fix: try python3.9 for sphinx * debug: try updating sphinx * new: bump ffastembed to 0.4.2 * fix: install numpy<2 for mypy * fix: install numpy via poetry
17 lines
425 B
Python
17 lines
425 B
Python
import ast
|
|
|
|
from tools.async_client_generator.config import AUTOGEN_WARNING_MESSAGE
|
|
|
|
|
|
class BaseGenerator:
|
|
def __init__(self) -> None:
|
|
self.transformers: list[ast.NodeTransformer] = []
|
|
|
|
def generate(self, code: str) -> str:
|
|
nodes = ast.parse(code)
|
|
|
|
for transformer in self.transformers:
|
|
nodes = transformer.visit(nodes)
|
|
|
|
return AUTOGEN_WARNING_MESSAGE + ast.unparse(nodes)
|