fork of hey-api/openapi-ts because I need some additional things
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

chore: prepare Python typecheck

Lubos c7ebec35 339cbe23

+3897 -4
+4
.github/workflows/ci.yml
··· 46 46 node-version: ${{ matrix.node-version }} 47 47 cache: pnpm 48 48 49 + - uses: astral-sh/setup-uv@v5 50 + with: 51 + enable-cache: true 52 + 49 53 - name: Install dependencies 50 54 run: pnpm install --frozen-lockfile 51 55
+1
.gitignore
··· 14 14 dist 15 15 coverage 16 16 .env 17 + .venv 17 18 .next 18 19 .nuxt 19 20 .output
+8
.vscode/settings.json
··· 10 10 "eslint.nodePath": "./node_modules", 11 11 "eslint.workingDirectories": [{ "pattern": "./packages/*/" }], 12 12 "oxc.fmt.configPath": ".oxfmtrc.json", 13 + "search.exclude": { 14 + "**/*-lock.yaml": true, 15 + "**/*.log": true, 16 + "**/*.map": true, 17 + "**/*.mjs": true, 18 + "**/*.mts": true, 19 + "**/*.tsbuildinfo": true 20 + }, 13 21 "typescript.preferences.autoImportFileExcludePatterns": ["dist/**"], 14 22 "typescript.preferences.autoImportSpecifierExcludeRegexes": ["^(node:)?os$"], 15 23 "typescript.tsdk": "node_modules/typescript/lib",
+5 -1
package.json
··· 25 25 "examples:check": "sh ./scripts/examples-check.sh", 26 26 "examples:generate": "sh ./scripts/examples-generate.sh", 27 27 "format": "oxfmt .", 28 + "format:next": "oxfmt . && uv run ruff format packages/openapi-python/src/ts-python/__snapshots__", 29 + "lint": "oxfmt --check . && eslint .", 30 + "lint:next": "oxfmt --check . && eslint . && uv run ruff check packages/openapi-python/src/ts-python/__snapshots__", 28 31 "lint:fix": "oxfmt . && eslint . --fix", 29 - "lint": "oxfmt --check . && eslint .", 32 + "lint:fix:next": "oxfmt . && eslint . --fix && uv run ruff check --fix packages/openapi-python/src/ts-python/__snapshots__", 30 33 "prepare": "husky", 31 34 "test:changelog": "vitest run __tests__/*.test.ts", 32 35 "test:changelog:watch": "vitest watch __tests__/*.test.ts", ··· 39 42 "tw": "turbo run test:watch --filter", 40 43 "tu": "turbo run test:update --filter", 41 44 "tb": "turbo run build --filter", 45 + "ty": "turbo run typecheck --filter", 42 46 "dev:ts": "cd dev && tsx watch --clear-screen=false ../packages/openapi-ts/src/run.ts", 43 47 "dev:py": "cd dev && tsx watch --clear-screen=false ../packages/openapi-python/src/run.ts" 44 48 },
+3
packages/openapi-python/bin/run.cmd
··· 1 + @echo off 2 + node "%~dp0\run.js" %* 3 +
+18
packages/openapi-python/bin/run.js
··· 1 + #!/usr/bin/env node 2 + import { spawnSync } from 'node:child_process'; 3 + import fs from 'node:fs'; 4 + import path from 'node:path'; 5 + import { fileURLToPath } from 'node:url'; 6 + 7 + const __dirname = path.dirname(fileURLToPath(import.meta.url)); 8 + const target = path.join(__dirname, '..', 'dist', 'run.mjs'); 9 + 10 + if (!fs.existsSync(target)) { 11 + console.error('openapi-python not built (expect dist/run.mjs)'); 12 + process.exit(1); 13 + } 14 + 15 + const res = spawnSync(process.execPath, [target, ...process.argv.slice(2)], { 16 + stdio: 'inherit', 17 + }); 18 + process.exit(res.status ?? 0);
+2 -1
packages/openapi-python/package.json
··· 60 60 "test:update": "vitest watch --update", 61 61 "test:watch": "vitest watch", 62 62 "test": "vitest run", 63 - "typecheck": "tsc --noEmit" 63 + "typecheck": "tsc --noEmit", 64 + "typecheck:next": "tsc --noEmit && uv run mypy src/ts-python/__snapshots__" 64 65 }, 65 66 "dependencies": { 66 67 "@hey-api/codegen-core": "workspace:*",
+1 -1
packages/openapi-python/src/createClient.ts
··· 21 21 import { postProcessors } from './config/output/postprocess'; 22 22 import type { Config } from './config/types'; 23 23 import { generateOutput } from './generate/output'; 24 - // import { TypeScriptRenderer } from './ts-dsl'; 24 + // import { TypeScriptRenderer } from './py-dsl'; 25 25 26 26 export async function createClient({ 27 27 config,
+1
packages/openapi-python/src/plugins/@hey-api/sdk/v1/plugin.ts
··· 2 2 3 3 export const handlerV1: HeyApiSdkPlugin['Handler'] = ({ plugin }) => { 4 4 console.log(plugin); 5 + // plugin.node() 5 6 };
packages/openapi-python/src/py-dsl/index.ts

This is a binary file and will not be displayed.

packages/openapi-python/src/ts-python/__snapshots__/__init__.py

This is a binary file and will not be displayed.

packages/openapi-python/src/ts-python/__snapshots__/nodes/__init__.py

This is a binary file and will not be displayed.

packages/openapi-python/src/ts-python/__snapshots__/nodes/declarations/__init__.py

This is a binary file and will not be displayed.

packages/openapi-python/src/ts-python/__snapshots__/nodes/declarations/class/__init__.py

This is a binary file and will not be displayed.

+2
packages/openapi-python/src/ts-python/__snapshots__/nodes/declarations/class/default.py
··· 1 + class MyClass: 2 + pass
+10
packages/openapi-python/src/ts-python/__snapshots__/nodes/declarations/class/with-decorators.py
··· 1 + def my_decorator(func): 2 + return func 3 + 4 + def another_decorator(func): 5 + return func 6 + 7 + @my_decorator 8 + @another_decorator 9 + class MyClass: 10 + pass
+4
packages/openapi-python/src/ts-python/__snapshots__/nodes/declarations/class/with-docstring.py
··· 1 + class MyClass: 2 + """This is a class docstring""" 3 + 4 + pass
+5
packages/openapi-python/src/ts-python/__snapshots__/nodes/declarations/class/with-extends.py
··· 1 + class BaseClass: 2 + pass 3 + 4 + class MyClass(BaseClass): 5 + pass
+5
packages/openapi-python/src/ts-python/__snapshots__/nodes/declarations/class/with-method-docstring.py
··· 1 + class MyClass: 2 + def greet(): 3 + """Greets the user.""" 4 + 5 + pass
+3
packages/openapi-python/src/ts-python/__snapshots__/nodes/declarations/class/with-method.py
··· 1 + class MyClass: 2 + def foo(): 3 + return 42
packages/openapi-python/src/ts-python/__snapshots__/nodes/declarations/function/__init__.py

This is a binary file and will not be displayed.

+2
packages/openapi-python/src/ts-python/__snapshots__/nodes/declarations/function/default.py
··· 1 + def greet(): 2 + pass
+3
packages/openapi-python/src/ts-python/__snapshots__/nodes/declarations/function/with-annotations-defaults-return.py
··· 1 + def greet(name: str = "World", times: int = 1) -> None: 2 + for i in range(times): 3 + print("Hello, " + name)
+2
packages/openapi-python/src/ts-python/__snapshots__/nodes/declarations/function/with-body.py
··· 1 + def greet(name): 2 + print(name)
+10
packages/openapi-python/src/ts-python/__snapshots__/nodes/declarations/function/with-decorators.py
··· 1 + def my_decorator(func): 2 + return func 3 + 4 + def another_decorator(func): 5 + return func 6 + 7 + @my_decorator 8 + @another_decorator 9 + def greet(): 10 + pass
+4
packages/openapi-python/src/ts-python/__snapshots__/nodes/declarations/function/with-docstring.py
··· 1 + def greet(): 2 + """This function prints a greeting.""" 3 + 4 + print("Hello")
packages/openapi-python/src/ts-python/__snapshots__/nodes/expressions/__init__.py

This is a binary file and will not be displayed.

packages/openapi-python/src/ts-python/__snapshots__/nodes/expressions/await/__init__.py

This is a binary file and will not be displayed.

+5
packages/openapi-python/src/ts-python/__snapshots__/nodes/expressions/await/inside-function.py
··· 1 + def fetchData(): 2 + pass 3 + 4 + async def main(): 5 + await fetchData()
packages/openapi-python/src/ts-python/__snapshots__/nodes/expressions/binary/__init__.py

This is a binary file and will not be displayed.

+3
packages/openapi-python/src/ts-python/__snapshots__/nodes/expressions/binary/add.py
··· 1 + a = 42 2 + b = 84 3 + z = a + b
+3
packages/openapi-python/src/ts-python/__snapshots__/nodes/expressions/binary/subtract.py
··· 1 + a = 42 2 + b = 84 3 + z = a - b
packages/openapi-python/src/ts-python/__snapshots__/nodes/expressions/call/__init__.py

This is a binary file and will not be displayed.

+1
packages/openapi-python/src/ts-python/__snapshots__/nodes/expressions/call/call.py
··· 1 + print("hi")
packages/openapi-python/src/ts-python/__snapshots__/nodes/expressions/comprehensions/__init__.py

This is a binary file and will not be displayed.

packages/openapi-python/src/ts-python/__snapshots__/nodes/expressions/comprehensions/dict/__init__.py

This is a binary file and will not be displayed.

+3
packages/openapi-python/src/ts-python/__snapshots__/nodes/expressions/comprehensions/dict/dict.py
··· 1 + async def foo(): 2 + items = {"key1": "value1", "key2": "value2"} 3 + {k: v async for (k, v) in items.items() if k % 2}
packages/openapi-python/src/ts-python/__snapshots__/nodes/expressions/comprehensions/list/__init__.py

This is a binary file and will not be displayed.

+3
packages/openapi-python/src/ts-python/__snapshots__/nodes/expressions/comprehensions/list/list.py
··· 1 + async def foo(): 2 + items = [1, 2, 3] 3 + evens = [x async for x in items if x % 2 == 0]
packages/openapi-python/src/ts-python/__snapshots__/nodes/expressions/comprehensions/nested/__init__.py

This is a binary file and will not be displayed.

+1
packages/openapi-python/src/ts-python/__snapshots__/nodes/expressions/comprehensions/nested/dict-list.py
··· 1 + data = {"numbers": [1, 2, 3], "nestedDict": {"foo": "bar"}}
packages/openapi-python/src/ts-python/__snapshots__/nodes/expressions/comprehensions/set/__init__.py

This is a binary file and will not be displayed.

+3
packages/openapi-python/src/ts-python/__snapshots__/nodes/expressions/comprehensions/set/dict.py
··· 1 + async def foo(): 2 + items = [1, 2, 3] 3 + unique_evens = {x for x in items if x % 2}
packages/openapi-python/src/ts-python/__snapshots__/nodes/expressions/dict/__init__.py

This is a binary file and will not be displayed.

+1
packages/openapi-python/src/ts-python/__snapshots__/nodes/expressions/dict/dict.py
··· 1 + person = {"name": "Alice", "age": 30}
packages/openapi-python/src/ts-python/__snapshots__/nodes/expressions/fString/__init__.py

This is a binary file and will not be displayed.

+3
packages/openapi-python/src/ts-python/__snapshots__/nodes/expressions/fString/multiple-expressions.py
··· 1 + a = 1 2 + b = 2 3 + print(f"Sum: {a + b}")
+2
packages/openapi-python/src/ts-python/__snapshots__/nodes/expressions/fString/simple-interpolation.py
··· 1 + name = "Joe" 2 + print(f"Hello, {name}!")
packages/openapi-python/src/ts-python/__snapshots__/nodes/expressions/generator/__init__.py

This is a binary file and will not be displayed.

+2
packages/openapi-python/src/ts-python/__snapshots__/nodes/expressions/generator/async.py
··· 1 + x_iter = [1, 2, 3] 2 + (x async for x in x_iter)
+2
packages/openapi-python/src/ts-python/__snapshots__/nodes/expressions/generator/simple.py
··· 1 + x_iter = [1, 2, 3] 2 + (x for x in x_iter)
+2
packages/openapi-python/src/ts-python/__snapshots__/nodes/expressions/generator/with-filter.py
··· 1 + x_iter = [1, 2, 3] 2 + (x for x in x_iter if x > 10)
packages/openapi-python/src/ts-python/__snapshots__/nodes/expressions/identifier/__init__.py

This is a binary file and will not be displayed.

+2
packages/openapi-python/src/ts-python/__snapshots__/nodes/expressions/identifier/identifier.py
··· 1 + y = 42 2 + x = y
packages/openapi-python/src/ts-python/__snapshots__/nodes/expressions/lambda/__init__.py

This is a binary file and will not be displayed.

+2
packages/openapi-python/src/ts-python/__snapshots__/nodes/expressions/lambda/simple.py
··· 1 + x = 5 2 + lambda : x + 1
+1
packages/openapi-python/src/ts-python/__snapshots__/nodes/expressions/lambda/with-params-and-default.py
··· 1 + lambda x, y = 10: x * y
packages/openapi-python/src/ts-python/__snapshots__/nodes/expressions/list/__init__.py

This is a binary file and will not be displayed.

+1
packages/openapi-python/src/ts-python/__snapshots__/nodes/expressions/list/list.py
··· 1 + nums = [1, 2, 3]
packages/openapi-python/src/ts-python/__snapshots__/nodes/expressions/literal/__init__.py

This is a binary file and will not be displayed.

+4
packages/openapi-python/src/ts-python/__snapshots__/nodes/expressions/literal/primitive.py
··· 1 + s = "hello" 2 + n = 123 3 + b = True 4 + none = None
packages/openapi-python/src/ts-python/__snapshots__/nodes/expressions/set/__init__.py

This is a binary file and will not be displayed.

+4
packages/openapi-python/src/ts-python/__snapshots__/nodes/expressions/set/set.py
··· 1 + foo = "bar" 2 + emptySet = set() 3 + numberSet = {1, 2, 3} 4 + mixedSet = {"a", True, foo}
packages/openapi-python/src/ts-python/__snapshots__/nodes/expressions/tuple/__init__.py

This is a binary file and will not be displayed.

+2
packages/openapi-python/src/ts-python/__snapshots__/nodes/expressions/tuple/tuple.py
··· 1 + t = (1, 2, 3) 2 + single = (42,)
packages/openapi-python/src/ts-python/__snapshots__/nodes/expressions/yield/__init__.py

This is a binary file and will not be displayed.

+2
packages/openapi-python/src/ts-python/__snapshots__/nodes/expressions/yield/default.py
··· 1 + def gen(): 2 + yield
+4
packages/openapi-python/src/ts-python/__snapshots__/nodes/expressions/yield/from-iterable.py
··· 1 + iterable = [1, 2, 3] 2 + 3 + def gen(): 4 + yield from iterable
+2
packages/openapi-python/src/ts-python/__snapshots__/nodes/expressions/yield/with-value.py
··· 1 + def gen(): 2 + yield 42
packages/openapi-python/src/ts-python/__snapshots__/nodes/statements/__init__.py

This is a binary file and will not be displayed.

packages/openapi-python/src/ts-python/__snapshots__/nodes/statements/assignment/__init__.py

This is a binary file and will not be displayed.

+1
packages/openapi-python/src/ts-python/__snapshots__/nodes/statements/assignment/primitive.py
··· 1 + foo = 42
packages/openapi-python/src/ts-python/__snapshots__/nodes/statements/augmentedAssignment/__init__.py

This is a binary file and will not be displayed.

+12
packages/openapi-python/src/ts-python/__snapshots__/nodes/statements/augmentedAssignment/arithmetic.py
··· 1 + x = 0 2 + y = 0 3 + z = 0 4 + a = 0 5 + b = 0 6 + c = 0 7 + x += 1 8 + y -= 2 9 + z *= 3 10 + a /= 4 11 + b //= 5 12 + c %= 6
+12
packages/openapi-python/src/ts-python/__snapshots__/nodes/statements/augmentedAssignment/bitwise.py
··· 1 + x = 1 2 + y = 1 3 + z = 1 4 + a = 1 5 + b = 1 6 + c = 1 7 + x **= 2 8 + y &= 1 9 + z |= 1 10 + a ^= 1 11 + b >>= 1 12 + c <<= 1
packages/openapi-python/src/ts-python/__snapshots__/nodes/statements/block/__init__.py

This is a binary file and will not be displayed.

+2
packages/openapi-python/src/ts-python/__snapshots__/nodes/statements/block/function.py
··· 1 + def main(): 2 + print("inside")
packages/openapi-python/src/ts-python/__snapshots__/nodes/statements/break/__init__.py

This is a binary file and will not be displayed.

+2
packages/openapi-python/src/ts-python/__snapshots__/nodes/statements/break/while.py
··· 1 + while True: 2 + break
packages/openapi-python/src/ts-python/__snapshots__/nodes/statements/continue/__init__.py

This is a binary file and will not be displayed.

+2
packages/openapi-python/src/ts-python/__snapshots__/nodes/statements/continue/while.py
··· 1 + while True: 2 + continue
packages/openapi-python/src/ts-python/__snapshots__/nodes/statements/expression/__init__.py

This is a binary file and will not be displayed.

+1
packages/openapi-python/src/ts-python/__snapshots__/nodes/statements/expression/simple.py
··· 1 + print("hello")
packages/openapi-python/src/ts-python/__snapshots__/nodes/statements/for/__init__.py

This is a binary file and will not be displayed.

+5
packages/openapi-python/src/ts-python/__snapshots__/nodes/statements/for/for-else.py
··· 1 + items = [1, 2, 3] 2 + for x in items: 3 + pass 4 + else: 5 + print("done")
+2
packages/openapi-python/src/ts-python/__snapshots__/nodes/statements/for/for.py
··· 1 + for i in range(3): 2 + print(i)
packages/openapi-python/src/ts-python/__snapshots__/nodes/statements/if/__init__.py

This is a binary file and will not be displayed.

+5
packages/openapi-python/src/ts-python/__snapshots__/nodes/statements/if/if-else.py
··· 1 + x = 0 2 + if x > 0: 3 + print("positive") 4 + else: 5 + print("non-positive")
+2
packages/openapi-python/src/ts-python/__snapshots__/nodes/statements/if/if.py
··· 1 + if True: 2 + print("positive")
packages/openapi-python/src/ts-python/__snapshots__/nodes/statements/import/__init__.py

This is a binary file and will not be displayed.

+1
packages/openapi-python/src/ts-python/__snapshots__/nodes/statements/import/from-with-alias.py
··· 1 + from os import environ as env
+1
packages/openapi-python/src/ts-python/__snapshots__/nodes/statements/import/from-with-asterisk.py
··· 1 + from collections import *
+1
packages/openapi-python/src/ts-python/__snapshots__/nodes/statements/import/from-with-name-alias.py
··· 1 + from os import path, environ as env
+1
packages/openapi-python/src/ts-python/__snapshots__/nodes/statements/import/from-with-name.py
··· 1 + from sys import argv
+1
packages/openapi-python/src/ts-python/__snapshots__/nodes/statements/import/module-with-alias.py
··· 1 + import json as js
+2
packages/openapi-python/src/ts-python/__snapshots__/nodes/statements/import/module.py
··· 1 + import math 2 + import loads
packages/openapi-python/src/ts-python/__snapshots__/nodes/statements/raise/__init__.py

This is a binary file and will not be displayed.

+1
packages/openapi-python/src/ts-python/__snapshots__/nodes/statements/raise/reraise.py
··· 1 + raise
+1
packages/openapi-python/src/ts-python/__snapshots__/nodes/statements/raise/with-exception.py
··· 1 + raise ValueError("Invalid input")
packages/openapi-python/src/ts-python/__snapshots__/nodes/statements/return/__init__.py

This is a binary file and will not be displayed.

+2
packages/openapi-python/src/ts-python/__snapshots__/nodes/statements/return/function.py
··· 1 + def get_message(): 2 + return "hi"
packages/openapi-python/src/ts-python/__snapshots__/nodes/statements/try/__init__.py

This is a binary file and will not be displayed.

+11
packages/openapi-python/src/ts-python/__snapshots__/nodes/statements/try/with-except-else-finally.py
··· 1 + def dangerous_func(): 2 + pass 3 + 4 + try: 5 + dangerous_func() 6 + except Exception as e: 7 + print(e) 8 + else: 9 + pass 10 + finally: 11 + pass
+9
packages/openapi-python/src/ts-python/__snapshots__/nodes/statements/try/with-except-else.py
··· 1 + def dangerous_func(): 2 + pass 3 + 4 + try: 5 + dangerous_func() 6 + except: 7 + pass 8 + else: 9 + pass
+9
packages/openapi-python/src/ts-python/__snapshots__/nodes/statements/try/with-except-finally.py
··· 1 + def dangerous_func(): 2 + pass 3 + 4 + try: 5 + dangerous_func() 6 + except Exception: 7 + pass 8 + finally: 9 + pass
+7
packages/openapi-python/src/ts-python/__snapshots__/nodes/statements/try/with-except.py
··· 1 + def dangerous_func(): 2 + pass 3 + 4 + try: 5 + dangerous_func() 6 + except ValueError as e: 7 + print(e)
+7
packages/openapi-python/src/ts-python/__snapshots__/nodes/statements/try/with-finally.py
··· 1 + def dangerous_func(): 2 + pass 3 + 4 + try: 5 + dangerous_func() 6 + finally: 7 + pass
packages/openapi-python/src/ts-python/__snapshots__/nodes/statements/while/__init__.py

This is a binary file and will not be displayed.

+6
packages/openapi-python/src/ts-python/__snapshots__/nodes/statements/while/while-else.py
··· 1 + def should_continue(): 2 + return False 3 + while should_continue(): 4 + pass 5 + else: 6 + print("done")
+4
packages/openapi-python/src/ts-python/__snapshots__/nodes/statements/while/while.py
··· 1 + x = 3 2 + while x > 0: 3 + print(x) 4 + x = x - 1
packages/openapi-python/src/ts-python/__snapshots__/nodes/statements/with/__init__.py

This is a binary file and will not be displayed.

+8
packages/openapi-python/src/ts-python/__snapshots__/nodes/statements/with/with-alias.py
··· 1 + class context_manager: 2 + def __enter__(self): 3 + return self 4 + def __exit__(self, exc_type, exc_val, exc_tb): 5 + return False 6 + 7 + with context_manager() as alias: 8 + pass
+9
packages/openapi-python/src/ts-python/__snapshots__/nodes/statements/with/with-async.py
··· 1 + class context_manager: 2 + def __enter__(self): 3 + return self 4 + def __exit__(self, exc_type, exc_val, exc_tb): 5 + return False 6 + 7 + async def foo(): 8 + async with context_manager(): 9 + pass
+20
packages/openapi-python/src/ts-python/__snapshots__/nodes/statements/with/with-many-items.py
··· 1 + class context_manager: 2 + def __enter__(self): 3 + return self 4 + def __exit__(self, exc_type, exc_val, exc_tb): 5 + return False 6 + 7 + class context_manager2: 8 + def __enter__(self): 9 + return self 10 + def __exit__(self, exc_type, exc_val, exc_tb): 11 + return False 12 + 13 + class context_manager3: 14 + def __enter__(self): 15 + return self 16 + def __exit__(self, exc_type, exc_val, exc_tb): 17 + return False 18 + 19 + with context_manager() as alias, context_manager2() as (a, b), context_manager3(): 20 + pass
+8
packages/openapi-python/src/ts-python/__snapshots__/nodes/statements/with/with-tuple-alias.py
··· 1 + class context_manager: 2 + def __enter__(self): 3 + return self 4 + def __exit__(self, exc_type, exc_val, exc_tb): 5 + return False 6 + 7 + with context_manager() as (a, b): 8 + pass
+8
packages/openapi-python/src/ts-python/__snapshots__/nodes/statements/with/with.py
··· 1 + class context_manager: 2 + def __enter__(self): 3 + return self 4 + def __exit__(self, exc_type, exc_val, exc_tb): 5 + return False 6 + 7 + with context_manager(): 8 + pass
packages/openapi-python/src/ts-python/__snapshots__/nodes/structure/__init__.py

This is a binary file and will not be displayed.

packages/openapi-python/src/ts-python/__snapshots__/nodes/structure/comment/__init__.py

This is a binary file and will not be displayed.

+1
packages/openapi-python/src/ts-python/__snapshots__/nodes/structure/comment/simple.py
··· 1 + # This is a comment
packages/openapi-python/src/ts-python/__snapshots__/nodes/structure/sourceFile/__init__.py

This is a binary file and will not be displayed.

+2
packages/openapi-python/src/ts-python/__snapshots__/nodes/structure/sourceFile/simple.py
··· 1 + a = 1 2 + b = 2
+3
packages/openapi-python/src/ts-python/__snapshots__/nodes/structure/sourceFile/with-docstring.py
··· 1 + """This is a module-level docstring.""" 2 + 3 + foo = 1
+4
packages/openapi-python/src/ts-python/__tests__/constants.ts
··· 1 + import path from 'node:path'; 2 + 3 + export const snapshotsDir = path.join(__dirname, '..', '__snapshots__'); 4 + export const tmpDir = path.join(__dirname, '..', '.tmp');
+7
packages/openapi-python/src/ts-python/__tests__/globalTeardown.ts
··· 1 + import fs from 'node:fs'; 2 + 3 + import { tmpDir } from './constants'; 4 + 5 + export function teardown() { 6 + fs.rmSync(tmpDir, { force: true, recursive: true }); 7 + }
+90
packages/openapi-python/src/ts-python/__tests__/nodes/declarations/class.test.ts
··· 1 + import { describe, it } from 'vitest'; 2 + 3 + import { py } from '../../../index'; 4 + import { assertPrintedMatchesSnapshot } from '../utils'; 5 + 6 + describe('class declaration', () => { 7 + it('default', async () => { 8 + const file = py.factory.createSourceFile([py.factory.createClassDeclaration('MyClass', [])]); 9 + await assertPrintedMatchesSnapshot(file, 'default.py'); 10 + }); 11 + 12 + it('with docstring', async () => { 13 + const node = py.factory.createSourceFile([ 14 + py.factory.createClassDeclaration( 15 + 'MyClass', 16 + [], 17 + undefined, 18 + undefined, 19 + 'This is a class docstring', 20 + ), 21 + ]); 22 + await assertPrintedMatchesSnapshot(node, 'with-docstring.py'); 23 + }); 24 + 25 + it('with base class', async () => { 26 + const node = py.factory.createSourceFile([ 27 + py.factory.createClassDeclaration('BaseClass', []), 28 + py.factory.createEmptyStatement(), 29 + py.factory.createClassDeclaration('MyClass', [], undefined, [ 30 + py.factory.createIdentifier('BaseClass'), 31 + ]), 32 + ]); 33 + await assertPrintedMatchesSnapshot(node, 'with-extends.py'); 34 + }); 35 + 36 + it('with method', async () => { 37 + const node = py.factory.createSourceFile([ 38 + py.factory.createClassDeclaration('MyClass', [ 39 + py.factory.createFunctionDeclaration('foo', [], undefined, [ 40 + py.factory.createReturnStatement(py.factory.createLiteral(42)), 41 + ]), 42 + ]), 43 + ]); 44 + await assertPrintedMatchesSnapshot(node, 'with-method.py'); 45 + }); 46 + 47 + it('with decorators', async () => { 48 + const file = py.factory.createSourceFile([ 49 + py.factory.createFunctionDeclaration( 50 + 'my_decorator', 51 + [py.factory.createFunctionParameter('func')], 52 + undefined, 53 + [py.factory.createReturnStatement(py.factory.createIdentifier('func'))], 54 + ), 55 + py.factory.createEmptyStatement(), 56 + py.factory.createFunctionDeclaration( 57 + 'another_decorator', 58 + [py.factory.createFunctionParameter('func')], 59 + undefined, 60 + [py.factory.createReturnStatement(py.factory.createIdentifier('func'))], 61 + ), 62 + py.factory.createEmptyStatement(), 63 + py.factory.createClassDeclaration( 64 + 'MyClass', 65 + [], 66 + [ 67 + py.factory.createIdentifier('my_decorator'), 68 + py.factory.createIdentifier('another_decorator'), 69 + ], 70 + ), 71 + ]); 72 + await assertPrintedMatchesSnapshot(file, 'with-decorators.py'); 73 + }); 74 + 75 + it('with method docstring', async () => { 76 + const file = py.factory.createSourceFile([ 77 + py.factory.createClassDeclaration('MyClass', [ 78 + py.factory.createFunctionDeclaration( 79 + 'greet', 80 + [], 81 + undefined, 82 + [], 83 + undefined, 84 + 'Greets the user.', 85 + ), 86 + ]), 87 + ]); 88 + await assertPrintedMatchesSnapshot(file, 'with-method-docstring.py'); 89 + }); 90 + });
+122
packages/openapi-python/src/ts-python/__tests__/nodes/declarations/function.test.ts
··· 1 + import { describe, it } from 'vitest'; 2 + 3 + import { py } from '../../../index'; 4 + import { assertPrintedMatchesSnapshot } from '../utils'; 5 + 6 + describe('function declaration', () => { 7 + it('default', async () => { 8 + const file = py.factory.createSourceFile([ 9 + py.factory.createFunctionDeclaration('greet', [], undefined, []), 10 + ]); 11 + await assertPrintedMatchesSnapshot(file, 'default.py'); 12 + }); 13 + 14 + it('with docstring', async () => { 15 + const node = py.factory.createSourceFile([ 16 + py.factory.createFunctionDeclaration( 17 + 'greet', 18 + [], 19 + undefined, 20 + [ 21 + py.factory.createExpressionStatement( 22 + py.factory.createCallExpression(py.factory.createIdentifier('print'), [ 23 + py.factory.createLiteral('Hello'), 24 + ]), 25 + ), 26 + ], 27 + undefined, 28 + 'This function prints a greeting.', 29 + ), 30 + ]); 31 + await assertPrintedMatchesSnapshot(node, 'with-docstring.py'); 32 + }); 33 + 34 + it('with body', async () => { 35 + const file = py.factory.createSourceFile([ 36 + py.factory.createFunctionDeclaration( 37 + 'greet', 38 + [py.factory.createFunctionParameter('name')], 39 + undefined, 40 + [ 41 + py.factory.createExpressionStatement( 42 + py.factory.createCallExpression(py.factory.createIdentifier('print'), [ 43 + py.factory.createIdentifier('name'), 44 + ]), 45 + ), 46 + ], 47 + ), 48 + ]); 49 + await assertPrintedMatchesSnapshot(file, 'with-body.py'); 50 + }); 51 + 52 + it('with decorators', async () => { 53 + const file = py.factory.createSourceFile([ 54 + py.factory.createFunctionDeclaration( 55 + 'my_decorator', 56 + [py.factory.createFunctionParameter('func')], 57 + undefined, 58 + [py.factory.createReturnStatement(py.factory.createIdentifier('func'))], 59 + ), 60 + py.factory.createEmptyStatement(), 61 + py.factory.createFunctionDeclaration( 62 + 'another_decorator', 63 + [py.factory.createFunctionParameter('func')], 64 + undefined, 65 + [py.factory.createReturnStatement(py.factory.createIdentifier('func'))], 66 + ), 67 + py.factory.createEmptyStatement(), 68 + py.factory.createFunctionDeclaration( 69 + 'greet', 70 + [], 71 + undefined, 72 + [], 73 + [ 74 + py.factory.createIdentifier('my_decorator'), 75 + py.factory.createIdentifier('another_decorator'), 76 + ], 77 + ), 78 + ]); 79 + await assertPrintedMatchesSnapshot(file, 'with-decorators.py'); 80 + }); 81 + 82 + it('with parameter annotations, defaults, and return type', async () => { 83 + const file = py.factory.createSourceFile([ 84 + py.factory.createFunctionDeclaration( 85 + 'greet', 86 + [ 87 + py.factory.createFunctionParameter( 88 + 'name', 89 + py.factory.createIdentifier('str'), 90 + py.factory.createLiteral('World'), 91 + ), 92 + py.factory.createFunctionParameter( 93 + 'times', 94 + py.factory.createIdentifier('int'), 95 + py.factory.createLiteral(1), 96 + ), 97 + ], 98 + py.factory.createIdentifier('None'), // returnType 99 + [ 100 + py.factory.createForStatement( 101 + py.factory.createIdentifier('i'), 102 + py.factory.createCallExpression(py.factory.createIdentifier('range'), [ 103 + py.factory.createIdentifier('times'), 104 + ]), 105 + [ 106 + py.factory.createExpressionStatement( 107 + py.factory.createCallExpression(py.factory.createIdentifier('print'), [ 108 + py.factory.createBinaryExpression( 109 + py.factory.createLiteral('Hello, '), 110 + '+', 111 + py.factory.createIdentifier('name'), 112 + ), 113 + ]), 114 + ), 115 + ], 116 + ), 117 + ], 118 + ), 119 + ]); 120 + await assertPrintedMatchesSnapshot(file, 'with-annotations-defaults-return.py'); 121 + }); 122 + });
+29
packages/openapi-python/src/ts-python/__tests__/nodes/expressions/await.test.ts
··· 1 + import { describe, it } from 'vitest'; 2 + 3 + import { py } from '../../../index'; 4 + import { assertPrintedMatchesSnapshot } from '../utils'; 5 + 6 + describe('await expression', () => { 7 + it('inside async function', async () => { 8 + const file = py.factory.createSourceFile([ 9 + py.factory.createFunctionDeclaration('fetchData', [], undefined, []), 10 + py.factory.createEmptyStatement(), 11 + py.factory.createFunctionDeclaration( 12 + 'main', 13 + [], 14 + undefined, 15 + [ 16 + py.factory.createExpressionStatement( 17 + py.factory.createAwaitExpression( 18 + py.factory.createCallExpression(py.factory.createIdentifier('fetchData'), []), 19 + ), 20 + ), 21 + ], 22 + undefined, 23 + undefined, 24 + [py.factory.createIdentifier('async')], 25 + ), 26 + ]); 27 + await assertPrintedMatchesSnapshot(file, 'inside-function.py'); 28 + }); 29 + });
+38
packages/openapi-python/src/ts-python/__tests__/nodes/expressions/binary.test.ts
··· 1 + import { describe, it } from 'vitest'; 2 + 3 + import { py } from '../../../index'; 4 + import { assertPrintedMatchesSnapshot } from '../utils'; 5 + 6 + describe('binary expression', () => { 7 + it('add', async () => { 8 + const file = py.factory.createSourceFile([ 9 + py.factory.createAssignment(py.factory.createIdentifier('a'), py.factory.createLiteral(42)), 10 + py.factory.createAssignment(py.factory.createIdentifier('b'), py.factory.createLiteral(84)), 11 + py.factory.createAssignment( 12 + py.factory.createIdentifier('z'), 13 + py.factory.createBinaryExpression( 14 + py.factory.createIdentifier('a'), 15 + '+', 16 + py.factory.createIdentifier('b'), 17 + ), 18 + ), 19 + ]); 20 + await assertPrintedMatchesSnapshot(file, 'add.py'); 21 + }); 22 + 23 + it('subtract', async () => { 24 + const file = py.factory.createSourceFile([ 25 + py.factory.createAssignment(py.factory.createIdentifier('a'), py.factory.createLiteral(42)), 26 + py.factory.createAssignment(py.factory.createIdentifier('b'), py.factory.createLiteral(84)), 27 + py.factory.createAssignment( 28 + py.factory.createIdentifier('z'), 29 + py.factory.createBinaryExpression( 30 + py.factory.createIdentifier('a'), 31 + '-', 32 + py.factory.createIdentifier('b'), 33 + ), 34 + ), 35 + ]); 36 + await assertPrintedMatchesSnapshot(file, 'subtract.py'); 37 + }); 38 + });
+15
packages/openapi-python/src/ts-python/__tests__/nodes/expressions/call.test.ts
··· 1 + import { describe, it } from 'vitest'; 2 + 3 + import { py } from '../../../index'; 4 + import { assertPrintedMatchesSnapshot } from '../utils'; 5 + 6 + describe('call expression', () => { 7 + it('print', async () => { 8 + const file = py.factory.createSourceFile([ 9 + py.factory.createCallExpression(py.factory.createIdentifier('print'), [ 10 + py.factory.createLiteral('hi'), 11 + ]), 12 + ]); 13 + await assertPrintedMatchesSnapshot(file, 'call.py'); 14 + }); 15 + });
+60
packages/openapi-python/src/ts-python/__tests__/nodes/expressions/comprehensions/dict.test.ts
··· 1 + import { describe, it } from 'vitest'; 2 + 3 + import { py } from '../../../../index'; 4 + import { assertPrintedMatchesSnapshot } from '../../utils'; 5 + 6 + describe('dict comprehension', () => { 7 + it('assignment', async () => { 8 + const file = py.factory.createSourceFile([ 9 + py.factory.createFunctionDeclaration( 10 + 'foo', 11 + [], 12 + undefined, 13 + [ 14 + py.factory.createAssignment( 15 + py.factory.createIdentifier('items'), 16 + py.factory.createDictExpression([ 17 + { 18 + key: py.factory.createLiteral('key1'), 19 + value: py.factory.createLiteral('value1'), 20 + }, 21 + { 22 + key: py.factory.createLiteral('key2'), 23 + value: py.factory.createLiteral('value2'), 24 + }, 25 + ]), 26 + ), 27 + py.factory.createExpressionStatement( 28 + py.factory.createDictComprehension( 29 + py.factory.createIdentifier('k'), 30 + py.factory.createIdentifier('v'), 31 + py.factory.createTupleExpression([ 32 + py.factory.createIdentifier('k'), 33 + py.factory.createIdentifier('v'), 34 + ]), 35 + py.factory.createCallExpression( 36 + py.factory.createMemberExpression( 37 + py.factory.createIdentifier('items'), 38 + py.factory.createIdentifier('items'), 39 + ), 40 + [], 41 + ), 42 + [ 43 + py.factory.createBinaryExpression( 44 + py.factory.createIdentifier('k'), 45 + '%', 46 + py.factory.createLiteral(2), 47 + ), 48 + ], 49 + true, 50 + ), 51 + ), 52 + ], 53 + undefined, 54 + undefined, 55 + [py.factory.createIdentifier('async')], 56 + ), 57 + ]); 58 + await assertPrintedMatchesSnapshot(file, 'dict.py'); 59 + }); 60 + });
+50
packages/openapi-python/src/ts-python/__tests__/nodes/expressions/comprehensions/list.test.ts
··· 1 + import { describe, it } from 'vitest'; 2 + 3 + import { py } from '../../../../index'; 4 + import { assertPrintedMatchesSnapshot } from '../../utils'; 5 + 6 + describe('list comprehension', () => { 7 + it('assignment', async () => { 8 + const file = py.factory.createSourceFile([ 9 + py.factory.createFunctionDeclaration( 10 + 'foo', 11 + [], 12 + undefined, 13 + [ 14 + py.factory.createAssignment( 15 + py.factory.createIdentifier('items'), 16 + py.factory.createListExpression([ 17 + py.factory.createLiteral(1), 18 + py.factory.createLiteral(2), 19 + py.factory.createLiteral(3), 20 + ]), 21 + ), 22 + py.factory.createAssignment( 23 + py.factory.createIdentifier('evens'), 24 + py.factory.createListComprehension( 25 + py.factory.createIdentifier('x'), 26 + py.factory.createIdentifier('x'), 27 + py.factory.createIdentifier('items'), 28 + [ 29 + py.factory.createBinaryExpression( 30 + py.factory.createBinaryExpression( 31 + py.factory.createIdentifier('x'), 32 + '%', 33 + py.factory.createLiteral(2), 34 + ), 35 + '==', 36 + py.factory.createLiteral(0), 37 + ), 38 + ], 39 + true, 40 + ), 41 + ), 42 + ], 43 + undefined, 44 + undefined, 45 + [py.factory.createIdentifier('async')], 46 + ), 47 + ]); 48 + await assertPrintedMatchesSnapshot(file, 'list.py'); 49 + }); 50 + });
+34
packages/openapi-python/src/ts-python/__tests__/nodes/expressions/comprehensions/nested.test.ts
··· 1 + import { describe, it } from 'vitest'; 2 + 3 + import { py } from '../../../../index'; 4 + import { assertPrintedMatchesSnapshot } from '../../utils'; 5 + 6 + describe('nested comprehension', () => { 7 + it('dict and list', async () => { 8 + const file = py.factory.createSourceFile([ 9 + py.factory.createAssignment( 10 + py.factory.createIdentifier('data'), 11 + py.factory.createDictExpression([ 12 + { 13 + key: py.factory.createLiteral('numbers'), 14 + value: py.factory.createListExpression([ 15 + py.factory.createLiteral(1), 16 + py.factory.createLiteral(2), 17 + py.factory.createLiteral(3), 18 + ]), 19 + }, 20 + { 21 + key: py.factory.createLiteral('nestedDict'), 22 + value: py.factory.createDictExpression([ 23 + { 24 + key: py.factory.createLiteral('foo'), 25 + value: py.factory.createLiteral('bar'), 26 + }, 27 + ]), 28 + }, 29 + ]), 30 + ), 31 + ]); 32 + await assertPrintedMatchesSnapshot(file, 'dict-list.py'); 33 + }); 34 + });
+45
packages/openapi-python/src/ts-python/__tests__/nodes/expressions/comprehensions/set.test.ts
··· 1 + import { describe, it } from 'vitest'; 2 + 3 + import { py } from '../../../../index'; 4 + import { assertPrintedMatchesSnapshot } from '../../utils'; 5 + 6 + describe('set comprehension', () => { 7 + it('assignment', async () => { 8 + const file = py.factory.createSourceFile([ 9 + py.factory.createFunctionDeclaration( 10 + 'foo', 11 + [], 12 + undefined, 13 + [ 14 + py.factory.createAssignment( 15 + py.factory.createIdentifier('items'), 16 + py.factory.createListExpression([ 17 + py.factory.createLiteral(1), 18 + py.factory.createLiteral(2), 19 + py.factory.createLiteral(3), 20 + ]), 21 + ), 22 + py.factory.createAssignment( 23 + py.factory.createIdentifier('unique_evens'), 24 + py.factory.createSetComprehension( 25 + py.factory.createIdentifier('x'), 26 + py.factory.createIdentifier('x'), 27 + py.factory.createIdentifier('items'), 28 + [ 29 + py.factory.createBinaryExpression( 30 + py.factory.createIdentifier('x'), 31 + '%', 32 + py.factory.createLiteral(2), 33 + ), 34 + ], 35 + ), 36 + ), 37 + ], 38 + undefined, 39 + undefined, 40 + [py.factory.createIdentifier('async')], 41 + ), 42 + ]); 43 + await assertPrintedMatchesSnapshot(file, 'dict.py'); 44 + }); 45 + });
+25
packages/openapi-python/src/ts-python/__tests__/nodes/expressions/dict.test.ts
··· 1 + import { describe, it } from 'vitest'; 2 + 3 + import { py } from '../../../index'; 4 + import { assertPrintedMatchesSnapshot } from '../utils'; 5 + 6 + describe('dict expression', () => { 7 + it('assignment', async () => { 8 + const file = py.factory.createSourceFile([ 9 + py.factory.createAssignment( 10 + py.factory.createIdentifier('person'), 11 + py.factory.createDictExpression([ 12 + { 13 + key: py.factory.createLiteral('name'), 14 + value: py.factory.createLiteral('Alice'), 15 + }, 16 + { 17 + key: py.factory.createLiteral('age'), 18 + value: py.factory.createLiteral(30), 19 + }, 20 + ]), 21 + ), 22 + ]); 23 + await assertPrintedMatchesSnapshot(file, 'dict.py'); 24 + }); 25 + });
+41
packages/openapi-python/src/ts-python/__tests__/nodes/expressions/fString.test.ts
··· 1 + import { describe, it } from 'vitest'; 2 + 3 + import { py } from '../../../index'; 4 + import { assertPrintedMatchesSnapshot } from '../utils'; 5 + 6 + describe('f-string expression', () => { 7 + it('simple interpolation', async () => { 8 + const file = py.factory.createSourceFile([ 9 + py.factory.createAssignment( 10 + py.factory.createIdentifier('name'), 11 + py.factory.createLiteral('Joe'), 12 + ), 13 + py.factory.createExpressionStatement( 14 + py.factory.createCallExpression(py.factory.createIdentifier('print'), [ 15 + py.factory.createFStringExpression(['Hello, ', py.factory.createIdentifier('name'), '!']), 16 + ]), 17 + ), 18 + ]); 19 + await assertPrintedMatchesSnapshot(file, 'simple-interpolation.py'); 20 + }); 21 + 22 + it('with multiple expressions', async () => { 23 + const file = py.factory.createSourceFile([ 24 + py.factory.createAssignment(py.factory.createIdentifier('a'), py.factory.createLiteral(1)), 25 + py.factory.createAssignment(py.factory.createIdentifier('b'), py.factory.createLiteral(2)), 26 + py.factory.createExpressionStatement( 27 + py.factory.createCallExpression(py.factory.createIdentifier('print'), [ 28 + py.factory.createFStringExpression([ 29 + 'Sum: ', 30 + py.factory.createBinaryExpression( 31 + py.factory.createIdentifier('a'), 32 + '+', 33 + py.factory.createIdentifier('b'), 34 + ), 35 + ]), 36 + ]), 37 + ), 38 + ]); 39 + await assertPrintedMatchesSnapshot(file, 'multiple-expressions.py'); 40 + }); 41 + });
+78
packages/openapi-python/src/ts-python/__tests__/nodes/expressions/generator.test.ts
··· 1 + import { describe, it } from 'vitest'; 2 + 3 + import { py } from '../../../index'; 4 + import { assertPrintedMatchesSnapshot } from '../utils'; 5 + 6 + describe('generator expression', () => { 7 + it('simple', async () => { 8 + const file = py.factory.createSourceFile([ 9 + py.factory.createAssignment( 10 + py.factory.createIdentifier('x_iter'), 11 + py.factory.createListExpression([ 12 + py.factory.createLiteral(1), 13 + py.factory.createLiteral(2), 14 + py.factory.createLiteral(3), 15 + ]), 16 + ), 17 + py.factory.createExpressionStatement( 18 + py.factory.createGeneratorExpression( 19 + py.factory.createIdentifier('x'), 20 + py.factory.createIdentifier('x'), 21 + py.factory.createIdentifier('x_iter'), 22 + ), 23 + ), 24 + ]); 25 + await assertPrintedMatchesSnapshot(file, 'simple.py'); 26 + }); 27 + 28 + it('with filters', async () => { 29 + const file = py.factory.createSourceFile([ 30 + py.factory.createAssignment( 31 + py.factory.createIdentifier('x_iter'), 32 + py.factory.createListExpression([ 33 + py.factory.createLiteral(1), 34 + py.factory.createLiteral(2), 35 + py.factory.createLiteral(3), 36 + ]), 37 + ), 38 + py.factory.createExpressionStatement( 39 + py.factory.createGeneratorExpression( 40 + py.factory.createIdentifier('x'), 41 + py.factory.createIdentifier('x'), 42 + py.factory.createIdentifier('x_iter'), 43 + [ 44 + py.factory.createBinaryExpression( 45 + py.factory.createIdentifier('x'), 46 + '>', 47 + py.factory.createLiteral(10), 48 + ), 49 + ], 50 + ), 51 + ), 52 + ]); 53 + await assertPrintedMatchesSnapshot(file, 'with-filter.py'); 54 + }); 55 + 56 + it('async', async () => { 57 + const file = py.factory.createSourceFile([ 58 + py.factory.createAssignment( 59 + py.factory.createIdentifier('x_iter'), 60 + py.factory.createListExpression([ 61 + py.factory.createLiteral(1), 62 + py.factory.createLiteral(2), 63 + py.factory.createLiteral(3), 64 + ]), 65 + ), 66 + py.factory.createExpressionStatement( 67 + py.factory.createGeneratorExpression( 68 + py.factory.createIdentifier('x'), 69 + py.factory.createIdentifier('x'), 70 + py.factory.createIdentifier('x_iter'), 71 + undefined, 72 + true, 73 + ), 74 + ), 75 + ]); 76 + await assertPrintedMatchesSnapshot(file, 'async.py'); 77 + }); 78 + });
+17
packages/openapi-python/src/ts-python/__tests__/nodes/expressions/identifier.test.ts
··· 1 + import { describe, it } from 'vitest'; 2 + 3 + import { py } from '../../../index'; 4 + import { assertPrintedMatchesSnapshot } from '../utils'; 5 + 6 + describe('identifier expression', () => { 7 + it('assignment', async () => { 8 + const file = py.factory.createSourceFile([ 9 + py.factory.createAssignment(py.factory.createIdentifier('y'), py.factory.createLiteral(42)), 10 + py.factory.createAssignment( 11 + py.factory.createIdentifier('x'), 12 + py.factory.createIdentifier('y'), 13 + ), 14 + ]); 15 + await assertPrintedMatchesSnapshot(file, 'identifier.py'); 16 + }); 17 + });
+42
packages/openapi-python/src/ts-python/__tests__/nodes/expressions/lambda.test.ts
··· 1 + import { describe, it } from 'vitest'; 2 + 3 + import { py } from '../../../index'; 4 + import { assertPrintedMatchesSnapshot } from '../utils'; 5 + 6 + describe('lambda expression', () => { 7 + it('simple', async () => { 8 + const file = py.factory.createSourceFile([ 9 + py.factory.createAssignment(py.factory.createIdentifier('x'), py.factory.createLiteral(5)), 10 + py.factory.createExpressionStatement( 11 + py.factory.createLambdaExpression( 12 + [], 13 + py.factory.createBinaryExpression( 14 + py.factory.createIdentifier('x'), 15 + '+', 16 + py.factory.createLiteral(1), 17 + ), 18 + ), 19 + ), 20 + ]); 21 + await assertPrintedMatchesSnapshot(file, 'simple.py'); 22 + }); 23 + 24 + it('with parameters and default', async () => { 25 + const file = py.factory.createSourceFile([ 26 + py.factory.createExpressionStatement( 27 + py.factory.createLambdaExpression( 28 + [ 29 + py.factory.createFunctionParameter('x'), 30 + py.factory.createFunctionParameter('y', undefined, py.factory.createLiteral(10)), 31 + ], 32 + py.factory.createBinaryExpression( 33 + py.factory.createIdentifier('x'), 34 + '*', 35 + py.factory.createIdentifier('y'), 36 + ), 37 + ), 38 + ), 39 + ]); 40 + await assertPrintedMatchesSnapshot(file, 'with-params-and-default.py'); 41 + }); 42 + });
+20
packages/openapi-python/src/ts-python/__tests__/nodes/expressions/list.test.ts
··· 1 + import { describe, it } from 'vitest'; 2 + 3 + import { py } from '../../../index'; 4 + import { assertPrintedMatchesSnapshot } from '../utils'; 5 + 6 + describe('list expression', () => { 7 + it('assignment', async () => { 8 + const file = py.factory.createSourceFile([ 9 + py.factory.createAssignment( 10 + py.factory.createIdentifier('nums'), 11 + py.factory.createListExpression([ 12 + py.factory.createLiteral(1), 13 + py.factory.createLiteral(2), 14 + py.factory.createLiteral(3), 15 + ]), 16 + ), 17 + ]); 18 + await assertPrintedMatchesSnapshot(file, 'list.py'); 19 + }); 20 + });
+22
packages/openapi-python/src/ts-python/__tests__/nodes/expressions/literal.test.ts
··· 1 + import { describe, it } from 'vitest'; 2 + 3 + import { py } from '../../../index'; 4 + import { assertPrintedMatchesSnapshot } from '../utils'; 5 + 6 + describe('literal expression', () => { 7 + it('primitive variables', async () => { 8 + const file = py.factory.createSourceFile([ 9 + py.factory.createAssignment( 10 + py.factory.createIdentifier('s'), 11 + py.factory.createLiteral('hello'), 12 + ), 13 + py.factory.createAssignment(py.factory.createIdentifier('n'), py.factory.createLiteral(123)), 14 + py.factory.createAssignment(py.factory.createIdentifier('b'), py.factory.createLiteral(true)), 15 + py.factory.createAssignment( 16 + py.factory.createIdentifier('none'), 17 + py.factory.createLiteral(null), 18 + ), 19 + ]); 20 + await assertPrintedMatchesSnapshot(file, 'primitive.py'); 21 + }); 22 + });
+36
packages/openapi-python/src/ts-python/__tests__/nodes/expressions/set.test.ts
··· 1 + import { describe, it } from 'vitest'; 2 + 3 + import { py } from '../../../index'; 4 + import { assertPrintedMatchesSnapshot } from '../utils'; 5 + 6 + describe('set expression', () => { 7 + it('assignment', async () => { 8 + const file = py.factory.createSourceFile([ 9 + py.factory.createAssignment( 10 + py.factory.createIdentifier('foo'), 11 + py.factory.createLiteral('bar'), 12 + ), 13 + py.factory.createAssignment( 14 + py.factory.createIdentifier('emptySet'), 15 + py.factory.createSetExpression([]), 16 + ), 17 + py.factory.createAssignment( 18 + py.factory.createIdentifier('numberSet'), 19 + py.factory.createSetExpression([ 20 + py.factory.createLiteral(1), 21 + py.factory.createLiteral(2), 22 + py.factory.createLiteral(3), 23 + ]), 24 + ), 25 + py.factory.createAssignment( 26 + py.factory.createIdentifier('mixedSet'), 27 + py.factory.createSetExpression([ 28 + py.factory.createLiteral('a'), 29 + py.factory.createLiteral(true), 30 + py.factory.createIdentifier('foo'), 31 + ]), 32 + ), 33 + ]); 34 + await assertPrintedMatchesSnapshot(file, 'set.py'); 35 + }); 36 + });
+24
packages/openapi-python/src/ts-python/__tests__/nodes/expressions/tuple.test.ts
··· 1 + import { describe, it } from 'vitest'; 2 + 3 + import { py } from '../../../index'; 4 + import { assertPrintedMatchesSnapshot } from '../utils'; 5 + 6 + describe('tuple expression', () => { 7 + it('assignment', async () => { 8 + const file = py.factory.createSourceFile([ 9 + py.factory.createAssignment( 10 + py.factory.createIdentifier('t'), 11 + py.factory.createTupleExpression([ 12 + py.factory.createLiteral(1), 13 + py.factory.createLiteral(2), 14 + py.factory.createLiteral(3), 15 + ]), 16 + ), 17 + py.factory.createAssignment( 18 + py.factory.createIdentifier('single'), 19 + py.factory.createTupleExpression([py.factory.createLiteral(42)]), 20 + ), 21 + ]); 22 + await assertPrintedMatchesSnapshot(file, 'tuple.py'); 23 + }); 24 + });
+46
packages/openapi-python/src/ts-python/__tests__/nodes/expressions/yield.test.ts
··· 1 + import { describe, it } from 'vitest'; 2 + 3 + import { py } from '../../../index'; 4 + import { assertPrintedMatchesSnapshot } from '../utils'; 5 + 6 + describe('yield expression', () => { 7 + it('without value', async () => { 8 + const file = py.factory.createSourceFile([ 9 + py.factory.createFunctionDeclaration('gen', [], undefined, [ 10 + py.factory.createExpressionStatement(py.factory.createYieldExpression(undefined)), 11 + ]), 12 + ]); 13 + await assertPrintedMatchesSnapshot(file, 'default.py'); 14 + }); 15 + 16 + it('with value', async () => { 17 + const file = py.factory.createSourceFile([ 18 + py.factory.createFunctionDeclaration('gen', [], undefined, [ 19 + py.factory.createExpressionStatement( 20 + py.factory.createYieldExpression(py.factory.createLiteral(42)), 21 + ), 22 + ]), 23 + ]); 24 + await assertPrintedMatchesSnapshot(file, 'with-value.py'); 25 + }); 26 + 27 + it('from expression', async () => { 28 + const file = py.factory.createSourceFile([ 29 + py.factory.createAssignment( 30 + py.factory.createIdentifier('iterable'), 31 + py.factory.createListExpression([ 32 + py.factory.createLiteral(1), 33 + py.factory.createLiteral(2), 34 + py.factory.createLiteral(3), 35 + ]), 36 + ), 37 + py.factory.createEmptyStatement(), 38 + py.factory.createFunctionDeclaration('gen', [], undefined, [ 39 + py.factory.createExpressionStatement( 40 + py.factory.createYieldFromExpression(py.factory.createIdentifier('iterable')), 41 + ), 42 + ]), 43 + ]); 44 + await assertPrintedMatchesSnapshot(file, 'from-iterable.py'); 45 + }); 46 + });
+13
packages/openapi-python/src/ts-python/__tests__/nodes/statements/assignment.test.ts
··· 1 + import { describe, it } from 'vitest'; 2 + 3 + import { py } from '../../../index'; 4 + import { assertPrintedMatchesSnapshot } from '../utils'; 5 + 6 + describe('assignment statement', () => { 7 + it('primitive variables', async () => { 8 + const file = py.factory.createSourceFile([ 9 + py.factory.createAssignment(py.factory.createIdentifier('foo'), py.factory.createLiteral(42)), 10 + ]); 11 + await assertPrintedMatchesSnapshot(file, 'primitive.py'); 12 + }); 13 + });
+92
packages/openapi-python/src/ts-python/__tests__/nodes/statements/augmentedAssignment.test.ts
··· 1 + import { describe, it } from 'vitest'; 2 + 3 + import { py } from '../../../index'; 4 + import { assertPrintedMatchesSnapshot } from '../utils'; 5 + 6 + describe('augmented assignment statement', () => { 7 + it('arithmetic operators', async () => { 8 + const file = py.factory.createSourceFile([ 9 + py.factory.createAssignment(py.factory.createIdentifier('x'), py.factory.createLiteral(0)), 10 + py.factory.createAssignment(py.factory.createIdentifier('y'), py.factory.createLiteral(0)), 11 + py.factory.createAssignment(py.factory.createIdentifier('z'), py.factory.createLiteral(0)), 12 + py.factory.createAssignment(py.factory.createIdentifier('a'), py.factory.createLiteral(0.0)), 13 + py.factory.createAssignment(py.factory.createIdentifier('b'), py.factory.createLiteral(0)), 14 + py.factory.createAssignment(py.factory.createIdentifier('c'), py.factory.createLiteral(0)), 15 + 16 + py.factory.createAugmentedAssignment( 17 + py.factory.createIdentifier('x'), 18 + '+=', 19 + py.factory.createLiteral(1), 20 + ), 21 + py.factory.createAugmentedAssignment( 22 + py.factory.createIdentifier('y'), 23 + '-=', 24 + py.factory.createLiteral(2), 25 + ), 26 + py.factory.createAugmentedAssignment( 27 + py.factory.createIdentifier('z'), 28 + '*=', 29 + py.factory.createLiteral(3), 30 + ), 31 + py.factory.createAugmentedAssignment( 32 + py.factory.createIdentifier('a'), 33 + '/=', 34 + py.factory.createLiteral(4), 35 + ), 36 + py.factory.createAugmentedAssignment( 37 + py.factory.createIdentifier('b'), 38 + '//=', 39 + py.factory.createLiteral(5), 40 + ), 41 + py.factory.createAugmentedAssignment( 42 + py.factory.createIdentifier('c'), 43 + '%=', 44 + py.factory.createLiteral(6), 45 + ), 46 + ]); 47 + await assertPrintedMatchesSnapshot(file, 'arithmetic.py'); 48 + }); 49 + 50 + it('power and bitwise operators', async () => { 51 + const file = py.factory.createSourceFile([ 52 + py.factory.createAssignment(py.factory.createIdentifier('x'), py.factory.createLiteral(1)), 53 + py.factory.createAssignment(py.factory.createIdentifier('y'), py.factory.createLiteral(1)), 54 + py.factory.createAssignment(py.factory.createIdentifier('z'), py.factory.createLiteral(1)), 55 + py.factory.createAssignment(py.factory.createIdentifier('a'), py.factory.createLiteral(1)), 56 + py.factory.createAssignment(py.factory.createIdentifier('b'), py.factory.createLiteral(1)), 57 + py.factory.createAssignment(py.factory.createIdentifier('c'), py.factory.createLiteral(1)), 58 + 59 + py.factory.createAugmentedAssignment( 60 + py.factory.createIdentifier('x'), 61 + '**=', 62 + py.factory.createLiteral(2), 63 + ), 64 + py.factory.createAugmentedAssignment( 65 + py.factory.createIdentifier('y'), 66 + '&=', 67 + py.factory.createLiteral(1), 68 + ), 69 + py.factory.createAugmentedAssignment( 70 + py.factory.createIdentifier('z'), 71 + '|=', 72 + py.factory.createLiteral(1), 73 + ), 74 + py.factory.createAugmentedAssignment( 75 + py.factory.createIdentifier('a'), 76 + '^=', 77 + py.factory.createLiteral(1), 78 + ), 79 + py.factory.createAugmentedAssignment( 80 + py.factory.createIdentifier('b'), 81 + '>>=', 82 + py.factory.createLiteral(1), 83 + ), 84 + py.factory.createAugmentedAssignment( 85 + py.factory.createIdentifier('c'), 86 + '<<=', 87 + py.factory.createLiteral(1), 88 + ), 89 + ]); 90 + await assertPrintedMatchesSnapshot(file, 'bitwise.py'); 91 + }); 92 + });
+19
packages/openapi-python/src/ts-python/__tests__/nodes/statements/block.test.ts
··· 1 + import { describe, it } from 'vitest'; 2 + 3 + import { py } from '../../..'; 4 + import { assertPrintedMatchesSnapshot } from '../utils'; 5 + 6 + describe('block statement', () => { 7 + it('inside function', async () => { 8 + const file = py.factory.createSourceFile([ 9 + py.factory.createFunctionDeclaration('main', [], undefined, [ 10 + py.factory.createExpressionStatement( 11 + py.factory.createCallExpression(py.factory.createIdentifier('print'), [ 12 + py.factory.createLiteral('inside'), 13 + ]), 14 + ), 15 + ]), 16 + ]); 17 + await assertPrintedMatchesSnapshot(file, 'function.py'); 18 + }); 19 + });
+15
packages/openapi-python/src/ts-python/__tests__/nodes/statements/break.test.ts
··· 1 + import { describe, it } from 'vitest'; 2 + 3 + import { py } from '../../../index'; 4 + import { assertPrintedMatchesSnapshot } from '../utils'; 5 + 6 + describe('break statement', () => { 7 + it('inside a while loop', async () => { 8 + const file = py.factory.createSourceFile([ 9 + py.factory.createWhileStatement(py.factory.createLiteral(true), [ 10 + py.factory.createBreakStatement(), 11 + ]), 12 + ]); 13 + await assertPrintedMatchesSnapshot(file, 'while.py'); 14 + }); 15 + });
+15
packages/openapi-python/src/ts-python/__tests__/nodes/statements/continue.test.ts
··· 1 + import { describe, it } from 'vitest'; 2 + 3 + import { py } from '../../../index'; 4 + import { assertPrintedMatchesSnapshot } from '../utils'; 5 + 6 + describe('continue statement', () => { 7 + it('inside a while loop', async () => { 8 + const file = py.factory.createSourceFile([ 9 + py.factory.createWhileStatement(py.factory.createLiteral(true), [ 10 + py.factory.createContinueStatement(), 11 + ]), 12 + ]); 13 + await assertPrintedMatchesSnapshot(file, 'while.py'); 14 + }); 15 + });
+17
packages/openapi-python/src/ts-python/__tests__/nodes/statements/expression.test.ts
··· 1 + import { describe, it } from 'vitest'; 2 + 3 + import { py } from '../../../index'; 4 + import { assertPrintedMatchesSnapshot } from '../utils'; 5 + 6 + describe('expression statement', () => { 7 + it('simple', async () => { 8 + const file = py.factory.createSourceFile([ 9 + py.factory.createExpressionStatement( 10 + py.factory.createCallExpression(py.factory.createIdentifier('print'), [ 11 + py.factory.createLiteral('hello'), 12 + ]), 13 + ), 14 + ]); 15 + await assertPrintedMatchesSnapshot(file, 'simple.py'); 16 + }); 17 + });
+51
packages/openapi-python/src/ts-python/__tests__/nodes/statements/for.test.ts
··· 1 + import { describe, it } from 'vitest'; 2 + 3 + import { py } from '../../../index'; 4 + import { assertPrintedMatchesSnapshot } from '../utils'; 5 + 6 + describe('for statement', () => { 7 + it('simple', async () => { 8 + const file = py.factory.createSourceFile([ 9 + py.factory.createForStatement( 10 + py.factory.createIdentifier('i'), 11 + py.factory.createCallExpression(py.factory.createIdentifier('range'), [ 12 + py.factory.createLiteral(3), 13 + ]), 14 + [ 15 + py.factory.createExpressionStatement( 16 + py.factory.createCallExpression(py.factory.createIdentifier('print'), [ 17 + py.factory.createIdentifier('i'), 18 + ]), 19 + ), 20 + ], 21 + ), 22 + ]); 23 + await assertPrintedMatchesSnapshot(file, 'for.py'); 24 + }); 25 + 26 + it('with else', async () => { 27 + const file = py.factory.createSourceFile([ 28 + py.factory.createAssignment( 29 + py.factory.createIdentifier('items'), 30 + py.factory.createListExpression([ 31 + py.factory.createLiteral(1), 32 + py.factory.createLiteral(2), 33 + py.factory.createLiteral(3), 34 + ]), 35 + ), 36 + py.factory.createForStatement( 37 + py.factory.createIdentifier('x'), 38 + py.factory.createIdentifier('items'), 39 + [], 40 + [ 41 + py.factory.createExpressionStatement( 42 + py.factory.createCallExpression(py.factory.createIdentifier('print'), [ 43 + py.factory.createLiteral('done'), 44 + ]), 45 + ), 46 + ], 47 + ), 48 + ]); 49 + await assertPrintedMatchesSnapshot(file, 'for-else.py'); 50 + }); 51 + });
+47
packages/openapi-python/src/ts-python/__tests__/nodes/statements/if.test.ts
··· 1 + import { describe, it } from 'vitest'; 2 + 3 + import { py } from '../../../index'; 4 + import { assertPrintedMatchesSnapshot } from '../utils'; 5 + 6 + describe('if statement', () => { 7 + it('simple', async () => { 8 + const file = py.factory.createSourceFile([ 9 + py.factory.createIfStatement(py.factory.createLiteral(true), [ 10 + py.factory.createExpressionStatement( 11 + py.factory.createCallExpression(py.factory.createIdentifier('print'), [ 12 + py.factory.createLiteral('positive'), 13 + ]), 14 + ), 15 + ]), 16 + ]); 17 + await assertPrintedMatchesSnapshot(file, 'if.py'); 18 + }); 19 + 20 + it('with else', async () => { 21 + const file = py.factory.createSourceFile([ 22 + py.factory.createAssignment(py.factory.createIdentifier('x'), py.factory.createLiteral(0)), 23 + py.factory.createIfStatement( 24 + py.factory.createBinaryExpression( 25 + py.factory.createIdentifier('x'), 26 + '>', 27 + py.factory.createLiteral(0), 28 + ), 29 + [ 30 + py.factory.createExpressionStatement( 31 + py.factory.createCallExpression(py.factory.createIdentifier('print'), [ 32 + py.factory.createLiteral('positive'), 33 + ]), 34 + ), 35 + ], 36 + [ 37 + py.factory.createExpressionStatement( 38 + py.factory.createCallExpression(py.factory.createIdentifier('print'), [ 39 + py.factory.createLiteral('non-positive'), 40 + ]), 41 + ), 42 + ], 43 + ), 44 + ]); 45 + await assertPrintedMatchesSnapshot(file, 'if-else.py'); 46 + }); 47 + });
+53
packages/openapi-python/src/ts-python/__tests__/nodes/statements/import.test.ts
··· 1 + import { describe, it } from 'vitest'; 2 + 3 + import { py } from '../../../index'; 4 + import { assertPrintedMatchesSnapshot } from '../utils'; 5 + 6 + describe('import statement', () => { 7 + it('module', async () => { 8 + const file = py.factory.createSourceFile([ 9 + py.factory.createImportStatement('math'), 10 + py.factory.createImportStatement('json', [{ name: 'loads' }], false), 11 + ]); 12 + await assertPrintedMatchesSnapshot(file, 'module.py'); 13 + }); 14 + 15 + it('module with alias', async () => { 16 + const file = py.factory.createSourceFile([ 17 + py.factory.createImportStatement('json', [{ alias: 'js', name: 'json' }], false), 18 + ]); 19 + await assertPrintedMatchesSnapshot(file, 'module-with-alias.py'); 20 + }); 21 + 22 + it('from with name and alias', async () => { 23 + const file = py.factory.createSourceFile([ 24 + py.factory.createImportStatement( 25 + 'os', 26 + [{ name: 'path' }, { alias: 'env', name: 'environ' }], 27 + true, 28 + ), 29 + ]); 30 + await assertPrintedMatchesSnapshot(file, 'from-with-name-alias.py'); 31 + }); 32 + 33 + it('from with alias', async () => { 34 + const file = py.factory.createSourceFile([ 35 + py.factory.createImportStatement('os', [{ alias: 'env', name: 'environ' }], true), 36 + ]); 37 + await assertPrintedMatchesSnapshot(file, 'from-with-alias.py'); 38 + }); 39 + 40 + it('from with name', async () => { 41 + const file = py.factory.createSourceFile([ 42 + py.factory.createImportStatement('sys', [{ name: 'argv' }], true), 43 + ]); 44 + await assertPrintedMatchesSnapshot(file, 'from-with-name.py'); 45 + }); 46 + 47 + it('from with asterisk', async () => { 48 + const file = py.factory.createSourceFile([ 49 + py.factory.createImportStatement('collections', [], true), 50 + ]); 51 + await assertPrintedMatchesSnapshot(file, 'from-with-asterisk.py'); 52 + }); 53 + });
+22
packages/openapi-python/src/ts-python/__tests__/nodes/statements/raise.test.ts
··· 1 + import { describe, it } from 'vitest'; 2 + 3 + import { py } from '../../../index'; 4 + import { assertPrintedMatchesSnapshot } from '../utils'; 5 + 6 + describe('raise statement', () => { 7 + it('with exception', async () => { 8 + const file = py.factory.createSourceFile([ 9 + py.factory.createRaiseStatement( 10 + py.factory.createCallExpression(py.factory.createIdentifier('ValueError'), [ 11 + py.factory.createLiteral('Invalid input'), 12 + ]), 13 + ), 14 + ]); 15 + await assertPrintedMatchesSnapshot(file, 'with-exception.py'); 16 + }); 17 + 18 + it('re-raise', async () => { 19 + const file = py.factory.createSourceFile([py.factory.createRaiseStatement()]); 20 + await assertPrintedMatchesSnapshot(file, 'reraise.py'); 21 + }); 22 + });
+15
packages/openapi-python/src/ts-python/__tests__/nodes/statements/return.test.ts
··· 1 + import { describe, it } from 'vitest'; 2 + 3 + import { py } from '../../../index'; 4 + import { assertPrintedMatchesSnapshot } from '../utils'; 5 + 6 + describe('return statement', () => { 7 + it('inside function', async () => { 8 + const node = py.factory.createSourceFile([ 9 + py.factory.createFunctionDeclaration('get_message', [], undefined, [ 10 + py.factory.createReturnStatement(py.factory.createLiteral('hi')), 11 + ]), 12 + ]); 13 + await assertPrintedMatchesSnapshot(node, 'function.py'); 14 + }); 15 + });
+117
packages/openapi-python/src/ts-python/__tests__/nodes/statements/try.test.ts
··· 1 + import { describe, it } from 'vitest'; 2 + 3 + import { py } from '../../../index'; 4 + import { assertPrintedMatchesSnapshot } from '../utils'; 5 + 6 + describe('try statement', () => { 7 + it('with except', async () => { 8 + const file = py.factory.createSourceFile([ 9 + py.factory.createFunctionDeclaration('dangerous_func', [], undefined, []), 10 + py.factory.createEmptyStatement(), 11 + py.factory.createTryStatement( 12 + [ 13 + py.factory.createExpressionStatement( 14 + py.factory.createCallExpression(py.factory.createIdentifier('dangerous_func'), []), 15 + ), 16 + ], 17 + [ 18 + py.factory.createExceptClause( 19 + [ 20 + py.factory.createExpressionStatement( 21 + py.factory.createCallExpression(py.factory.createIdentifier('print'), [ 22 + py.factory.createIdentifier('e'), 23 + ]), 24 + ), 25 + ], 26 + py.factory.createIdentifier('ValueError'), 27 + py.factory.createIdentifier('e'), 28 + ), 29 + ], 30 + ), 31 + ]); 32 + await assertPrintedMatchesSnapshot(file, 'with-except.py'); 33 + }); 34 + 35 + it('with except and else', async () => { 36 + const file = py.factory.createSourceFile([ 37 + py.factory.createFunctionDeclaration('dangerous_func', [], undefined, []), 38 + py.factory.createEmptyStatement(), 39 + py.factory.createTryStatement( 40 + [ 41 + py.factory.createExpressionStatement( 42 + py.factory.createCallExpression(py.factory.createIdentifier('dangerous_func'), []), 43 + ), 44 + ], 45 + [py.factory.createExceptClause([])], 46 + [], 47 + ), 48 + ]); 49 + await assertPrintedMatchesSnapshot(file, 'with-except-else.py'); 50 + }); 51 + 52 + it('with finally', async () => { 53 + const file = py.factory.createSourceFile([ 54 + py.factory.createFunctionDeclaration('dangerous_func', [], undefined, []), 55 + py.factory.createEmptyStatement(), 56 + py.factory.createTryStatement( 57 + [ 58 + py.factory.createExpressionStatement( 59 + py.factory.createCallExpression(py.factory.createIdentifier('dangerous_func'), []), 60 + ), 61 + ], 62 + undefined, 63 + undefined, 64 + [], 65 + ), 66 + ]); 67 + await assertPrintedMatchesSnapshot(file, 'with-finally.py'); 68 + }); 69 + 70 + it('with except and finally', async () => { 71 + const file = py.factory.createSourceFile([ 72 + py.factory.createFunctionDeclaration('dangerous_func', [], undefined, []), 73 + py.factory.createEmptyStatement(), 74 + py.factory.createTryStatement( 75 + [ 76 + py.factory.createExpressionStatement( 77 + py.factory.createCallExpression(py.factory.createIdentifier('dangerous_func'), []), 78 + ), 79 + ], 80 + [py.factory.createExceptClause([], py.factory.createIdentifier('Exception'))], 81 + undefined, 82 + [], 83 + ), 84 + ]); 85 + await assertPrintedMatchesSnapshot(file, 'with-except-finally.py'); 86 + }); 87 + 88 + it('with except, else, and finally', async () => { 89 + const file = py.factory.createSourceFile([ 90 + py.factory.createFunctionDeclaration('dangerous_func', [], undefined, []), 91 + py.factory.createEmptyStatement(), 92 + py.factory.createTryStatement( 93 + [ 94 + py.factory.createExpressionStatement( 95 + py.factory.createCallExpression(py.factory.createIdentifier('dangerous_func'), []), 96 + ), 97 + ], 98 + [ 99 + py.factory.createExceptClause( 100 + [ 101 + py.factory.createExpressionStatement( 102 + py.factory.createCallExpression(py.factory.createIdentifier('print'), [ 103 + py.factory.createIdentifier('e'), 104 + ]), 105 + ), 106 + ], 107 + py.factory.createIdentifier('Exception'), 108 + py.factory.createIdentifier('e'), 109 + ), 110 + ], 111 + [], 112 + [], 113 + ), 114 + ]); 115 + await assertPrintedMatchesSnapshot(file, 'with-except-else-finally.py'); 116 + }); 117 + });
+55
packages/openapi-python/src/ts-python/__tests__/nodes/statements/while.test.ts
··· 1 + import { describe, it } from 'vitest'; 2 + 3 + import { py } from '../../../index'; 4 + import { assertPrintedMatchesSnapshot } from '../utils'; 5 + 6 + describe('while statement', () => { 7 + it('simple', async () => { 8 + const file = py.factory.createSourceFile([ 9 + py.factory.createAssignment(py.factory.createIdentifier('x'), py.factory.createLiteral(3)), 10 + py.factory.createWhileStatement( 11 + py.factory.createBinaryExpression( 12 + py.factory.createIdentifier('x'), 13 + '>', 14 + py.factory.createLiteral(0), 15 + ), 16 + [ 17 + py.factory.createExpressionStatement( 18 + py.factory.createCallExpression(py.factory.createIdentifier('print'), [ 19 + py.factory.createIdentifier('x'), 20 + ]), 21 + ), 22 + py.factory.createAssignment( 23 + py.factory.createIdentifier('x'), 24 + py.factory.createBinaryExpression( 25 + py.factory.createIdentifier('x'), 26 + '-', 27 + py.factory.createLiteral(1), 28 + ), 29 + ), 30 + ], 31 + ), 32 + ]); 33 + await assertPrintedMatchesSnapshot(file, 'while.py'); 34 + }); 35 + 36 + it('with else', async () => { 37 + const file = py.factory.createSourceFile([ 38 + py.factory.createFunctionDeclaration('should_continue', [], undefined, [ 39 + py.factory.createReturnStatement(py.factory.createLiteral(false)), 40 + ]), 41 + py.factory.createWhileStatement( 42 + py.factory.createCallExpression(py.factory.createIdentifier('should_continue'), []), 43 + [], 44 + [ 45 + py.factory.createExpressionStatement( 46 + py.factory.createCallExpression(py.factory.createIdentifier('print'), [ 47 + py.factory.createLiteral('done'), 48 + ]), 49 + ), 50 + ], 51 + ), 52 + ]); 53 + await assertPrintedMatchesSnapshot(file, 'while-else.py'); 54 + }); 55 + });
+243
packages/openapi-python/src/ts-python/__tests__/nodes/statements/with.test.ts
··· 1 + import { describe, it } from 'vitest'; 2 + 3 + import { py } from '../../../index'; 4 + import { assertPrintedMatchesSnapshot } from '../utils'; 5 + 6 + describe('with statement', () => { 7 + it('with alias', async () => { 8 + const file = py.factory.createSourceFile([ 9 + py.factory.createClassDeclaration('context_manager', [ 10 + py.factory.createFunctionDeclaration( 11 + '__enter__', 12 + [py.factory.createFunctionParameter('self')], 13 + undefined, 14 + [py.factory.createReturnStatement(py.factory.createIdentifier('self'))], 15 + ), 16 + py.factory.createFunctionDeclaration( 17 + '__exit__', 18 + [ 19 + py.factory.createFunctionParameter('self'), 20 + py.factory.createFunctionParameter('exc_type'), 21 + py.factory.createFunctionParameter('exc_val'), 22 + py.factory.createFunctionParameter('exc_tb'), 23 + ], 24 + undefined, 25 + [py.factory.createReturnStatement(py.factory.createLiteral(false))], 26 + ), 27 + ]), 28 + py.factory.createEmptyStatement(), 29 + py.factory.createWithStatement( 30 + [ 31 + py.factory.createWithItem( 32 + py.factory.createCallExpression(py.factory.createIdentifier('context_manager'), []), 33 + py.factory.createIdentifier('alias'), 34 + ), 35 + ], 36 + [], 37 + ), 38 + ]); 39 + await assertPrintedMatchesSnapshot(file, 'with-alias.py'); 40 + }); 41 + 42 + it('with tuple alias', async () => { 43 + const file = py.factory.createSourceFile([ 44 + py.factory.createClassDeclaration('context_manager', [ 45 + py.factory.createFunctionDeclaration( 46 + '__enter__', 47 + [py.factory.createFunctionParameter('self')], 48 + undefined, 49 + [py.factory.createReturnStatement(py.factory.createIdentifier('self'))], 50 + ), 51 + py.factory.createFunctionDeclaration( 52 + '__exit__', 53 + [ 54 + py.factory.createFunctionParameter('self'), 55 + py.factory.createFunctionParameter('exc_type'), 56 + py.factory.createFunctionParameter('exc_val'), 57 + py.factory.createFunctionParameter('exc_tb'), 58 + ], 59 + undefined, 60 + [py.factory.createReturnStatement(py.factory.createLiteral(false))], 61 + ), 62 + ]), 63 + py.factory.createEmptyStatement(), 64 + py.factory.createWithStatement( 65 + [ 66 + py.factory.createWithItem( 67 + py.factory.createCallExpression(py.factory.createIdentifier('context_manager'), []), 68 + py.factory.createTupleExpression([ 69 + py.factory.createIdentifier('a'), 70 + py.factory.createIdentifier('b'), 71 + ]), 72 + ), 73 + ], 74 + [], 75 + ), 76 + ]); 77 + await assertPrintedMatchesSnapshot(file, 'with-tuple-alias.py'); 78 + }); 79 + 80 + it('without alias', async () => { 81 + const file = py.factory.createSourceFile([ 82 + py.factory.createClassDeclaration('context_manager', [ 83 + py.factory.createFunctionDeclaration( 84 + '__enter__', 85 + [py.factory.createFunctionParameter('self')], 86 + undefined, 87 + [py.factory.createReturnStatement(py.factory.createIdentifier('self'))], 88 + ), 89 + py.factory.createFunctionDeclaration( 90 + '__exit__', 91 + [ 92 + py.factory.createFunctionParameter('self'), 93 + py.factory.createFunctionParameter('exc_type'), 94 + py.factory.createFunctionParameter('exc_val'), 95 + py.factory.createFunctionParameter('exc_tb'), 96 + ], 97 + undefined, 98 + [py.factory.createReturnStatement(py.factory.createLiteral(false))], 99 + ), 100 + ]), 101 + py.factory.createEmptyStatement(), 102 + py.factory.createWithStatement( 103 + [ 104 + py.factory.createWithItem( 105 + py.factory.createCallExpression(py.factory.createIdentifier('context_manager'), []), 106 + ), 107 + ], 108 + [], 109 + ), 110 + ]); 111 + await assertPrintedMatchesSnapshot(file, 'with.py'); 112 + }); 113 + 114 + it('many with items', async () => { 115 + const file = py.factory.createSourceFile([ 116 + py.factory.createClassDeclaration('context_manager', [ 117 + py.factory.createFunctionDeclaration( 118 + '__enter__', 119 + [py.factory.createFunctionParameter('self')], 120 + undefined, 121 + [py.factory.createReturnStatement(py.factory.createIdentifier('self'))], 122 + ), 123 + py.factory.createFunctionDeclaration( 124 + '__exit__', 125 + [ 126 + py.factory.createFunctionParameter('self'), 127 + py.factory.createFunctionParameter('exc_type'), 128 + py.factory.createFunctionParameter('exc_val'), 129 + py.factory.createFunctionParameter('exc_tb'), 130 + ], 131 + undefined, 132 + [py.factory.createReturnStatement(py.factory.createLiteral(false))], 133 + ), 134 + ]), 135 + py.factory.createEmptyStatement(), 136 + py.factory.createClassDeclaration('context_manager2', [ 137 + py.factory.createFunctionDeclaration( 138 + '__enter__', 139 + [py.factory.createFunctionParameter('self')], 140 + undefined, 141 + [py.factory.createReturnStatement(py.factory.createIdentifier('self'))], 142 + ), 143 + py.factory.createFunctionDeclaration( 144 + '__exit__', 145 + [ 146 + py.factory.createFunctionParameter('self'), 147 + py.factory.createFunctionParameter('exc_type'), 148 + py.factory.createFunctionParameter('exc_val'), 149 + py.factory.createFunctionParameter('exc_tb'), 150 + ], 151 + undefined, 152 + [py.factory.createReturnStatement(py.factory.createLiteral(false))], 153 + ), 154 + ]), 155 + py.factory.createEmptyStatement(), 156 + py.factory.createClassDeclaration('context_manager3', [ 157 + py.factory.createFunctionDeclaration( 158 + '__enter__', 159 + [py.factory.createFunctionParameter('self')], 160 + undefined, 161 + [py.factory.createReturnStatement(py.factory.createIdentifier('self'))], 162 + ), 163 + py.factory.createFunctionDeclaration( 164 + '__exit__', 165 + [ 166 + py.factory.createFunctionParameter('self'), 167 + py.factory.createFunctionParameter('exc_type'), 168 + py.factory.createFunctionParameter('exc_val'), 169 + py.factory.createFunctionParameter('exc_tb'), 170 + ], 171 + undefined, 172 + [py.factory.createReturnStatement(py.factory.createLiteral(false))], 173 + ), 174 + ]), 175 + py.factory.createEmptyStatement(), 176 + py.factory.createWithStatement( 177 + [ 178 + py.factory.createWithItem( 179 + py.factory.createCallExpression(py.factory.createIdentifier('context_manager'), []), 180 + py.factory.createIdentifier('alias'), 181 + ), 182 + py.factory.createWithItem( 183 + py.factory.createCallExpression(py.factory.createIdentifier('context_manager2'), []), 184 + py.factory.createTupleExpression([ 185 + py.factory.createIdentifier('a'), 186 + py.factory.createIdentifier('b'), 187 + ]), 188 + ), 189 + py.factory.createWithItem( 190 + py.factory.createCallExpression(py.factory.createIdentifier('context_manager3'), []), 191 + ), 192 + ], 193 + [], 194 + ), 195 + ]); 196 + await assertPrintedMatchesSnapshot(file, 'with-many-items.py'); 197 + }); 198 + 199 + it('with async', async () => { 200 + const file = py.factory.createSourceFile([ 201 + py.factory.createClassDeclaration('context_manager', [ 202 + py.factory.createFunctionDeclaration( 203 + '__enter__', 204 + [py.factory.createFunctionParameter('self')], 205 + undefined, 206 + [py.factory.createReturnStatement(py.factory.createIdentifier('self'))], 207 + ), 208 + py.factory.createFunctionDeclaration( 209 + '__exit__', 210 + [ 211 + py.factory.createFunctionParameter('self'), 212 + py.factory.createFunctionParameter('exc_type'), 213 + py.factory.createFunctionParameter('exc_val'), 214 + py.factory.createFunctionParameter('exc_tb'), 215 + ], 216 + undefined, 217 + [py.factory.createReturnStatement(py.factory.createLiteral(false))], 218 + ), 219 + ]), 220 + py.factory.createEmptyStatement(), 221 + py.factory.createFunctionDeclaration( 222 + 'foo', 223 + [], 224 + undefined, 225 + [ 226 + py.factory.createWithStatement( 227 + [ 228 + py.factory.createWithItem( 229 + py.factory.createCallExpression(py.factory.createIdentifier('context_manager'), []), 230 + ), 231 + ], 232 + [], 233 + [py.factory.createIdentifier('async')], 234 + ), 235 + ], 236 + undefined, 237 + undefined, 238 + [py.factory.createIdentifier('async')], 239 + ), 240 + ]); 241 + await assertPrintedMatchesSnapshot(file, 'with-async.py'); 242 + }); 243 + });
+11
packages/openapi-python/src/ts-python/__tests__/nodes/structure/comment.test.ts
··· 1 + import { describe, it } from 'vitest'; 2 + 3 + import { py } from '../../../index'; 4 + import { assertPrintedMatchesSnapshot } from '../utils'; 5 + 6 + describe('comment', () => { 7 + it('simple', async () => { 8 + const file = py.factory.createSourceFile([py.factory.createComment('This is a comment')]); 9 + await assertPrintedMatchesSnapshot(file, 'simple.py'); 10 + }); 11 + });
+27
packages/openapi-python/src/ts-python/__tests__/nodes/structure/sourceFile.test.ts
··· 1 + import { describe, it } from 'vitest'; 2 + 3 + import { py } from '../../../index'; 4 + import { assertPrintedMatchesSnapshot } from '../utils'; 5 + 6 + describe('source file', () => { 7 + it('simple', async () => { 8 + const file = py.factory.createSourceFile([ 9 + py.factory.createAssignment(py.factory.createIdentifier('a'), py.factory.createLiteral(1)), 10 + py.factory.createAssignment(py.factory.createIdentifier('b'), py.factory.createLiteral(2)), 11 + ]); 12 + await assertPrintedMatchesSnapshot(file, 'simple.py'); 13 + }); 14 + 15 + it('with docstring', async () => { 16 + const file = py.factory.createSourceFile( 17 + [ 18 + py.factory.createAssignment( 19 + py.factory.createIdentifier('foo'), 20 + py.factory.createLiteral(1), 21 + ), 22 + ], 23 + 'This is a module-level docstring.', 24 + ); 25 + await assertPrintedMatchesSnapshot(file, 'with-docstring.py'); 26 + }); 27 + });
+65
packages/openapi-python/src/ts-python/__tests__/nodes/utils.ts
··· 1 + import fs from 'node:fs'; 2 + import path from 'node:path'; 3 + 4 + import { expect } from 'vitest'; 5 + 6 + import { py } from '../../index'; 7 + import type { PySourceFile } from '../../nodes/structure/sourceFile'; 8 + import { snapshotsDir, tmpDir } from '../constants'; 9 + 10 + function getCallerFile(): string { 11 + const error = new Error(); 12 + const stack = (error.stack ?? '').split('\n'); 13 + const callerLine = stack.find((line) => line.includes('.test.ts')); 14 + if (!callerLine) { 15 + throw new Error('Could not find test file in stack trace'); 16 + } 17 + const match = callerLine.match(/\(([^)]+)\)/) || callerLine.match(/at (.+):\d+:\d+/); 18 + if (!match?.[1]) { 19 + throw new Error('Could not extract file path'); 20 + } 21 + return match[1]; 22 + } 23 + 24 + function ensureInitFiles(dir: string, rootDir: string): void { 25 + let current = dir; 26 + while (current.startsWith(rootDir) && current !== rootDir) { 27 + const initPath = path.join(current, '__init__.py'); 28 + if (!fs.existsSync(initPath)) { 29 + fs.writeFileSync(initPath, ''); 30 + } 31 + current = path.dirname(current); 32 + } 33 + 34 + const rootInit = path.join(rootDir, '__init__.py'); 35 + if (!fs.existsSync(rootInit)) { 36 + fs.writeFileSync(rootInit, ''); 37 + } 38 + } 39 + 40 + export async function assertPrintedMatchesSnapshot( 41 + file: PySourceFile, 42 + filename: string, 43 + ): Promise<void> { 44 + const result = py.createPrinter().printFile(file); 45 + 46 + const caller = getCallerFile(); 47 + const relPath = path 48 + .relative(path.join(process.cwd(), 'src', 'ts-python', '__tests__'), caller) 49 + .replace(/\.test\.ts$/, ''); 50 + const outputPath = path.join(tmpDir, relPath, filename); 51 + const outputDir = path.dirname(outputPath); 52 + 53 + fs.mkdirSync(outputDir, { recursive: true }); 54 + fs.writeFileSync(outputPath, result); 55 + 56 + ensureInitFiles(outputDir, tmpDir); 57 + 58 + const snapshotPath = path.join(snapshotsDir, relPath, filename); 59 + 60 + const snapshotDir = path.dirname(snapshotPath); 61 + fs.mkdirSync(snapshotDir, { recursive: true }); 62 + ensureInitFiles(snapshotDir, snapshotsDir); 63 + 64 + await expect(result).toMatchFileSnapshot(snapshotPath); 65 + }
+10
packages/openapi-python/src/ts-python/index.ts
··· 1 + import { factory } from './nodes/factory'; 2 + import { PyNodeKind } from './nodes/kinds'; 3 + import { createPrinter, printAst } from './printer'; 4 + 5 + export const py = { 6 + PyNodeKind, 7 + createPrinter, 8 + factory, 9 + printAst, 10 + } as const;
+13
packages/openapi-python/src/ts-python/nodes/base.ts
··· 1 + import type { PyExpression } from './expression'; 2 + import type { PyNodeKind } from './kinds'; 3 + import type { PyStatement } from './statement'; 4 + import type { PyBlock } from './statements/block'; 5 + import type { PySourceFile } from './structure/sourceFile'; 6 + 7 + export interface PyNodeBase { 8 + kind: PyNodeKind; 9 + leadingComments?: ReadonlyArray<string>; 10 + trailingComments?: ReadonlyArray<string>; 11 + } 12 + 13 + export type PyNode = PyBlock | PyExpression | PySourceFile | PyStatement;
+14
packages/openapi-python/src/ts-python/nodes/comprehension.ts
··· 1 + import type { PyNodeBase } from './base'; 2 + import type { PyExpression } from './expression'; 3 + import type { PyDictComprehension } from './expressions/comprehensions/dict'; 4 + import type { PyListComprehension } from './expressions/comprehensions/list'; 5 + import type { PySetComprehension } from './expressions/comprehensions/set'; 6 + 7 + export type PyComprehension = PyDictComprehension | PyListComprehension | PySetComprehension; 8 + 9 + export interface PyComprehensionNode extends PyNodeBase { 10 + ifs?: ReadonlyArray<PyExpression>; 11 + isAsync?: boolean; 12 + iterable: PyExpression; 13 + target: PyExpression; 14 + }
+36
packages/openapi-python/src/ts-python/nodes/declarations/class.ts
··· 1 + import type { PyNode, PyNodeBase } from '../base'; 2 + import type { PyExpression } from '../expression'; 3 + import { PyNodeKind } from '../kinds'; 4 + import type { PyStatement } from '../statement'; 5 + import type { PyBlock } from '../statements/block'; 6 + import { createBlock } from '../statements/block'; 7 + 8 + export interface PyClassDeclaration extends PyNodeBase { 9 + baseClasses?: ReadonlyArray<PyNode>; 10 + body: PyBlock; 11 + decorators?: ReadonlyArray<PyExpression>; 12 + docstring?: string; 13 + kind: PyNodeKind.ClassDeclaration; 14 + name: string; 15 + } 16 + 17 + export function createClassDeclaration( 18 + name: string, 19 + body: ReadonlyArray<PyStatement>, 20 + decorators?: ReadonlyArray<PyExpression>, 21 + baseClasses?: ReadonlyArray<PyNode>, 22 + docstring?: string, 23 + leadingComments?: ReadonlyArray<string>, 24 + trailingComments?: ReadonlyArray<string>, 25 + ): PyClassDeclaration { 26 + return { 27 + baseClasses, 28 + body: createBlock(body), 29 + decorators, 30 + docstring, 31 + kind: PyNodeKind.ClassDeclaration, 32 + leadingComments, 33 + name, 34 + trailingComments, 35 + }; 36 + }
+43
packages/openapi-python/src/ts-python/nodes/declarations/function.ts
··· 1 + import type { PyNodeBase } from '../base'; 2 + import type { PyExpression } from '../expression'; 3 + import { PyNodeKind } from '../kinds'; 4 + import type { PyStatement } from '../statement'; 5 + import type { PyBlock } from '../statements/block'; 6 + import { createBlock } from '../statements/block'; 7 + import type { PyFunctionParameter } from './functionParameter'; 8 + 9 + export interface PyFunctionDeclaration extends PyNodeBase { 10 + body: PyBlock; 11 + decorators?: ReadonlyArray<PyExpression>; 12 + docstring?: string; 13 + kind: PyNodeKind.FunctionDeclaration; 14 + modifiers?: ReadonlyArray<PyExpression>; 15 + name: string; 16 + parameters: ReadonlyArray<PyFunctionParameter>; 17 + returnType?: PyExpression; 18 + } 19 + 20 + export function createFunctionDeclaration( 21 + name: string, 22 + parameters: ReadonlyArray<PyFunctionParameter>, 23 + returnType: PyExpression | undefined, 24 + body: ReadonlyArray<PyStatement>, 25 + decorators?: ReadonlyArray<PyExpression>, 26 + docstring?: string, 27 + modifiers?: ReadonlyArray<PyExpression>, 28 + leadingComments?: ReadonlyArray<string>, 29 + trailingComments?: ReadonlyArray<string>, 30 + ): PyFunctionDeclaration { 31 + return { 32 + body: createBlock(body), 33 + decorators, 34 + docstring, 35 + kind: PyNodeKind.FunctionDeclaration, 36 + leadingComments, 37 + modifiers, 38 + name, 39 + parameters, 40 + returnType, 41 + trailingComments, 42 + }; 43 + }
+27
packages/openapi-python/src/ts-python/nodes/declarations/functionParameter.ts
··· 1 + import type { PyNodeBase } from '../base'; 2 + import type { PyExpression } from '../expression'; 3 + import { PyNodeKind } from '../kinds'; 4 + 5 + export interface PyFunctionParameter extends PyNodeBase { 6 + annotation?: PyExpression; 7 + defaultValue?: PyExpression; 8 + kind: PyNodeKind.FunctionParameter; 9 + name: string; 10 + } 11 + 12 + export function createFunctionParameter( 13 + name: string, 14 + annotation?: PyExpression, 15 + defaultValue?: PyExpression, 16 + leadingComments?: ReadonlyArray<string>, 17 + trailingComments?: ReadonlyArray<string>, 18 + ): PyFunctionParameter { 19 + return { 20 + annotation, 21 + defaultValue, 22 + kind: PyNodeKind.FunctionParameter, 23 + leadingComments, 24 + name, 25 + trailingComments, 26 + }; 27 + }
+36
packages/openapi-python/src/ts-python/nodes/expression.ts
··· 1 + import type { PyComprehension } from './comprehension'; 2 + import type { PyAsyncExpression } from './expressions/async'; 3 + import type { PyAwaitExpression } from './expressions/await'; 4 + import type { PyBinaryExpression } from './expressions/binary'; 5 + import type { PyCallExpression } from './expressions/call'; 6 + import type { PyDictExpression } from './expressions/dict'; 7 + import type { PyFStringExpression } from './expressions/fString'; 8 + import type { PyGeneratorExpression } from './expressions/generator'; 9 + import type { PyIdentifier } from './expressions/identifier'; 10 + import type { PyLambdaExpression } from './expressions/lambda'; 11 + import type { PyListExpression } from './expressions/list'; 12 + import type { PyLiteral } from './expressions/literal'; 13 + import type { PyMemberExpression } from './expressions/member'; 14 + import type { PySetExpression } from './expressions/set'; 15 + import type { PyTupleExpression } from './expressions/tuple'; 16 + import type { PyYieldExpression } from './expressions/yield'; 17 + import type { PyYieldFromExpression } from './expressions/yieldFrom'; 18 + 19 + export type PyExpression = 20 + | PyAsyncExpression 21 + | PyAwaitExpression 22 + | PyBinaryExpression 23 + | PyCallExpression 24 + | PyComprehension 25 + | PyDictExpression 26 + | PyFStringExpression 27 + | PyGeneratorExpression 28 + | PyIdentifier 29 + | PyLambdaExpression 30 + | PyListExpression 31 + | PyLiteral 32 + | PyMemberExpression 33 + | PySetExpression 34 + | PyTupleExpression 35 + | PyYieldExpression 36 + | PyYieldFromExpression;
+15
packages/openapi-python/src/ts-python/nodes/expressions/async.ts
··· 1 + import type { PyNodeBase } from '../base'; 2 + import type { PyExpression } from '../expression'; 3 + import { PyNodeKind } from '../kinds'; 4 + 5 + export interface PyAsyncExpression extends PyNodeBase { 6 + expression: PyExpression; 7 + kind: PyNodeKind.AsyncExpression; 8 + } 9 + 10 + export function createAsyncExpression(expression: PyExpression): PyAsyncExpression { 11 + return { 12 + expression, 13 + kind: PyNodeKind.AsyncExpression, 14 + }; 15 + }
+15
packages/openapi-python/src/ts-python/nodes/expressions/await.ts
··· 1 + import type { PyNodeBase } from '../base'; 2 + import type { PyExpression } from '../expression'; 3 + import { PyNodeKind } from '../kinds'; 4 + 5 + export interface PyAwaitExpression extends PyNodeBase { 6 + expression: PyExpression; 7 + kind: PyNodeKind.AwaitExpression; 8 + } 9 + 10 + export function createAwaitExpression(expression: PyExpression): PyAwaitExpression { 11 + return { 12 + expression, 13 + kind: PyNodeKind.AwaitExpression, 14 + }; 15 + }
+48
packages/openapi-python/src/ts-python/nodes/expressions/binary.ts
··· 1 + import type { PyNodeBase } from '../base'; 2 + import type { PyExpression } from '../expression'; 3 + import { PyNodeKind } from '../kinds'; 4 + 5 + export type PyBinaryOperator = 6 + | '+' 7 + | '-' 8 + | '*' 9 + | '/' 10 + | '//' 11 + | '%' 12 + | '**' 13 + | '==' 14 + | '!=' 15 + | '>' 16 + | '>=' 17 + | '<' 18 + | '<=' 19 + | 'is' 20 + | 'is not' 21 + | 'in' 22 + | 'not in' 23 + | 'and' 24 + | 'or'; 25 + 26 + export interface PyBinaryExpression extends PyNodeBase { 27 + kind: PyNodeKind.BinaryExpression; 28 + left: PyExpression; 29 + operator: PyBinaryOperator; 30 + right: PyExpression; 31 + } 32 + 33 + export function createBinaryExpression( 34 + left: PyExpression, 35 + operator: PyBinaryOperator, 36 + right: PyExpression, 37 + leadingComments?: ReadonlyArray<string>, 38 + trailingComments?: ReadonlyArray<string>, 39 + ): PyBinaryExpression { 40 + return { 41 + kind: PyNodeKind.BinaryExpression, 42 + leadingComments, 43 + left, 44 + operator, 45 + right, 46 + trailingComments, 47 + }; 48 + }
+24
packages/openapi-python/src/ts-python/nodes/expressions/call.ts
··· 1 + import type { PyNodeBase } from '../base'; 2 + import type { PyExpression } from '../expression'; 3 + import { PyNodeKind } from '../kinds'; 4 + 5 + export interface PyCallExpression extends PyNodeBase { 6 + args: ReadonlyArray<PyExpression>; 7 + callee: PyExpression; 8 + kind: PyNodeKind.CallExpression; 9 + } 10 + 11 + export function createCallExpression( 12 + callee: PyExpression, 13 + args: ReadonlyArray<PyExpression>, 14 + leadingComments?: ReadonlyArray<string>, 15 + trailingComments?: ReadonlyArray<string>, 16 + ): PyCallExpression { 17 + return { 18 + args, 19 + callee, 20 + kind: PyNodeKind.CallExpression, 21 + leadingComments, 22 + trailingComments, 23 + }; 24 + }
+28
packages/openapi-python/src/ts-python/nodes/expressions/comprehensions/dict.ts
··· 1 + import type { PyComprehensionNode } from '../../comprehension'; 2 + import type { PyExpression } from '../../expression'; 3 + import { PyNodeKind } from '../../kinds'; 4 + 5 + export interface PyDictComprehension extends PyComprehensionNode { 6 + key: PyExpression; 7 + kind: PyNodeKind.DictComprehension; 8 + value: PyExpression; 9 + } 10 + 11 + export function createDictComprehension( 12 + key: PyExpression, 13 + value: PyExpression, 14 + target: PyExpression, 15 + iterable: PyExpression, 16 + ifs?: ReadonlyArray<PyExpression>, 17 + isAsync?: boolean, 18 + ): PyDictComprehension { 19 + return { 20 + ifs, 21 + isAsync, 22 + iterable, 23 + key, 24 + kind: PyNodeKind.DictComprehension, 25 + target, 26 + value, 27 + }; 28 + }
+25
packages/openapi-python/src/ts-python/nodes/expressions/comprehensions/list.ts
··· 1 + import type { PyComprehensionNode } from '../../comprehension'; 2 + import type { PyExpression } from '../../expression'; 3 + import { PyNodeKind } from '../../kinds'; 4 + 5 + export interface PyListComprehension extends PyComprehensionNode { 6 + element: PyExpression; 7 + kind: PyNodeKind.ListComprehension; 8 + } 9 + 10 + export function createListComprehension( 11 + element: PyExpression, 12 + target: PyExpression, 13 + iterable: PyExpression, 14 + ifs?: ReadonlyArray<PyExpression>, 15 + isAsync?: boolean, 16 + ): PyListComprehension { 17 + return { 18 + element, 19 + ifs, 20 + isAsync, 21 + iterable, 22 + kind: PyNodeKind.ListComprehension, 23 + target, 24 + }; 25 + }
+25
packages/openapi-python/src/ts-python/nodes/expressions/comprehensions/set.ts
··· 1 + import type { PyComprehensionNode } from '../../comprehension'; 2 + import type { PyExpression } from '../../expression'; 3 + import { PyNodeKind } from '../../kinds'; 4 + 5 + export interface PySetComprehension extends PyComprehensionNode { 6 + element: PyExpression; 7 + kind: PyNodeKind.SetComprehension; 8 + } 9 + 10 + export function createSetComprehension( 11 + element: PyExpression, 12 + target: PyExpression, 13 + iterable: PyExpression, 14 + ifs?: ReadonlyArray<PyExpression>, 15 + isAsync?: boolean, 16 + ): PySetComprehension { 17 + return { 18 + element, 19 + ifs, 20 + isAsync, 21 + iterable, 22 + kind: PyNodeKind.SetComprehension, 23 + target, 24 + }; 25 + }
+20
packages/openapi-python/src/ts-python/nodes/expressions/dict.ts
··· 1 + import type { PyNodeBase } from '../base'; 2 + import type { PyExpression } from '../expression'; 3 + import { PyNodeKind } from '../kinds'; 4 + 5 + export interface PyDictExpression extends PyNodeBase { 6 + entries: ReadonlyArray<{ 7 + key: PyExpression; 8 + value: PyExpression; 9 + }>; 10 + kind: PyNodeKind.DictExpression; 11 + } 12 + 13 + export function createDictExpression( 14 + entries: ReadonlyArray<{ key: PyExpression; value: PyExpression }>, 15 + ): PyDictExpression { 16 + return { 17 + entries, 18 + kind: PyNodeKind.DictExpression, 19 + }; 20 + }
+21
packages/openapi-python/src/ts-python/nodes/expressions/fString.ts
··· 1 + import type { PyNodeBase } from '../base'; 2 + import type { PyExpression } from '../expression'; 3 + import { PyNodeKind } from '../kinds'; 4 + 5 + export interface PyFStringExpression extends PyNodeBase { 6 + kind: PyNodeKind.FStringExpression; 7 + parts: Array<string | PyExpression>; 8 + } 9 + 10 + export function createFStringExpression( 11 + parts: Array<string | PyExpression>, 12 + leadingComments?: ReadonlyArray<string>, 13 + trailingComments?: ReadonlyArray<string>, 14 + ): PyFStringExpression { 15 + return { 16 + kind: PyNodeKind.FStringExpression, 17 + leadingComments, 18 + parts, 19 + trailingComments, 20 + }; 21 + }
+33
packages/openapi-python/src/ts-python/nodes/expressions/generator.ts
··· 1 + import type { PyNodeBase } from '../base'; 2 + import type { PyExpression } from '../expression'; 3 + import { PyNodeKind } from '../kinds'; 4 + 5 + export interface PyGeneratorExpression extends PyNodeBase { 6 + element: PyExpression; 7 + ifs?: ReadonlyArray<PyExpression>; 8 + isAsync?: boolean; 9 + iterable: PyExpression; 10 + kind: PyNodeKind.GeneratorExpression; 11 + target: PyExpression; 12 + } 13 + 14 + export function createGeneratorExpression( 15 + element: PyExpression, 16 + target: PyExpression, 17 + iterable: PyExpression, 18 + ifs?: ReadonlyArray<PyExpression>, 19 + isAsync?: boolean, 20 + leadingComments?: ReadonlyArray<string>, 21 + trailingComments?: ReadonlyArray<string>, 22 + ): PyGeneratorExpression { 23 + return { 24 + element, 25 + ifs, 26 + isAsync, 27 + iterable, 28 + kind: PyNodeKind.GeneratorExpression, 29 + leadingComments, 30 + target, 31 + trailingComments, 32 + }; 33 + }
+20
packages/openapi-python/src/ts-python/nodes/expressions/identifier.ts
··· 1 + import type { PyNodeBase } from '../base'; 2 + import { PyNodeKind } from '../kinds'; 3 + 4 + export interface PyIdentifier extends PyNodeBase { 5 + kind: PyNodeKind.Identifier; 6 + name: string; 7 + } 8 + 9 + export function createIdentifier( 10 + name: string, 11 + leadingComments?: ReadonlyArray<string>, 12 + trailingComments?: ReadonlyArray<string>, 13 + ): PyIdentifier { 14 + return { 15 + kind: PyNodeKind.Identifier, 16 + leadingComments, 17 + name, 18 + trailingComments, 19 + }; 20 + }
+21
packages/openapi-python/src/ts-python/nodes/expressions/lambda.ts
··· 1 + import type { PyNodeBase } from '../base'; 2 + import type { PyFunctionParameter } from '../declarations/functionParameter'; 3 + import type { PyExpression } from '../expression'; 4 + import { PyNodeKind } from '../kinds'; 5 + 6 + export interface PyLambdaExpression extends PyNodeBase { 7 + expression: PyExpression; 8 + kind: PyNodeKind.LambdaExpression; 9 + parameters: ReadonlyArray<PyFunctionParameter>; 10 + } 11 + 12 + export function createLambdaExpression( 13 + parameters: ReadonlyArray<PyFunctionParameter>, 14 + expression: PyExpression, 15 + ): PyLambdaExpression { 16 + return { 17 + expression, 18 + kind: PyNodeKind.LambdaExpression, 19 + parameters, 20 + }; 21 + }
+14
packages/openapi-python/src/ts-python/nodes/expressions/list.ts
··· 1 + import type { PyNode, PyNodeBase } from '../base'; 2 + import { PyNodeKind } from '../kinds'; 3 + 4 + export interface PyListExpression extends PyNodeBase { 5 + elements: ReadonlyArray<PyNode>; 6 + kind: PyNodeKind.ListExpression; 7 + } 8 + 9 + export function createListExpression(elements: ReadonlyArray<PyNode>): PyListExpression { 10 + return { 11 + elements, 12 + kind: PyNodeKind.ListExpression, 13 + }; 14 + }
+22
packages/openapi-python/src/ts-python/nodes/expressions/literal.ts
··· 1 + import type { PyNodeBase } from '../base'; 2 + import { PyNodeKind } from '../kinds'; 3 + 4 + export type LiteralValue = string | number | boolean | null; 5 + 6 + export interface PyLiteral extends PyNodeBase { 7 + kind: PyNodeKind.Literal; 8 + value: LiteralValue; 9 + } 10 + 11 + export function createLiteral( 12 + value: LiteralValue, 13 + leadingComments?: ReadonlyArray<string>, 14 + trailingComments?: ReadonlyArray<string>, 15 + ): PyLiteral { 16 + return { 17 + kind: PyNodeKind.Literal, 18 + leadingComments, 19 + trailingComments, 20 + value, 21 + }; 22 + }
+25
packages/openapi-python/src/ts-python/nodes/expressions/member.ts
··· 1 + import type { PyNodeBase } from '../base'; 2 + import type { PyExpression } from '../expression'; 3 + import { PyNodeKind } from '../kinds'; 4 + import type { PyIdentifier } from './identifier'; 5 + 6 + export interface PyMemberExpression extends PyNodeBase { 7 + kind: PyNodeKind.MemberExpression; 8 + member: PyIdentifier; 9 + object: PyExpression; 10 + } 11 + 12 + export function createMemberExpression( 13 + object: PyExpression, 14 + member: PyIdentifier, 15 + leadingComments?: ReadonlyArray<string>, 16 + trailingComments?: ReadonlyArray<string>, 17 + ): PyMemberExpression { 18 + return { 19 + kind: PyNodeKind.MemberExpression, 20 + leadingComments, 21 + member, 22 + object, 23 + trailingComments, 24 + }; 25 + }
+15
packages/openapi-python/src/ts-python/nodes/expressions/set.ts
··· 1 + import type { PyNodeBase } from '../base'; 2 + import type { PyExpression } from '../expression'; 3 + import { PyNodeKind } from '../kinds'; 4 + 5 + export interface PySetExpression extends PyNodeBase { 6 + elements: ReadonlyArray<PyExpression>; 7 + kind: PyNodeKind.SetExpression; 8 + } 9 + 10 + export function createSetExpression(elements: ReadonlyArray<PyExpression>): PySetExpression { 11 + return { 12 + elements, 13 + kind: PyNodeKind.SetExpression, 14 + }; 15 + }
+15
packages/openapi-python/src/ts-python/nodes/expressions/tuple.ts
··· 1 + import type { PyNodeBase } from '../base'; 2 + import type { PyExpression } from '../expression'; 3 + import { PyNodeKind } from '../kinds'; 4 + 5 + export interface PyTupleExpression extends PyNodeBase { 6 + elements: ReadonlyArray<PyExpression>; 7 + kind: PyNodeKind.TupleExpression; 8 + } 9 + 10 + export function createTupleExpression(elements: ReadonlyArray<PyExpression>): PyTupleExpression { 11 + return { 12 + elements, 13 + kind: PyNodeKind.TupleExpression, 14 + }; 15 + }
+15
packages/openapi-python/src/ts-python/nodes/expressions/yield.ts
··· 1 + import type { PyNodeBase } from '../base'; 2 + import type { PyExpression } from '../expression'; 3 + import { PyNodeKind } from '../kinds'; 4 + 5 + export interface PyYieldExpression extends PyNodeBase { 6 + kind: PyNodeKind.YieldExpression; 7 + value?: PyExpression; 8 + } 9 + 10 + export function createYieldExpression(value?: PyExpression): PyYieldExpression { 11 + return { 12 + kind: PyNodeKind.YieldExpression, 13 + value, 14 + }; 15 + }
+15
packages/openapi-python/src/ts-python/nodes/expressions/yieldFrom.ts
··· 1 + import type { PyNodeBase } from '../base'; 2 + import type { PyExpression } from '../expression'; 3 + import { PyNodeKind } from '../kinds'; 4 + 5 + export interface PyYieldFromExpression extends PyNodeBase { 6 + expression: PyExpression; 7 + kind: PyNodeKind.YieldFromExpression; 8 + } 9 + 10 + export function createYieldFromExpression(expression: PyExpression): PyYieldFromExpression { 11 + return { 12 + expression, 13 + kind: PyNodeKind.YieldFromExpression, 14 + }; 15 + }
+85
packages/openapi-python/src/ts-python/nodes/factory.ts
··· 1 + import { createClassDeclaration } from './declarations/class'; 2 + import { createFunctionDeclaration } from './declarations/function'; 3 + import { createFunctionParameter } from './declarations/functionParameter'; 4 + import { createAsyncExpression } from './expressions/async'; 5 + import { createAwaitExpression } from './expressions/await'; 6 + import { createBinaryExpression } from './expressions/binary'; 7 + import { createCallExpression } from './expressions/call'; 8 + import { createDictComprehension } from './expressions/comprehensions/dict'; 9 + import { createListComprehension } from './expressions/comprehensions/list'; 10 + import { createSetComprehension } from './expressions/comprehensions/set'; 11 + import { createDictExpression } from './expressions/dict'; 12 + import { createFStringExpression } from './expressions/fString'; 13 + import { createGeneratorExpression } from './expressions/generator'; 14 + import { createIdentifier } from './expressions/identifier'; 15 + import { createLambdaExpression } from './expressions/lambda'; 16 + import { createListExpression } from './expressions/list'; 17 + import { createLiteral } from './expressions/literal'; 18 + import { createMemberExpression } from './expressions/member'; 19 + import { createSetExpression } from './expressions/set'; 20 + import { createTupleExpression } from './expressions/tuple'; 21 + import { createYieldExpression } from './expressions/yield'; 22 + import { createYieldFromExpression } from './expressions/yieldFrom'; 23 + import { createAssignment } from './statements/assignment'; 24 + import { createAugmentedAssignment } from './statements/augmentedAssignment'; 25 + import { createBlock } from './statements/block'; 26 + import { createBreakStatement } from './statements/break'; 27 + import { createContinueStatement } from './statements/continue'; 28 + import { createEmptyStatement } from './statements/empty'; 29 + import { createExceptClause } from './statements/except'; 30 + import { createExpressionStatement } from './statements/expression'; 31 + import { createForStatement } from './statements/for'; 32 + import { createIfStatement } from './statements/if'; 33 + import { createImportStatement } from './statements/import'; 34 + import { createRaiseStatement } from './statements/raise'; 35 + import { createReturnStatement } from './statements/return'; 36 + import { createTryStatement } from './statements/try'; 37 + import { createWhileStatement } from './statements/while'; 38 + import { createWithStatement } from './statements/with'; 39 + import { createWithItem } from './statements/withItem'; 40 + import { createComment } from './structure/comment'; 41 + import { createSourceFile } from './structure/sourceFile'; 42 + 43 + export const factory = { 44 + createAssignment, 45 + createAsyncExpression, 46 + createAugmentedAssignment, 47 + createAwaitExpression, 48 + createBinaryExpression, 49 + createBlock, 50 + createBreakStatement, 51 + createCallExpression, 52 + createClassDeclaration, 53 + createComment, 54 + createContinueStatement, 55 + createDictComprehension, 56 + createDictExpression, 57 + createEmptyStatement, 58 + createExceptClause, 59 + createExpressionStatement, 60 + createFStringExpression, 61 + createForStatement, 62 + createFunctionDeclaration, 63 + createFunctionParameter, 64 + createGeneratorExpression, 65 + createIdentifier, 66 + createIfStatement, 67 + createImportStatement, 68 + createLambdaExpression, 69 + createListComprehension, 70 + createListExpression, 71 + createLiteral, 72 + createMemberExpression, 73 + createRaiseStatement, 74 + createReturnStatement, 75 + createSetComprehension, 76 + createSetExpression, 77 + createSourceFile, 78 + createTryStatement, 79 + createTupleExpression, 80 + createWhileStatement, 81 + createWithItem, 82 + createWithStatement, 83 + createYieldExpression, 84 + createYieldFromExpression, 85 + };
+43
packages/openapi-python/src/ts-python/nodes/kinds.ts
··· 1 + export enum PyNodeKind { 2 + Assignment = 'Assignment', 3 + AsyncExpression = 'AsyncExpression', 4 + AugmentedAssignment = 'AugmentedAssignment', 5 + AwaitExpression = 'AwaitExpression', 6 + BinaryExpression = 'BinaryExpression', 7 + Block = 'Block', 8 + BreakStatement = 'BreakStatement', 9 + CallExpression = 'CallExpression', 10 + ClassDeclaration = 'ClassDeclaration', 11 + Comment = 'Comment', 12 + ContinueStatement = 'ContinueStatement', 13 + DictComprehension = 'DictComprehension', 14 + DictExpression = 'DictExpression', 15 + EmptyStatement = 'EmptyStatement', 16 + ExceptClause = 'ExceptClause', 17 + ExpressionStatement = 'ExpressionStatement', 18 + FStringExpression = 'FStringExpression', 19 + ForStatement = 'ForStatement', 20 + FunctionDeclaration = 'FunctionDeclaration', 21 + FunctionParameter = 'FunctionParameter', 22 + GeneratorExpression = 'GeneratorExpression', 23 + Identifier = 'Identifier', 24 + IfStatement = 'IfStatement', 25 + ImportStatement = 'ImportStatement', 26 + LambdaExpression = 'LambdaExpression', 27 + ListComprehension = 'ListComprehension', 28 + ListExpression = 'ListExpression', 29 + Literal = 'Literal', 30 + MemberExpression = 'MemberExpression', 31 + RaiseStatement = 'RaiseStatement', 32 + ReturnStatement = 'ReturnStatement', 33 + SetComprehension = 'SetComprehension', 34 + SetExpression = 'SetExpression', 35 + SourceFile = 'SourceFile', 36 + TryStatement = 'TryStatement', 37 + TupleExpression = 'TupleExpression', 38 + WhileStatement = 'WhileStatement', 39 + WithItem = 'WithItem', 40 + WithStatement = 'WithStatement', 41 + YieldExpression = 'YieldExpression', 42 + YieldFromExpression = 'YieldFromExpression', 43 + }
+36
packages/openapi-python/src/ts-python/nodes/statement.ts
··· 1 + import type { PyClassDeclaration } from './declarations/class'; 2 + import type { PyFunctionDeclaration } from './declarations/function'; 3 + import type { PyAssignment } from './statements/assignment'; 4 + import type { PyAugmentedAssignment } from './statements/augmentedAssignment'; 5 + import type { PyBreakStatement } from './statements/break'; 6 + import type { PyContinueStatement } from './statements/continue'; 7 + import type { PyEmptyStatement } from './statements/empty'; 8 + import type { PyExpressionStatement } from './statements/expression'; 9 + import type { PyForStatement } from './statements/for'; 10 + import type { PyIfStatement } from './statements/if'; 11 + import type { PyImportStatement } from './statements/import'; 12 + import type { PyRaiseStatement } from './statements/raise'; 13 + import type { PyReturnStatement } from './statements/return'; 14 + import type { PyTryStatement } from './statements/try'; 15 + import type { PyWhileStatement } from './statements/while'; 16 + import type { PyWithStatement } from './statements/with'; 17 + import type { PyComment } from './structure/comment'; 18 + 19 + export type PyStatement = 20 + | PyAssignment 21 + | PyAugmentedAssignment 22 + | PyBreakStatement 23 + | PyClassDeclaration 24 + | PyComment 25 + | PyContinueStatement 26 + | PyEmptyStatement 27 + | PyExpressionStatement 28 + | PyForStatement 29 + | PyFunctionDeclaration 30 + | PyIfStatement 31 + | PyImportStatement 32 + | PyRaiseStatement 33 + | PyReturnStatement 34 + | PyTryStatement 35 + | PyWhileStatement 36 + | PyWithStatement;
+24
packages/openapi-python/src/ts-python/nodes/statements/assignment.ts
··· 1 + import type { PyNodeBase } from '../base'; 2 + import type { PyExpression } from '../expression'; 3 + import { PyNodeKind } from '../kinds'; 4 + 5 + export interface PyAssignment extends PyNodeBase { 6 + kind: PyNodeKind.Assignment; 7 + target: PyExpression; 8 + value: PyExpression; 9 + } 10 + 11 + export function createAssignment( 12 + target: PyExpression, 13 + value: PyExpression, 14 + leadingComments?: ReadonlyArray<string>, 15 + trailingComments?: ReadonlyArray<string>, 16 + ): PyAssignment { 17 + return { 18 + kind: PyNodeKind.Assignment, 19 + leadingComments, 20 + target, 21 + trailingComments, 22 + value, 23 + }; 24 + }
+37
packages/openapi-python/src/ts-python/nodes/statements/augmentedAssignment.ts
··· 1 + import type { PyNodeBase } from '../base'; 2 + import type { PyExpression } from '../expression'; 3 + import { PyNodeKind } from '../kinds'; 4 + 5 + export type PyAugmentedOperator = 6 + | '+=' 7 + | '-=' 8 + | '*=' 9 + | '/=' 10 + | '//=' 11 + | '%=' 12 + | '**=' 13 + | '&=' 14 + | '|=' 15 + | '^=' 16 + | '>>=' 17 + | '<<='; 18 + 19 + export interface PyAugmentedAssignment extends PyNodeBase { 20 + kind: PyNodeKind.AugmentedAssignment; 21 + operator: PyAugmentedOperator; 22 + target: PyExpression; 23 + value: PyExpression; 24 + } 25 + 26 + export function createAugmentedAssignment( 27 + target: PyExpression, 28 + operator: PyAugmentedOperator, 29 + value: PyExpression, 30 + ): PyAugmentedAssignment { 31 + return { 32 + kind: PyNodeKind.AugmentedAssignment, 33 + operator, 34 + target, 35 + value, 36 + }; 37 + }
+21
packages/openapi-python/src/ts-python/nodes/statements/block.ts
··· 1 + import type { PyNodeBase } from '../base'; 2 + import { PyNodeKind } from '../kinds'; 3 + import type { PyStatement } from '../statement'; 4 + 5 + export interface PyBlock extends PyNodeBase { 6 + kind: PyNodeKind.Block; 7 + statements: ReadonlyArray<PyStatement>; 8 + } 9 + 10 + export function createBlock( 11 + statements: ReadonlyArray<PyStatement>, 12 + leadingComments?: ReadonlyArray<string>, 13 + trailingComments?: ReadonlyArray<string>, 14 + ): PyBlock { 15 + return { 16 + kind: PyNodeKind.Block, 17 + leadingComments, 18 + statements, 19 + trailingComments, 20 + }; 21 + }
+12
packages/openapi-python/src/ts-python/nodes/statements/break.ts
··· 1 + import type { PyNodeBase } from '../base'; 2 + import { PyNodeKind } from '../kinds'; 3 + 4 + export interface PyBreakStatement extends PyNodeBase { 5 + kind: PyNodeKind.BreakStatement; 6 + } 7 + 8 + export function createBreakStatement(): PyBreakStatement { 9 + return { 10 + kind: PyNodeKind.BreakStatement, 11 + }; 12 + }
+12
packages/openapi-python/src/ts-python/nodes/statements/continue.ts
··· 1 + import type { PyNodeBase } from '../base'; 2 + import { PyNodeKind } from '../kinds'; 3 + 4 + export interface PyContinueStatement extends PyNodeBase { 5 + kind: PyNodeKind.ContinueStatement; 6 + } 7 + 8 + export function createContinueStatement(): PyContinueStatement { 9 + return { 10 + kind: PyNodeKind.ContinueStatement, 11 + }; 12 + }
+12
packages/openapi-python/src/ts-python/nodes/statements/empty.ts
··· 1 + import type { PyNodeBase } from '../base'; 2 + import { PyNodeKind } from '../kinds'; 3 + 4 + export interface PyEmptyStatement extends PyNodeBase { 5 + kind: PyNodeKind.EmptyStatement; 6 + } 7 + 8 + export function createEmptyStatement(): PyEmptyStatement { 9 + return { 10 + kind: PyNodeKind.EmptyStatement, 11 + }; 12 + }
+26
packages/openapi-python/src/ts-python/nodes/statements/except.ts
··· 1 + import type { PyNodeBase } from '../base'; 2 + import type { PyExpression } from '../expression'; 3 + import type { PyIdentifier } from '../expressions/identifier'; 4 + import { PyNodeKind } from '../kinds'; 5 + import type { PyStatement } from '../statement'; 6 + import { createBlock, type PyBlock } from './block'; 7 + 8 + export interface PyExceptClause extends PyNodeBase { 9 + block: PyBlock; 10 + exceptionName?: PyIdentifier; 11 + exceptionType?: PyExpression; 12 + kind: PyNodeKind.ExceptClause; 13 + } 14 + 15 + export function createExceptClause( 16 + block: ReadonlyArray<PyStatement>, 17 + exceptionType?: PyExpression, 18 + exceptionName?: PyIdentifier, 19 + ): PyExceptClause { 20 + return { 21 + block: createBlock(block), 22 + exceptionName, 23 + exceptionType, 24 + kind: PyNodeKind.ExceptClause, 25 + }; 26 + }
+15
packages/openapi-python/src/ts-python/nodes/statements/expression.ts
··· 1 + import type { PyNodeBase } from '../base'; 2 + import type { PyExpression } from '../expression'; 3 + import { PyNodeKind } from '../kinds'; 4 + 5 + export interface PyExpressionStatement extends PyNodeBase { 6 + expression: PyExpression; 7 + kind: PyNodeKind.ExpressionStatement; 8 + } 9 + 10 + export function createExpressionStatement(expression: PyExpression): PyExpressionStatement { 11 + return { 12 + expression, 13 + kind: PyNodeKind.ExpressionStatement, 14 + }; 15 + }
+29
packages/openapi-python/src/ts-python/nodes/statements/for.ts
··· 1 + import type { PyNodeBase } from '../base'; 2 + import type { PyExpression } from '../expression'; 3 + import { PyNodeKind } from '../kinds'; 4 + import type { PyStatement } from '../statement'; 5 + import type { PyBlock } from './block'; 6 + import { createBlock } from './block'; 7 + 8 + export interface PyForStatement extends PyNodeBase { 9 + body: PyBlock; 10 + elseBlock?: PyBlock; 11 + iterable: PyExpression; 12 + kind: PyNodeKind.ForStatement; 13 + target: PyExpression; 14 + } 15 + 16 + export function createForStatement( 17 + target: PyExpression, 18 + iterable: PyExpression, 19 + body: ReadonlyArray<PyStatement>, 20 + elseBlock?: ReadonlyArray<PyStatement>, 21 + ): PyForStatement { 22 + return { 23 + body: createBlock(body), 24 + elseBlock: elseBlock ? createBlock(elseBlock) : undefined, 25 + iterable, 26 + kind: PyNodeKind.ForStatement, 27 + target, 28 + }; 29 + }
+29
packages/openapi-python/src/ts-python/nodes/statements/if.ts
··· 1 + import type { PyNodeBase } from '../base'; 2 + import type { PyExpression } from '../expression'; 3 + import { PyNodeKind } from '../kinds'; 4 + import type { PyStatement } from '../statement'; 5 + import { createBlock, type PyBlock } from './block'; 6 + 7 + export interface PyIfStatement extends PyNodeBase { 8 + condition: PyExpression; 9 + elseBlock?: PyBlock | PyIfStatement; 10 + kind: PyNodeKind.IfStatement; 11 + thenBlock: PyBlock; 12 + } 13 + 14 + export function createIfStatement( 15 + condition: PyExpression, 16 + thenBlock: ReadonlyArray<PyStatement>, 17 + elseBlock?: ReadonlyArray<PyStatement> | PyIfStatement, 18 + leadingComments?: ReadonlyArray<string>, 19 + trailingComments?: ReadonlyArray<string>, 20 + ): PyIfStatement { 21 + return { 22 + condition, 23 + elseBlock: elseBlock instanceof Array ? createBlock(elseBlock) : elseBlock, 24 + kind: PyNodeKind.IfStatement, 25 + leadingComments, 26 + thenBlock: createBlock(thenBlock), 27 + trailingComments, 28 + }; 29 + }
+22
packages/openapi-python/src/ts-python/nodes/statements/import.ts
··· 1 + import type { PyNodeBase } from '../base'; 2 + import { PyNodeKind } from '../kinds'; 3 + 4 + export interface PyImportStatement extends PyNodeBase { 5 + isFrom: boolean; 6 + kind: PyNodeKind.ImportStatement; 7 + module: string; 8 + names?: ReadonlyArray<{ alias?: string; name: string }>; 9 + } 10 + 11 + export function createImportStatement( 12 + module: string, 13 + names?: ReadonlyArray<{ alias?: string; name: string }>, 14 + isFrom: boolean = false, 15 + ): PyImportStatement { 16 + return { 17 + isFrom, 18 + kind: PyNodeKind.ImportStatement, 19 + module, 20 + names, 21 + }; 22 + }
+15
packages/openapi-python/src/ts-python/nodes/statements/raise.ts
··· 1 + import type { PyNodeBase } from '../base'; 2 + import type { PyExpression } from '../expression'; 3 + import { PyNodeKind } from '../kinds'; 4 + 5 + export interface PyRaiseStatement extends PyNodeBase { 6 + expression?: PyExpression; 7 + kind: PyNodeKind.RaiseStatement; 8 + } 9 + 10 + export function createRaiseStatement(expression?: PyExpression): PyRaiseStatement { 11 + return { 12 + expression, 13 + kind: PyNodeKind.RaiseStatement, 14 + }; 15 + }
+15
packages/openapi-python/src/ts-python/nodes/statements/return.ts
··· 1 + import type { PyNodeBase } from '../base'; 2 + import type { PyExpression } from '../expression'; 3 + import { PyNodeKind } from '../kinds'; 4 + 5 + export interface PyReturnStatement extends PyNodeBase { 6 + expression?: PyExpression; 7 + kind: PyNodeKind.ReturnStatement; 8 + } 9 + 10 + export function createReturnStatement(expression?: PyExpression): PyReturnStatement { 11 + return { 12 + expression, 13 + kind: PyNodeKind.ReturnStatement, 14 + }; 15 + }
+28
packages/openapi-python/src/ts-python/nodes/statements/try.ts
··· 1 + import type { PyNodeBase } from '../base'; 2 + import { PyNodeKind } from '../kinds'; 3 + import type { PyStatement } from '../statement'; 4 + import { createBlock, type PyBlock } from './block'; 5 + import type { PyExceptClause } from './except'; 6 + 7 + export interface PyTryStatement extends PyNodeBase { 8 + elseBlock?: PyBlock; 9 + exceptClauses?: ReadonlyArray<PyExceptClause>; 10 + finallyBlock?: PyBlock; 11 + kind: PyNodeKind.TryStatement; 12 + tryBlock: PyBlock; 13 + } 14 + 15 + export function createTryStatement( 16 + tryBlock: ReadonlyArray<PyStatement>, 17 + exceptClauses?: ReadonlyArray<PyExceptClause>, 18 + elseBlock?: ReadonlyArray<PyStatement>, 19 + finallyBlock?: ReadonlyArray<PyStatement>, 20 + ): PyTryStatement { 21 + return { 22 + elseBlock: elseBlock ? createBlock(elseBlock) : undefined, 23 + exceptClauses, 24 + finallyBlock: finallyBlock ? createBlock(finallyBlock) : undefined, 25 + kind: PyNodeKind.TryStatement, 26 + tryBlock: createBlock(tryBlock), 27 + }; 28 + }
+26
packages/openapi-python/src/ts-python/nodes/statements/while.ts
··· 1 + import type { PyNodeBase } from '../base'; 2 + import type { PyExpression } from '../expression'; 3 + import { PyNodeKind } from '../kinds'; 4 + import type { PyStatement } from '../statement'; 5 + import type { PyBlock } from './block'; 6 + import { createBlock } from './block'; 7 + 8 + export interface PyWhileStatement extends PyNodeBase { 9 + body: PyBlock; 10 + condition: PyExpression; 11 + elseBlock?: PyBlock; 12 + kind: PyNodeKind.WhileStatement; 13 + } 14 + 15 + export function createWhileStatement( 16 + condition: PyExpression, 17 + body: ReadonlyArray<PyStatement>, 18 + elseBlock?: ReadonlyArray<PyStatement>, 19 + ): PyWhileStatement { 20 + return { 21 + body: createBlock(body), 22 + condition, 23 + elseBlock: elseBlock ? createBlock(elseBlock) : undefined, 24 + kind: PyNodeKind.WhileStatement, 25 + }; 26 + }
+30
packages/openapi-python/src/ts-python/nodes/statements/with.ts
··· 1 + import type { PyNodeBase } from '../base'; 2 + import type { PyExpression } from '../expression'; 3 + import { PyNodeKind } from '../kinds'; 4 + import type { PyStatement } from '../statement'; 5 + import { createBlock, type PyBlock } from './block'; 6 + import type { PyWithItem } from './withItem'; 7 + 8 + export interface PyWithStatement extends PyNodeBase { 9 + body: PyBlock; 10 + items: ReadonlyArray<PyWithItem>; 11 + kind: PyNodeKind.WithStatement; 12 + modifiers?: ReadonlyArray<PyExpression>; 13 + } 14 + 15 + export function createWithStatement( 16 + items: ReadonlyArray<PyWithItem>, 17 + body: ReadonlyArray<PyStatement>, 18 + modifiers?: ReadonlyArray<PyExpression>, 19 + leadingComments?: ReadonlyArray<string>, 20 + trailingComments?: ReadonlyArray<string>, 21 + ): PyWithStatement { 22 + return { 23 + body: createBlock(body), 24 + items, 25 + kind: PyNodeKind.WithStatement, 26 + leadingComments, 27 + modifiers, 28 + trailingComments, 29 + }; 30 + }
+24
packages/openapi-python/src/ts-python/nodes/statements/withItem.ts
··· 1 + import type { PyNodeBase } from '../base'; 2 + import type { PyExpression } from '../expression'; 3 + import { PyNodeKind } from '../kinds'; 4 + 5 + export interface PyWithItem extends PyNodeBase { 6 + alias?: PyExpression; 7 + contextExpr: PyExpression; 8 + kind: PyNodeKind.WithItem; 9 + } 10 + 11 + export function createWithItem( 12 + contextExpr: PyExpression, 13 + alias?: PyExpression, 14 + leadingComments?: ReadonlyArray<string>, 15 + trailingComments?: ReadonlyArray<string>, 16 + ): PyWithItem { 17 + return { 18 + alias, 19 + contextExpr, 20 + kind: PyNodeKind.WithItem, 21 + leadingComments, 22 + trailingComments, 23 + }; 24 + }
+14
packages/openapi-python/src/ts-python/nodes/structure/comment.ts
··· 1 + import type { PyNodeBase } from '../base'; 2 + import { PyNodeKind } from '../kinds'; 3 + 4 + export interface PyComment extends PyNodeBase { 5 + kind: PyNodeKind.Comment; 6 + text: string; 7 + } 8 + 9 + export function createComment(text: string): PyComment { 10 + return { 11 + kind: PyNodeKind.Comment, 12 + text, 13 + }; 14 + }
+23
packages/openapi-python/src/ts-python/nodes/structure/sourceFile.ts
··· 1 + import type { PyNode, PyNodeBase } from '../base'; 2 + import { PyNodeKind } from '../kinds'; 3 + 4 + export interface PySourceFile extends PyNodeBase { 5 + docstring?: string; 6 + kind: PyNodeKind.SourceFile; 7 + statements: ReadonlyArray<PyNode>; 8 + } 9 + 10 + export function createSourceFile( 11 + statements: ReadonlyArray<PyNode>, 12 + docstring?: string, 13 + leadingComments?: ReadonlyArray<string>, 14 + trailingComments?: ReadonlyArray<string>, 15 + ): PySourceFile { 16 + return { 17 + docstring, 18 + kind: PyNodeKind.SourceFile, 19 + leadingComments, 20 + statements, 21 + trailingComments, 22 + }; 23 + }
+403
packages/openapi-python/src/ts-python/printer.ts
··· 1 + import type { PyNode } from './nodes/base'; 2 + import { PyNodeKind } from './nodes/kinds'; 3 + 4 + export interface PyPrinterOptions { 5 + indentSize?: number; 6 + } 7 + 8 + export function createPrinter(options?: PyPrinterOptions) { 9 + const indentSize = options?.indentSize ?? 4; 10 + 11 + let indentLevel = 0; 12 + 13 + function processComments( 14 + parts: Array<string>, 15 + lines: ReadonlyArray<string>, 16 + indent?: boolean, 17 + ): void { 18 + if (indent) indentLevel += 1; 19 + parts.push(...lines.map((line) => printLine(`# ${line}`))); 20 + if (indent) indentLevel -= 1; 21 + } 22 + 23 + function printLine(line: string): string { 24 + return ' '.repeat(indentLevel * indentSize) + line; 25 + } 26 + 27 + function printNode(node: PyNode): string { 28 + const parts: Array<string> = []; 29 + 30 + if (node.leadingComments) { 31 + processComments(parts, node.leadingComments); 32 + } 33 + 34 + let indentTrailingComments = false; 35 + 36 + switch (node.kind) { 37 + case PyNodeKind.Assignment: 38 + parts.push(printLine(`${printNode(node.target)} = ${printNode(node.value)}`)); 39 + break; 40 + 41 + case PyNodeKind.AsyncExpression: 42 + parts.push(`async ${printNode(node.expression)}`); 43 + break; 44 + 45 + case PyNodeKind.AugmentedAssignment: 46 + parts.push( 47 + printLine(`${printNode(node.target)} ${node.operator} ${printNode(node.value)}`), 48 + ); 49 + break; 50 + 51 + case PyNodeKind.AwaitExpression: 52 + parts.push(`await ${printNode(node.expression)}`); 53 + break; 54 + 55 + case PyNodeKind.BinaryExpression: 56 + parts.push(`${printNode(node.left)} ${node.operator} ${printNode(node.right)}`); 57 + break; 58 + 59 + case PyNodeKind.Block: 60 + indentLevel += 1; 61 + if (node.statements.length) { 62 + parts.push(...node.statements.map(printNode)); 63 + } else { 64 + parts.push(printLine('pass')); 65 + } 66 + indentLevel -= 1; 67 + break; 68 + 69 + case PyNodeKind.BreakStatement: 70 + parts.push(printLine('break')); 71 + break; 72 + 73 + case PyNodeKind.CallExpression: 74 + parts.push(`${printNode(node.callee)}(${node.args.map(printNode).join(', ')})`); 75 + break; 76 + 77 + case PyNodeKind.ClassDeclaration: { 78 + indentTrailingComments = true; 79 + if (node.decorators) { 80 + parts.push(...node.decorators.map((decorator) => printLine(`@${printNode(decorator)}`))); 81 + } 82 + const bases = node.baseClasses?.length 83 + ? `(${node.baseClasses.map(printNode).join(', ')})` 84 + : ''; 85 + parts.push(printLine(`class ${node.name}${bases}:`)); 86 + if (node.docstring) { 87 + indentLevel += 1; 88 + parts.push(printLine(`"""${node.docstring}"""`), ''); 89 + indentLevel -= 1; 90 + } 91 + parts.push(printNode(node.body)); 92 + break; 93 + } 94 + 95 + case PyNodeKind.Comment: 96 + parts.push(printLine(`# ${node.text}`)); 97 + break; 98 + 99 + case PyNodeKind.ContinueStatement: 100 + parts.push(printLine('continue')); 101 + break; 102 + 103 + case PyNodeKind.DictComprehension: { 104 + const asyncPrefix = node.isAsync ? 'async ' : ''; 105 + const children: Array<string> = [ 106 + `${printNode(node.key)}: ${printNode(node.value)} ${asyncPrefix}for ${printNode(node.target)} in ${printNode(node.iterable)}`, 107 + ]; 108 + if (node.ifs) { 109 + for (const condition of node.ifs) { 110 + children.push(`if ${printNode(condition)}`); 111 + } 112 + } 113 + parts.push(`{${children.join(' ')}}`); 114 + break; 115 + } 116 + 117 + case PyNodeKind.DictExpression: { 118 + const entries = node.entries 119 + .map(({ key, value }) => `${printNode(key)}: ${printNode(value)}`) 120 + .join(', '); 121 + parts.push(`{${entries}}`); 122 + break; 123 + } 124 + 125 + case PyNodeKind.EmptyStatement: 126 + parts.push(''); 127 + break; 128 + 129 + case PyNodeKind.ExpressionStatement: 130 + parts.push(printLine(printNode(node.expression))); 131 + break; 132 + 133 + case PyNodeKind.ForStatement: 134 + parts.push(printLine(`for ${printNode(node.target)} in ${printNode(node.iterable)}:`)); 135 + parts.push(printNode(node.body)); 136 + if (node.elseBlock) { 137 + parts.push(`${printLine('else:')}`); 138 + parts.push(`${printNode(node.elseBlock)}`); 139 + } 140 + break; 141 + 142 + case PyNodeKind.FStringExpression: { 143 + const children = node.parts.map((part) => 144 + typeof part === 'string' ? part : `{${printNode(part)}}`, 145 + ); 146 + parts.push(`f"${children.join('')}"`); 147 + break; 148 + } 149 + 150 + case PyNodeKind.FunctionDeclaration: { 151 + if (node.decorators) { 152 + parts.push(...node.decorators.map((decorator) => printLine(`@${printNode(decorator)}`))); 153 + } 154 + const modifiers = node.modifiers?.map(printNode).join(' ') ?? ''; 155 + const defPrefix = modifiers ? `${modifiers} def` : 'def'; 156 + const parameters = node.parameters.map((parameter) => { 157 + const children: Array<string> = [parameter.name]; 158 + if (parameter.annotation) children.push(`: ${printNode(parameter.annotation)}`); 159 + if (parameter.defaultValue) children.push(` = ${printNode(parameter.defaultValue)}`); 160 + return children.join(''); 161 + }); 162 + const returnAnnotation = node.returnType ? ` -> ${printNode(node.returnType)}` : ''; 163 + parts.push( 164 + printLine(`${defPrefix} ${node.name}(${parameters.join(', ')})${returnAnnotation}:`), 165 + ); 166 + if (node.docstring) { 167 + indentLevel += 1; 168 + parts.push(printLine(`"""${node.docstring}"""`), ''); 169 + indentLevel -= 1; 170 + } 171 + parts.push(printNode(node.body)); 172 + break; 173 + } 174 + 175 + case PyNodeKind.GeneratorExpression: { 176 + const asyncPrefix = node.isAsync ? 'async ' : ''; 177 + const children: Array<string> = [ 178 + `${printNode(node.element)} ${asyncPrefix}for ${printNode(node.target)} in ${printNode(node.iterable)}`, 179 + ]; 180 + if (node.ifs) { 181 + for (const condition of node.ifs) { 182 + children.push(`if ${printNode(condition)}`); 183 + } 184 + } 185 + parts.push(`(${children.join(' ')})`); 186 + break; 187 + } 188 + 189 + case PyNodeKind.Identifier: 190 + parts.push(node.name); 191 + break; 192 + 193 + case PyNodeKind.IfStatement: 194 + parts.push(printLine(`if ${printNode(node.condition)}:`)); 195 + parts.push(`${printNode(node.thenBlock)}`); 196 + if (node.elseBlock) { 197 + parts.push(`${printLine('else:')}`); 198 + parts.push(`${printNode(node.elseBlock)}`); 199 + } 200 + break; 201 + 202 + case PyNodeKind.ImportStatement: { 203 + const fromPrefix = node.isFrom ? `from ${node.module} ` : ''; 204 + if (fromPrefix) { 205 + if (node.names && node.names.length > 0) { 206 + const imports = node.names 207 + .map(({ alias, name }) => (alias ? `${name} as ${alias}` : name)) 208 + .join(', '); 209 + parts.push(printLine(`${fromPrefix}import ${imports}`)); 210 + } else { 211 + parts.push(printLine(`${fromPrefix}import *`)); 212 + } 213 + } else { 214 + if (node.names && node.names.length > 0) { 215 + const imports = node.names 216 + .map(({ alias, name }) => (alias ? `${name} as ${alias}` : name)) 217 + .join(', '); 218 + parts.push(printLine(`import ${imports}`)); 219 + } else { 220 + parts.push(printLine(`import ${node.module}`)); 221 + } 222 + } 223 + break; 224 + } 225 + 226 + case PyNodeKind.LambdaExpression: { 227 + const parameters = node.parameters.map((parameter) => { 228 + const children: Array<string> = [parameter.name]; 229 + if (parameter.annotation) children.push(`: ${printNode(parameter.annotation)}`); 230 + if (parameter.defaultValue) children.push(` = ${printNode(parameter.defaultValue)}`); 231 + return children.join(''); 232 + }); 233 + parts.push(`lambda ${parameters.join(', ')}: ${printNode(node.expression)}`); 234 + break; 235 + } 236 + 237 + case PyNodeKind.ListComprehension: { 238 + const asyncPrefix = node.isAsync ? 'async ' : ''; 239 + const children: Array<string> = [ 240 + `${printNode(node.element)} ${asyncPrefix}for ${printNode(node.target)} in ${printNode(node.iterable)}`, 241 + ]; 242 + if (node.ifs) { 243 + for (const condition of node.ifs) { 244 + children.push(`if ${printNode(condition)}`); 245 + } 246 + } 247 + parts.push(`[${children.join(' ')}]`); 248 + break; 249 + } 250 + 251 + case PyNodeKind.ListExpression: 252 + parts.push(`[${node.elements.map(printNode).join(', ')}]`); 253 + break; 254 + 255 + case PyNodeKind.Literal: 256 + if (typeof node.value === 'string') { 257 + parts.push(`"${node.value}"`); 258 + } else if (typeof node.value === 'boolean') { 259 + parts.push(node.value ? 'True' : 'False'); 260 + } else if (node.value === null) { 261 + parts.push('None'); 262 + } else { 263 + parts.push(String(node.value)); 264 + } 265 + break; 266 + 267 + case PyNodeKind.MemberExpression: 268 + parts.push(`${printNode(node.object)}.${printNode(node.member)}`); 269 + break; 270 + 271 + case PyNodeKind.RaiseStatement: 272 + if (node.expression) { 273 + parts.push(printLine(`raise ${printNode(node.expression)}`)); 274 + } else { 275 + parts.push(printLine('raise')); 276 + } 277 + break; 278 + 279 + case PyNodeKind.ReturnStatement: 280 + if (node.expression) { 281 + parts.push(printLine(`return ${printNode(node.expression)}`)); 282 + } else { 283 + parts.push(printLine('return')); 284 + } 285 + break; 286 + 287 + case PyNodeKind.SetComprehension: { 288 + const asyncPrefix = node.isAsync ? 'async ' : ''; 289 + const children: Array<string> = [ 290 + `${printNode(node.element)} ${asyncPrefix}for ${printNode(node.target)} in ${printNode(node.iterable)}`, 291 + ]; 292 + if (node.ifs) { 293 + for (const condition of node.ifs) { 294 + children.push(`if ${printNode(condition)}`); 295 + } 296 + } 297 + parts.push(`{${children.join(' ')}}`); 298 + break; 299 + } 300 + 301 + case PyNodeKind.SetExpression: { 302 + if (!node.elements.length) { 303 + parts.push('set()'); 304 + } else { 305 + parts.push(`{${node.elements.map(printNode).join(', ')}}`); 306 + } 307 + break; 308 + } 309 + 310 + case PyNodeKind.SourceFile: 311 + if (node.docstring) { 312 + parts.push(printLine(`"""${node.docstring}"""`), ''); 313 + } 314 + parts.push(...node.statements.map(printNode)); 315 + break; 316 + 317 + case PyNodeKind.TryStatement: { 318 + parts.push(printLine('try:'), printNode(node.tryBlock)); 319 + if (node.exceptClauses) { 320 + for (const clause of node.exceptClauses) { 321 + const type = clause.exceptionType ? ` ${printNode(clause.exceptionType)}` : ''; 322 + const name = clause.exceptionName ? ` as ${printNode(clause.exceptionName)}` : ''; 323 + parts.push(printLine(`except${type}${name}:`), printNode(clause.block)); 324 + } 325 + } 326 + if (node.elseBlock) { 327 + parts.push(printLine(`else:`), printNode(node.elseBlock)); 328 + } 329 + if (node.finallyBlock) { 330 + parts.push(printLine(`finally:`), printNode(node.finallyBlock)); 331 + } 332 + break; 333 + } 334 + 335 + case PyNodeKind.TupleExpression: { 336 + // Single-element tuple needs trailing comma 337 + const trailingComma = node.elements.length === 1 ? ',' : ''; 338 + parts.push(`(${node.elements.map(printNode).join(', ')}${trailingComma})`); 339 + break; 340 + } 341 + 342 + case PyNodeKind.WhileStatement: { 343 + parts.push(printLine(`while ${printNode(node.condition)}:`)); 344 + parts.push(printNode(node.body)); 345 + if (node.elseBlock) { 346 + parts.push(`${printLine('else:')}`); 347 + parts.push(`${printNode(node.elseBlock)}`); 348 + } 349 + break; 350 + } 351 + 352 + case PyNodeKind.WithStatement: { 353 + const modifiers = node.modifiers?.map(printNode).join(' ') ?? ''; 354 + const withPrefix = modifiers ? `${modifiers} with` : 'with'; 355 + const items = node.items 356 + .map((item) => 357 + item.alias 358 + ? `${printNode(item.contextExpr)} as ${printNode(item.alias)}` 359 + : printNode(item.contextExpr), 360 + ) 361 + .join(', '); 362 + parts.push(printLine(`${withPrefix} ${items}:`)); 363 + parts.push(printNode(node.body)); 364 + break; 365 + } 366 + 367 + case PyNodeKind.YieldExpression: 368 + if (node.value) { 369 + parts.push(`yield ${printNode(node.value)}`); 370 + } else { 371 + parts.push('yield'); 372 + } 373 + break; 374 + 375 + case PyNodeKind.YieldFromExpression: 376 + parts.push(`yield from ${printNode(node.expression)}`); 377 + break; 378 + 379 + default: 380 + // @ts-expect-error 381 + throw new Error(`Unsupported node kind: ${node.kind}`); 382 + } 383 + 384 + if (node.trailingComments) { 385 + processComments(parts, node.trailingComments, indentTrailingComments); 386 + } 387 + 388 + return parts.join('\n'); 389 + } 390 + 391 + function printFile(node: PyNode): string { 392 + const parts: Array<string> = [printNode(node), '']; 393 + return parts.join('\n'); 394 + } 395 + 396 + return { 397 + printFile, 398 + }; 399 + } 400 + 401 + export function printAst(node: PyNode): string { 402 + return JSON.stringify(node, null, 2); 403 + }
+23
pyproject.toml
··· 1 + [project] 2 + name = "hey-api-dev" 3 + version = "0.0.0" 4 + requires-python = ">=3.10" 5 + 6 + [dependency-groups] 7 + dev = ["mypy>=1.15", "ruff>=0.11"] 8 + 9 + [tool.mypy] 10 + python_version = "3.10" 11 + strict = false 12 + warn_return_any = true 13 + warn_unused_configs = true 14 + 15 + [tool.ruff] 16 + line-length = 120 17 + target-version = "py310" 18 + 19 + [tool.ruff.format] 20 + exclude = ["**/__snapshots__/**"] 21 + 22 + [tool.ruff.lint] 23 + select = ["E", "F", "W", "I"]
+8 -1
turbo.json
··· 41 41 }, 42 42 "typecheck": { 43 43 "dependsOn": ["^build"], 44 - "inputs": ["src/**", "test/**", "*.config.*", "package.json", "tsconfig.json"] 44 + "inputs": [ 45 + "src/**", 46 + "test/**", 47 + "*.config.*", 48 + "package.json", 49 + "tsconfig.json", 50 + "pyproject.toml" 51 + ] 45 52 } 46 53 } 47 54 }
+248
uv.lock
··· 1 + version = 1 2 + revision = 3 3 + requires-python = ">=3.10" 4 + 5 + [[package]] 6 + name = "hey-api-dev" 7 + version = "0.0.0" 8 + source = { virtual = "." } 9 + 10 + [package.dev-dependencies] 11 + dev = [ 12 + { name = "mypy" }, 13 + { name = "ruff" }, 14 + ] 15 + 16 + [package.metadata] 17 + 18 + [package.metadata.requires-dev] 19 + dev = [ 20 + { name = "mypy", specifier = ">=1.15" }, 21 + { name = "ruff", specifier = ">=0.11" }, 22 + ] 23 + 24 + [[package]] 25 + name = "librt" 26 + version = "0.7.8" 27 + source = { registry = "https://pypi.org/simple" } 28 + sdist = { url = "https://files.pythonhosted.org/packages/e7/24/5f3646ff414285e0f7708fa4e946b9bf538345a41d1c375c439467721a5e/librt-0.7.8.tar.gz", hash = "sha256:1a4ede613941d9c3470b0368be851df6bb78ab218635512d0370b27a277a0862", size = 148323, upload-time = "2026-01-14T12:56:16.876Z" } 29 + wheels = [ 30 + { url = "https://files.pythonhosted.org/packages/44/13/57b06758a13550c5f09563893b004f98e9537ee6ec67b7df85c3571c8832/librt-0.7.8-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:b45306a1fc5f53c9330fbee134d8b3227fe5da2ab09813b892790400aa49352d", size = 56521, upload-time = "2026-01-14T12:54:40.066Z" }, 31 + { url = "https://files.pythonhosted.org/packages/c2/24/bbea34d1452a10612fb45ac8356f95351ba40c2517e429602160a49d1fd0/librt-0.7.8-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:864c4b7083eeee250ed55135d2127b260d7eb4b5e953a9e5df09c852e327961b", size = 58456, upload-time = "2026-01-14T12:54:41.471Z" }, 32 + { url = "https://files.pythonhosted.org/packages/04/72/a168808f92253ec3a810beb1eceebc465701197dbc7e865a1c9ceb3c22c7/librt-0.7.8-cp310-cp310-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:6938cc2de153bc927ed8d71c7d2f2ae01b4e96359126c602721340eb7ce1a92d", size = 164392, upload-time = "2026-01-14T12:54:42.843Z" }, 33 + { url = "https://files.pythonhosted.org/packages/14/5c/4c0d406f1b02735c2e7af8ff1ff03a6577b1369b91aa934a9fa2cc42c7ce/librt-0.7.8-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:66daa6ac5de4288a5bbfbe55b4caa7bf0cd26b3269c7a476ffe8ce45f837f87d", size = 172959, upload-time = "2026-01-14T12:54:44.602Z" }, 34 + { url = "https://files.pythonhosted.org/packages/82/5f/3e85351c523f73ad8d938989e9a58c7f59fb9c17f761b9981b43f0025ce7/librt-0.7.8-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4864045f49dc9c974dadb942ac56a74cd0479a2aafa51ce272c490a82322ea3c", size = 186717, upload-time = "2026-01-14T12:54:45.986Z" }, 35 + { url = "https://files.pythonhosted.org/packages/08/f8/18bfe092e402d00fe00d33aa1e01dda1bd583ca100b393b4373847eade6d/librt-0.7.8-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:a36515b1328dc5b3ffce79fe204985ca8572525452eacabee2166f44bb387b2c", size = 184585, upload-time = "2026-01-14T12:54:47.139Z" }, 36 + { url = "https://files.pythonhosted.org/packages/4e/fc/f43972ff56fd790a9fa55028a52ccea1875100edbb856b705bd393b601e3/librt-0.7.8-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:b7e7f140c5169798f90b80d6e607ed2ba5059784968a004107c88ad61fb3641d", size = 180497, upload-time = "2026-01-14T12:54:48.946Z" }, 37 + { url = "https://files.pythonhosted.org/packages/e1/3a/25e36030315a410d3ad0b7d0f19f5f188e88d1613d7d3fd8150523ea1093/librt-0.7.8-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:ff71447cb778a4f772ddc4ce360e6ba9c95527ed84a52096bd1bbf9fee2ec7c0", size = 200052, upload-time = "2026-01-14T12:54:50.382Z" }, 38 + { url = "https://files.pythonhosted.org/packages/fc/b8/f3a5a1931ae2a6ad92bf6893b9ef44325b88641d58723529e2c2935e8abe/librt-0.7.8-cp310-cp310-win32.whl", hash = "sha256:047164e5f68b7a8ebdf9fae91a3c2161d3192418aadd61ddd3a86a56cbe3dc85", size = 43477, upload-time = "2026-01-14T12:54:51.815Z" }, 39 + { url = "https://files.pythonhosted.org/packages/fe/91/c4202779366bc19f871b4ad25db10fcfa1e313c7893feb942f32668e8597/librt-0.7.8-cp310-cp310-win_amd64.whl", hash = "sha256:d6f254d096d84156a46a84861183c183d30734e52383602443292644d895047c", size = 49806, upload-time = "2026-01-14T12:54:53.149Z" }, 40 + { url = "https://files.pythonhosted.org/packages/1b/a3/87ea9c1049f2c781177496ebee29430e4631f439b8553a4969c88747d5d8/librt-0.7.8-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:ff3e9c11aa260c31493d4b3197d1e28dd07768594a4f92bec4506849d736248f", size = 56507, upload-time = "2026-01-14T12:54:54.156Z" }, 41 + { url = "https://files.pythonhosted.org/packages/5e/4a/23bcef149f37f771ad30203d561fcfd45b02bc54947b91f7a9ac34815747/librt-0.7.8-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:ddb52499d0b3ed4aa88746aaf6f36a08314677d5c346234c3987ddc506404eac", size = 58455, upload-time = "2026-01-14T12:54:55.978Z" }, 42 + { url = "https://files.pythonhosted.org/packages/22/6e/46eb9b85c1b9761e0f42b6e6311e1cc544843ac897457062b9d5d0b21df4/librt-0.7.8-cp311-cp311-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:e9c0afebbe6ce177ae8edba0c7c4d626f2a0fc12c33bb993d163817c41a7a05c", size = 164956, upload-time = "2026-01-14T12:54:57.311Z" }, 43 + { url = "https://files.pythonhosted.org/packages/7a/3f/aa7c7f6829fb83989feb7ba9aa11c662b34b4bd4bd5b262f2876ba3db58d/librt-0.7.8-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:631599598e2c76ded400c0a8722dec09217c89ff64dc54b060f598ed68e7d2a8", size = 174364, upload-time = "2026-01-14T12:54:59.089Z" }, 44 + { url = "https://files.pythonhosted.org/packages/3f/2d/d57d154b40b11f2cb851c4df0d4c4456bacd9b1ccc4ecb593ddec56c1a8b/librt-0.7.8-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9c1ba843ae20db09b9d5c80475376168feb2640ce91cd9906414f23cc267a1ff", size = 188034, upload-time = "2026-01-14T12:55:00.141Z" }, 45 + { url = "https://files.pythonhosted.org/packages/59/f9/36c4dad00925c16cd69d744b87f7001792691857d3b79187e7a673e812fb/librt-0.7.8-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:b5b007bb22ea4b255d3ee39dfd06d12534de2fcc3438567d9f48cdaf67ae1ae3", size = 186295, upload-time = "2026-01-14T12:55:01.303Z" }, 46 + { url = "https://files.pythonhosted.org/packages/23/9b/8a9889d3df5efb67695a67785028ccd58e661c3018237b73ad081691d0cb/librt-0.7.8-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:dbd79caaf77a3f590cbe32dc2447f718772d6eea59656a7dcb9311161b10fa75", size = 181470, upload-time = "2026-01-14T12:55:02.492Z" }, 47 + { url = "https://files.pythonhosted.org/packages/43/64/54d6ef11afca01fef8af78c230726a9394759f2addfbf7afc5e3cc032a45/librt-0.7.8-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:87808a8d1e0bd62a01cafc41f0fd6818b5a5d0ca0d8a55326a81643cdda8f873", size = 201713, upload-time = "2026-01-14T12:55:03.919Z" }, 48 + { url = "https://files.pythonhosted.org/packages/2d/29/73e7ed2991330b28919387656f54109139b49e19cd72902f466bd44415fd/librt-0.7.8-cp311-cp311-win32.whl", hash = "sha256:31724b93baa91512bd0a376e7cf0b59d8b631ee17923b1218a65456fa9bda2e7", size = 43803, upload-time = "2026-01-14T12:55:04.996Z" }, 49 + { url = "https://files.pythonhosted.org/packages/3f/de/66766ff48ed02b4d78deea30392ae200bcbd99ae61ba2418b49fd50a4831/librt-0.7.8-cp311-cp311-win_amd64.whl", hash = "sha256:978e8b5f13e52cf23a9e80f3286d7546baa70bc4ef35b51d97a709d0b28e537c", size = 50080, upload-time = "2026-01-14T12:55:06.489Z" }, 50 + { url = "https://files.pythonhosted.org/packages/6f/e3/33450438ff3a8c581d4ed7f798a70b07c3206d298cf0b87d3806e72e3ed8/librt-0.7.8-cp311-cp311-win_arm64.whl", hash = "sha256:20e3946863d872f7cabf7f77c6c9d370b8b3d74333d3a32471c50d3a86c0a232", size = 43383, upload-time = "2026-01-14T12:55:07.49Z" }, 51 + { url = "https://files.pythonhosted.org/packages/56/04/79d8fcb43cae376c7adbab7b2b9f65e48432c9eced62ac96703bcc16e09b/librt-0.7.8-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:9b6943885b2d49c48d0cff23b16be830ba46b0152d98f62de49e735c6e655a63", size = 57472, upload-time = "2026-01-14T12:55:08.528Z" }, 52 + { url = "https://files.pythonhosted.org/packages/b4/ba/60b96e93043d3d659da91752689023a73981336446ae82078cddf706249e/librt-0.7.8-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:46ef1f4b9b6cc364b11eea0ecc0897314447a66029ee1e55859acb3dd8757c93", size = 58986, upload-time = "2026-01-14T12:55:09.466Z" }, 53 + { url = "https://files.pythonhosted.org/packages/7c/26/5215e4cdcc26e7be7eee21955a7e13cbf1f6d7d7311461a6014544596fac/librt-0.7.8-cp312-cp312-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:907ad09cfab21e3c86e8f1f87858f7049d1097f77196959c033612f532b4e592", size = 168422, upload-time = "2026-01-14T12:55:10.499Z" }, 54 + { url = "https://files.pythonhosted.org/packages/0f/84/e8d1bc86fa0159bfc24f3d798d92cafd3897e84c7fea7fe61b3220915d76/librt-0.7.8-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:2991b6c3775383752b3ca0204842743256f3ad3deeb1d0adc227d56b78a9a850", size = 177478, upload-time = "2026-01-14T12:55:11.577Z" }, 55 + { url = "https://files.pythonhosted.org/packages/57/11/d0268c4b94717a18aa91df1100e767b010f87b7ae444dafaa5a2d80f33a6/librt-0.7.8-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:03679b9856932b8c8f674e87aa3c55ea11c9274301f76ae8dc4d281bda55cf62", size = 192439, upload-time = "2026-01-14T12:55:12.7Z" }, 56 + { url = "https://files.pythonhosted.org/packages/8d/56/1e8e833b95fe684f80f8894ae4d8b7d36acc9203e60478fcae599120a975/librt-0.7.8-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:3968762fec1b2ad34ce57458b6de25dbb4142713e9ca6279a0d352fa4e9f452b", size = 191483, upload-time = "2026-01-14T12:55:13.838Z" }, 57 + { url = "https://files.pythonhosted.org/packages/17/48/f11cf28a2cb6c31f282009e2208312aa84a5ee2732859f7856ee306176d5/librt-0.7.8-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:bb7a7807523a31f03061288cc4ffc065d684c39db7644c676b47d89553c0d714", size = 185376, upload-time = "2026-01-14T12:55:15.017Z" }, 58 + { url = "https://files.pythonhosted.org/packages/b8/6a/d7c116c6da561b9155b184354a60a3d5cdbf08fc7f3678d09c95679d13d9/librt-0.7.8-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:ad64a14b1e56e702e19b24aae108f18ad1bf7777f3af5fcd39f87d0c5a814449", size = 206234, upload-time = "2026-01-14T12:55:16.571Z" }, 59 + { url = "https://files.pythonhosted.org/packages/61/de/1975200bb0285fc921c5981d9978ce6ce11ae6d797df815add94a5a848a3/librt-0.7.8-cp312-cp312-win32.whl", hash = "sha256:0241a6ed65e6666236ea78203a73d800dbed896cf12ae25d026d75dc1fcd1dac", size = 44057, upload-time = "2026-01-14T12:55:18.077Z" }, 60 + { url = "https://files.pythonhosted.org/packages/8e/cd/724f2d0b3461426730d4877754b65d39f06a41ac9d0a92d5c6840f72b9ae/librt-0.7.8-cp312-cp312-win_amd64.whl", hash = "sha256:6db5faf064b5bab9675c32a873436b31e01d66ca6984c6f7f92621656033a708", size = 50293, upload-time = "2026-01-14T12:55:19.179Z" }, 61 + { url = "https://files.pythonhosted.org/packages/bd/cf/7e899acd9ee5727ad8160fdcc9994954e79fab371c66535c60e13b968ffc/librt-0.7.8-cp312-cp312-win_arm64.whl", hash = "sha256:57175aa93f804d2c08d2edb7213e09276bd49097611aefc37e3fa38d1fb99ad0", size = 43574, upload-time = "2026-01-14T12:55:20.185Z" }, 62 + { url = "https://files.pythonhosted.org/packages/a1/fe/b1f9de2829cf7fc7649c1dcd202cfd873837c5cc2fc9e526b0e7f716c3d2/librt-0.7.8-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:4c3995abbbb60b3c129490fa985dfe6cac11d88fc3c36eeb4fb1449efbbb04fc", size = 57500, upload-time = "2026-01-14T12:55:21.219Z" }, 63 + { url = "https://files.pythonhosted.org/packages/eb/d4/4a60fbe2e53b825f5d9a77325071d61cd8af8506255067bf0c8527530745/librt-0.7.8-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:44e0c2cbc9bebd074cf2cdbe472ca185e824be4e74b1c63a8e934cea674bebf2", size = 59019, upload-time = "2026-01-14T12:55:22.256Z" }, 64 + { url = "https://files.pythonhosted.org/packages/6a/37/61ff80341ba5159afa524445f2d984c30e2821f31f7c73cf166dcafa5564/librt-0.7.8-cp313-cp313-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:4d2f1e492cae964b3463a03dc77a7fe8742f7855d7258c7643f0ee32b6651dd3", size = 169015, upload-time = "2026-01-14T12:55:23.24Z" }, 65 + { url = "https://files.pythonhosted.org/packages/1c/86/13d4f2d6a93f181ebf2fc953868826653ede494559da8268023fe567fca3/librt-0.7.8-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:451e7ffcef8f785831fdb791bd69211f47e95dc4c6ddff68e589058806f044c6", size = 178161, upload-time = "2026-01-14T12:55:24.826Z" }, 66 + { url = "https://files.pythonhosted.org/packages/88/26/e24ef01305954fc4d771f1f09f3dd682f9eb610e1bec188ffb719374d26e/librt-0.7.8-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:3469e1af9f1380e093ae06bedcbdd11e407ac0b303a56bbe9afb1d6824d4982d", size = 193015, upload-time = "2026-01-14T12:55:26.04Z" }, 67 + { url = "https://files.pythonhosted.org/packages/88/a0/92b6bd060e720d7a31ed474d046a69bd55334ec05e9c446d228c4b806ae3/librt-0.7.8-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:f11b300027ce19a34f6d24ebb0a25fd0e24a9d53353225a5c1e6cadbf2916b2e", size = 192038, upload-time = "2026-01-14T12:55:27.208Z" }, 68 + { url = "https://files.pythonhosted.org/packages/06/bb/6f4c650253704279c3a214dad188101d1b5ea23be0606628bc6739456624/librt-0.7.8-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:4adc73614f0d3c97874f02f2c7fd2a27854e7e24ad532ea6b965459c5b757eca", size = 186006, upload-time = "2026-01-14T12:55:28.594Z" }, 69 + { url = "https://files.pythonhosted.org/packages/dc/00/1c409618248d43240cadf45f3efb866837fa77e9a12a71481912135eb481/librt-0.7.8-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:60c299e555f87e4c01b2eca085dfccda1dde87f5a604bb45c2906b8305819a93", size = 206888, upload-time = "2026-01-14T12:55:30.214Z" }, 70 + { url = "https://files.pythonhosted.org/packages/d9/83/b2cfe8e76ff5c1c77f8a53da3d5de62d04b5ebf7cf913e37f8bca43b5d07/librt-0.7.8-cp313-cp313-win32.whl", hash = "sha256:b09c52ed43a461994716082ee7d87618096851319bf695d57ec123f2ab708951", size = 44126, upload-time = "2026-01-14T12:55:31.44Z" }, 71 + { url = "https://files.pythonhosted.org/packages/a9/0b/c59d45de56a51bd2d3a401fc63449c0ac163e4ef7f523ea8b0c0dee86ec5/librt-0.7.8-cp313-cp313-win_amd64.whl", hash = "sha256:f8f4a901a3fa28969d6e4519deceab56c55a09d691ea7b12ca830e2fa3461e34", size = 50262, upload-time = "2026-01-14T12:55:33.01Z" }, 72 + { url = "https://files.pythonhosted.org/packages/fc/b9/973455cec0a1ec592395250c474164c4a58ebf3e0651ee920fef1a2623f1/librt-0.7.8-cp313-cp313-win_arm64.whl", hash = "sha256:43d4e71b50763fcdcf64725ac680d8cfa1706c928b844794a7aa0fa9ac8e5f09", size = 43600, upload-time = "2026-01-14T12:55:34.054Z" }, 73 + { url = "https://files.pythonhosted.org/packages/1a/73/fa8814c6ce2d49c3827829cadaa1589b0bf4391660bd4510899393a23ebc/librt-0.7.8-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:be927c3c94c74b05128089a955fba86501c3b544d1d300282cc1b4bd370cb418", size = 57049, upload-time = "2026-01-14T12:55:35.056Z" }, 74 + { url = "https://files.pythonhosted.org/packages/53/fe/f6c70956da23ea235fd2e3cc16f4f0b4ebdfd72252b02d1164dd58b4e6c3/librt-0.7.8-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:7b0803e9008c62a7ef79058233db7ff6f37a9933b8f2573c05b07ddafa226611", size = 58689, upload-time = "2026-01-14T12:55:36.078Z" }, 75 + { url = "https://files.pythonhosted.org/packages/1f/4d/7a2481444ac5fba63050d9abe823e6bc16896f575bfc9c1e5068d516cdce/librt-0.7.8-cp314-cp314-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:79feb4d00b2a4e0e05c9c56df707934f41fcb5fe53fd9efb7549068d0495b758", size = 166808, upload-time = "2026-01-14T12:55:37.595Z" }, 76 + { url = "https://files.pythonhosted.org/packages/ac/3c/10901d9e18639f8953f57c8986796cfbf4c1c514844a41c9197cf87cb707/librt-0.7.8-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b9122094e3f24aa759c38f46bd8863433820654927370250f460ae75488b66ea", size = 175614, upload-time = "2026-01-14T12:55:38.756Z" }, 77 + { url = "https://files.pythonhosted.org/packages/db/01/5cbdde0951a5090a80e5ba44e6357d375048123c572a23eecfb9326993a7/librt-0.7.8-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:7e03bea66af33c95ce3addf87a9bf1fcad8d33e757bc479957ddbc0e4f7207ac", size = 189955, upload-time = "2026-01-14T12:55:39.939Z" }, 78 + { url = "https://files.pythonhosted.org/packages/6a/b4/e80528d2f4b7eaf1d437fcbd6fc6ba4cbeb3e2a0cb9ed5a79f47c7318706/librt-0.7.8-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:f1ade7f31675db00b514b98f9ab9a7698c7282dad4be7492589109471852d398", size = 189370, upload-time = "2026-01-14T12:55:41.057Z" }, 79 + { url = "https://files.pythonhosted.org/packages/c1/ab/938368f8ce31a9787ecd4becb1e795954782e4312095daf8fd22420227c8/librt-0.7.8-cp314-cp314-musllinux_1_2_i686.whl", hash = "sha256:a14229ac62adcf1b90a15992f1ab9c69ae8b99ffb23cb64a90878a6e8a2f5b81", size = 183224, upload-time = "2026-01-14T12:55:42.328Z" }, 80 + { url = "https://files.pythonhosted.org/packages/3c/10/559c310e7a6e4014ac44867d359ef8238465fb499e7eb31b6bfe3e3f86f5/librt-0.7.8-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:5bcaaf624fd24e6a0cb14beac37677f90793a96864c67c064a91458611446e83", size = 203541, upload-time = "2026-01-14T12:55:43.501Z" }, 81 + { url = "https://files.pythonhosted.org/packages/f8/db/a0db7acdb6290c215f343835c6efda5b491bb05c3ddc675af558f50fdba3/librt-0.7.8-cp314-cp314-win32.whl", hash = "sha256:7aa7d5457b6c542ecaed79cec4ad98534373c9757383973e638ccced0f11f46d", size = 40657, upload-time = "2026-01-14T12:55:44.668Z" }, 82 + { url = "https://files.pythonhosted.org/packages/72/e0/4f9bdc2a98a798511e81edcd6b54fe82767a715e05d1921115ac70717f6f/librt-0.7.8-cp314-cp314-win_amd64.whl", hash = "sha256:3d1322800771bee4a91f3b4bd4e49abc7d35e65166821086e5afd1e6c0d9be44", size = 46835, upload-time = "2026-01-14T12:55:45.655Z" }, 83 + { url = "https://files.pythonhosted.org/packages/f9/3d/59c6402e3dec2719655a41ad027a7371f8e2334aa794ed11533ad5f34969/librt-0.7.8-cp314-cp314-win_arm64.whl", hash = "sha256:5363427bc6a8c3b1719f8f3845ea53553d301382928a86e8fab7984426949bce", size = 39885, upload-time = "2026-01-14T12:55:47.138Z" }, 84 + { url = "https://files.pythonhosted.org/packages/4e/9c/2481d80950b83085fb14ba3c595db56330d21bbc7d88a19f20165f3538db/librt-0.7.8-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:ca916919793a77e4a98d4a1701e345d337ce53be4a16620f063191f7322ac80f", size = 59161, upload-time = "2026-01-14T12:55:48.45Z" }, 85 + { url = "https://files.pythonhosted.org/packages/96/79/108df2cfc4e672336765d54e3ff887294c1cc36ea4335c73588875775527/librt-0.7.8-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:54feb7b4f2f6706bb82325e836a01be805770443e2400f706e824e91f6441dde", size = 61008, upload-time = "2026-01-14T12:55:49.527Z" }, 86 + { url = "https://files.pythonhosted.org/packages/46/f2/30179898f9994a5637459d6e169b6abdc982012c0a4b2d4c26f50c06f911/librt-0.7.8-cp314-cp314t-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:39a4c76fee41007070f872b648cc2f711f9abf9a13d0c7162478043377b52c8e", size = 187199, upload-time = "2026-01-14T12:55:50.587Z" }, 87 + { url = "https://files.pythonhosted.org/packages/b4/da/f7563db55cebdc884f518ba3791ad033becc25ff68eb70902b1747dc0d70/librt-0.7.8-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ac9c8a458245c7de80bc1b9765b177055efff5803f08e548dd4bb9ab9a8d789b", size = 198317, upload-time = "2026-01-14T12:55:51.991Z" }, 88 + { url = "https://files.pythonhosted.org/packages/b3/6c/4289acf076ad371471fa86718c30ae353e690d3de6167f7db36f429272f1/librt-0.7.8-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:95b67aa7eff150f075fda09d11f6bfb26edffd300f6ab1666759547581e8f666", size = 210334, upload-time = "2026-01-14T12:55:53.682Z" }, 89 + { url = "https://files.pythonhosted.org/packages/4a/7f/377521ac25b78ac0a5ff44127a0360ee6d5ddd3ce7327949876a30533daa/librt-0.7.8-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:535929b6eff670c593c34ff435d5440c3096f20fa72d63444608a5aef64dd581", size = 211031, upload-time = "2026-01-14T12:55:54.827Z" }, 90 + { url = "https://files.pythonhosted.org/packages/c5/b1/e1e96c3e20b23d00cf90f4aad48f0deb4cdfec2f0ed8380d0d85acf98bbf/librt-0.7.8-cp314-cp314t-musllinux_1_2_i686.whl", hash = "sha256:63937bd0f4d1cb56653dc7ae900d6c52c41f0015e25aaf9902481ee79943b33a", size = 204581, upload-time = "2026-01-14T12:55:56.811Z" }, 91 + { url = "https://files.pythonhosted.org/packages/43/71/0f5d010e92ed9747e14bef35e91b6580533510f1e36a8a09eb79ee70b2f0/librt-0.7.8-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:cf243da9e42d914036fd362ac3fa77d80a41cadcd11ad789b1b5eec4daaf67ca", size = 224731, upload-time = "2026-01-14T12:55:58.175Z" }, 92 + { url = "https://files.pythonhosted.org/packages/22/f0/07fb6ab5c39a4ca9af3e37554f9d42f25c464829254d72e4ebbd81da351c/librt-0.7.8-cp314-cp314t-win32.whl", hash = "sha256:171ca3a0a06c643bd0a2f62a8944e1902c94aa8e5da4db1ea9a8daf872685365", size = 41173, upload-time = "2026-01-14T12:55:59.315Z" }, 93 + { url = "https://files.pythonhosted.org/packages/24/d4/7e4be20993dc6a782639625bd2f97f3c66125c7aa80c82426956811cfccf/librt-0.7.8-cp314-cp314t-win_amd64.whl", hash = "sha256:445b7304145e24c60288a2f172b5ce2ca35c0f81605f5299f3fa567e189d2e32", size = 47668, upload-time = "2026-01-14T12:56:00.261Z" }, 94 + { url = "https://files.pythonhosted.org/packages/fc/85/69f92b2a7b3c0f88ffe107c86b952b397004b5b8ea5a81da3d9c04c04422/librt-0.7.8-cp314-cp314t-win_arm64.whl", hash = "sha256:8766ece9de08527deabcd7cb1b4f1a967a385d26e33e536d6d8913db6ef74f06", size = 40550, upload-time = "2026-01-14T12:56:01.542Z" }, 95 + ] 96 + 97 + [[package]] 98 + name = "mypy" 99 + version = "1.19.1" 100 + source = { registry = "https://pypi.org/simple" } 101 + dependencies = [ 102 + { name = "librt", marker = "platform_python_implementation != 'PyPy'" }, 103 + { name = "mypy-extensions" }, 104 + { name = "pathspec" }, 105 + { name = "tomli", marker = "python_full_version < '3.11'" }, 106 + { name = "typing-extensions" }, 107 + ] 108 + sdist = { url = "https://files.pythonhosted.org/packages/f5/db/4efed9504bc01309ab9c2da7e352cc223569f05478012b5d9ece38fd44d2/mypy-1.19.1.tar.gz", hash = "sha256:19d88bb05303fe63f71dd2c6270daca27cb9401c4ca8255fe50d1d920e0eb9ba", size = 3582404, upload-time = "2025-12-15T05:03:48.42Z" } 109 + wheels = [ 110 + { url = "https://files.pythonhosted.org/packages/2f/63/e499890d8e39b1ff2df4c0c6ce5d371b6844ee22b8250687a99fd2f657a8/mypy-1.19.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:5f05aa3d375b385734388e844bc01733bd33c644ab48e9684faa54e5389775ec", size = 13101333, upload-time = "2025-12-15T05:03:03.28Z" }, 111 + { url = "https://files.pythonhosted.org/packages/72/4b/095626fc136fba96effc4fd4a82b41d688ab92124f8c4f7564bffe5cf1b0/mypy-1.19.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:022ea7279374af1a5d78dfcab853fe6a536eebfda4b59deab53cd21f6cd9f00b", size = 12164102, upload-time = "2025-12-15T05:02:33.611Z" }, 112 + { url = "https://files.pythonhosted.org/packages/0c/5b/952928dd081bf88a83a5ccd49aaecfcd18fd0d2710c7ff07b8fb6f7032b9/mypy-1.19.1-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ee4c11e460685c3e0c64a4c5de82ae143622410950d6be863303a1c4ba0e36d6", size = 12765799, upload-time = "2025-12-15T05:03:28.44Z" }, 113 + { url = "https://files.pythonhosted.org/packages/2a/0d/93c2e4a287f74ef11a66fb6d49c7a9f05e47b0a4399040e6719b57f500d2/mypy-1.19.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:de759aafbae8763283b2ee5869c7255391fbc4de3ff171f8f030b5ec48381b74", size = 13522149, upload-time = "2025-12-15T05:02:36.011Z" }, 114 + { url = "https://files.pythonhosted.org/packages/7b/0e/33a294b56aaad2b338d203e3a1d8b453637ac36cb278b45005e0901cf148/mypy-1.19.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:ab43590f9cd5108f41aacf9fca31841142c786827a74ab7cc8a2eacb634e09a1", size = 13810105, upload-time = "2025-12-15T05:02:40.327Z" }, 115 + { url = "https://files.pythonhosted.org/packages/0e/fd/3e82603a0cb66b67c5e7abababce6bf1a929ddf67bf445e652684af5c5a0/mypy-1.19.1-cp310-cp310-win_amd64.whl", hash = "sha256:2899753e2f61e571b3971747e302d5f420c3fd09650e1951e99f823bc3089dac", size = 10057200, upload-time = "2025-12-15T05:02:51.012Z" }, 116 + { url = "https://files.pythonhosted.org/packages/ef/47/6b3ebabd5474d9cdc170d1342fbf9dddc1b0ec13ec90bf9004ee6f391c31/mypy-1.19.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:d8dfc6ab58ca7dda47d9237349157500468e404b17213d44fc1cb77bce532288", size = 13028539, upload-time = "2025-12-15T05:03:44.129Z" }, 117 + { url = "https://files.pythonhosted.org/packages/5c/a6/ac7c7a88a3c9c54334f53a941b765e6ec6c4ebd65d3fe8cdcfbe0d0fd7db/mypy-1.19.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:e3f276d8493c3c97930e354b2595a44a21348b320d859fb4a2b9f66da9ed27ab", size = 12083163, upload-time = "2025-12-15T05:03:37.679Z" }, 118 + { url = "https://files.pythonhosted.org/packages/67/af/3afa9cf880aa4a2c803798ac24f1d11ef72a0c8079689fac5cfd815e2830/mypy-1.19.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:2abb24cf3f17864770d18d673c85235ba52456b36a06b6afc1e07c1fdcd3d0e6", size = 12687629, upload-time = "2025-12-15T05:02:31.526Z" }, 119 + { url = "https://files.pythonhosted.org/packages/2d/46/20f8a7114a56484ab268b0ab372461cb3a8f7deed31ea96b83a4e4cfcfca/mypy-1.19.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a009ffa5a621762d0c926a078c2d639104becab69e79538a494bcccb62cc0331", size = 13436933, upload-time = "2025-12-15T05:03:15.606Z" }, 120 + { url = "https://files.pythonhosted.org/packages/5b/f8/33b291ea85050a21f15da910002460f1f445f8007adb29230f0adea279cb/mypy-1.19.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:f7cee03c9a2e2ee26ec07479f38ea9c884e301d42c6d43a19d20fb014e3ba925", size = 13661754, upload-time = "2025-12-15T05:02:26.731Z" }, 121 + { url = "https://files.pythonhosted.org/packages/fd/a3/47cbd4e85bec4335a9cd80cf67dbc02be21b5d4c9c23ad6b95d6c5196bac/mypy-1.19.1-cp311-cp311-win_amd64.whl", hash = "sha256:4b84a7a18f41e167f7995200a1d07a4a6810e89d29859df936f1c3923d263042", size = 10055772, upload-time = "2025-12-15T05:03:26.179Z" }, 122 + { url = "https://files.pythonhosted.org/packages/06/8a/19bfae96f6615aa8a0604915512e0289b1fad33d5909bf7244f02935d33a/mypy-1.19.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:a8174a03289288c1f6c46d55cef02379b478bfbc8e358e02047487cad44c6ca1", size = 13206053, upload-time = "2025-12-15T05:03:46.622Z" }, 123 + { url = "https://files.pythonhosted.org/packages/a5/34/3e63879ab041602154ba2a9f99817bb0c85c4df19a23a1443c8986e4d565/mypy-1.19.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:ffcebe56eb09ff0c0885e750036a095e23793ba6c2e894e7e63f6d89ad51f22e", size = 12219134, upload-time = "2025-12-15T05:03:24.367Z" }, 124 + { url = "https://files.pythonhosted.org/packages/89/cc/2db6f0e95366b630364e09845672dbee0cbf0bbe753a204b29a944967cd9/mypy-1.19.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b64d987153888790bcdb03a6473d321820597ab8dd9243b27a92153c4fa50fd2", size = 12731616, upload-time = "2025-12-15T05:02:44.725Z" }, 125 + { url = "https://files.pythonhosted.org/packages/00/be/dd56c1fd4807bc1eba1cf18b2a850d0de7bacb55e158755eb79f77c41f8e/mypy-1.19.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c35d298c2c4bba75feb2195655dfea8124d855dfd7343bf8b8c055421eaf0cf8", size = 13620847, upload-time = "2025-12-15T05:03:39.633Z" }, 126 + { url = "https://files.pythonhosted.org/packages/6d/42/332951aae42b79329f743bf1da088cd75d8d4d9acc18fbcbd84f26c1af4e/mypy-1.19.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:34c81968774648ab5ac09c29a375fdede03ba253f8f8287847bd480782f73a6a", size = 13834976, upload-time = "2025-12-15T05:03:08.786Z" }, 127 + { url = "https://files.pythonhosted.org/packages/6f/63/e7493e5f90e1e085c562bb06e2eb32cae27c5057b9653348d38b47daaecc/mypy-1.19.1-cp312-cp312-win_amd64.whl", hash = "sha256:b10e7c2cd7870ba4ad9b2d8a6102eb5ffc1f16ca35e3de6bfa390c1113029d13", size = 10118104, upload-time = "2025-12-15T05:03:10.834Z" }, 128 + { url = "https://files.pythonhosted.org/packages/de/9f/a6abae693f7a0c697dbb435aac52e958dc8da44e92e08ba88d2e42326176/mypy-1.19.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:e3157c7594ff2ef1634ee058aafc56a82db665c9438fd41b390f3bde1ab12250", size = 13201927, upload-time = "2025-12-15T05:02:29.138Z" }, 129 + { url = "https://files.pythonhosted.org/packages/9a/a4/45c35ccf6e1c65afc23a069f50e2c66f46bd3798cbe0d680c12d12935caa/mypy-1.19.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:bdb12f69bcc02700c2b47e070238f42cb87f18c0bc1fc4cdb4fb2bc5fd7a3b8b", size = 12206730, upload-time = "2025-12-15T05:03:01.325Z" }, 130 + { url = "https://files.pythonhosted.org/packages/05/bb/cdcf89678e26b187650512620eec8368fded4cfd99cfcb431e4cdfd19dec/mypy-1.19.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f859fb09d9583a985be9a493d5cfc5515b56b08f7447759a0c5deaf68d80506e", size = 12724581, upload-time = "2025-12-15T05:03:20.087Z" }, 131 + { url = "https://files.pythonhosted.org/packages/d1/32/dd260d52babf67bad8e6770f8e1102021877ce0edea106e72df5626bb0ec/mypy-1.19.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c9a6538e0415310aad77cb94004ca6482330fece18036b5f360b62c45814c4ef", size = 13616252, upload-time = "2025-12-15T05:02:49.036Z" }, 132 + { url = "https://files.pythonhosted.org/packages/71/d0/5e60a9d2e3bd48432ae2b454b7ef2b62a960ab51292b1eda2a95edd78198/mypy-1.19.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:da4869fc5e7f62a88f3fe0b5c919d1d9f7ea3cef92d3689de2823fd27e40aa75", size = 13840848, upload-time = "2025-12-15T05:02:55.95Z" }, 133 + { url = "https://files.pythonhosted.org/packages/98/76/d32051fa65ecf6cc8c6610956473abdc9b4c43301107476ac03559507843/mypy-1.19.1-cp313-cp313-win_amd64.whl", hash = "sha256:016f2246209095e8eda7538944daa1d60e1e8134d98983b9fc1e92c1fc0cb8dd", size = 10135510, upload-time = "2025-12-15T05:02:58.438Z" }, 134 + { url = "https://files.pythonhosted.org/packages/de/eb/b83e75f4c820c4247a58580ef86fcd35165028f191e7e1ba57128c52782d/mypy-1.19.1-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:06e6170bd5836770e8104c8fdd58e5e725cfeb309f0a6c681a811f557e97eac1", size = 13199744, upload-time = "2025-12-15T05:03:30.823Z" }, 135 + { url = "https://files.pythonhosted.org/packages/94/28/52785ab7bfa165f87fcbb61547a93f98bb20e7f82f90f165a1f69bce7b3d/mypy-1.19.1-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:804bd67b8054a85447c8954215a906d6eff9cabeabe493fb6334b24f4bfff718", size = 12215815, upload-time = "2025-12-15T05:02:42.323Z" }, 136 + { url = "https://files.pythonhosted.org/packages/0a/c6/bdd60774a0dbfb05122e3e925f2e9e846c009e479dcec4821dad881f5b52/mypy-1.19.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:21761006a7f497cb0d4de3d8ef4ca70532256688b0523eee02baf9eec895e27b", size = 12740047, upload-time = "2025-12-15T05:03:33.168Z" }, 137 + { url = "https://files.pythonhosted.org/packages/32/2a/66ba933fe6c76bd40d1fe916a83f04fed253152f451a877520b3c4a5e41e/mypy-1.19.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:28902ee51f12e0f19e1e16fbe2f8f06b6637f482c459dd393efddd0ec7f82045", size = 13601998, upload-time = "2025-12-15T05:03:13.056Z" }, 138 + { url = "https://files.pythonhosted.org/packages/e3/da/5055c63e377c5c2418760411fd6a63ee2b96cf95397259038756c042574f/mypy-1.19.1-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:481daf36a4c443332e2ae9c137dfee878fcea781a2e3f895d54bd3002a900957", size = 13807476, upload-time = "2025-12-15T05:03:17.977Z" }, 139 + { url = "https://files.pythonhosted.org/packages/cd/09/4ebd873390a063176f06b0dbf1f7783dd87bd120eae7727fa4ae4179b685/mypy-1.19.1-cp314-cp314-win_amd64.whl", hash = "sha256:8bb5c6f6d043655e055be9b542aa5f3bdd30e4f3589163e85f93f3640060509f", size = 10281872, upload-time = "2025-12-15T05:03:05.549Z" }, 140 + { url = "https://files.pythonhosted.org/packages/8d/f4/4ce9a05ce5ded1de3ec1c1d96cf9f9504a04e54ce0ed55cfa38619a32b8d/mypy-1.19.1-py3-none-any.whl", hash = "sha256:f1235f5ea01b7db5468d53ece6aaddf1ad0b88d9e7462b86ef96fe04995d7247", size = 2471239, upload-time = "2025-12-15T05:03:07.248Z" }, 141 + ] 142 + 143 + [[package]] 144 + name = "mypy-extensions" 145 + version = "1.1.0" 146 + source = { registry = "https://pypi.org/simple" } 147 + sdist = { url = "https://files.pythonhosted.org/packages/a2/6e/371856a3fb9d31ca8dac321cda606860fa4548858c0cc45d9d1d4ca2628b/mypy_extensions-1.1.0.tar.gz", hash = "sha256:52e68efc3284861e772bbcd66823fde5ae21fd2fdb51c62a211403730b916558", size = 6343, upload-time = "2025-04-22T14:54:24.164Z" } 148 + wheels = [ 149 + { url = "https://files.pythonhosted.org/packages/79/7b/2c79738432f5c924bef5071f933bcc9efd0473bac3b4aa584a6f7c1c8df8/mypy_extensions-1.1.0-py3-none-any.whl", hash = "sha256:1be4cccdb0f2482337c4743e60421de3a356cd97508abadd57d47403e94f5505", size = 4963, upload-time = "2025-04-22T14:54:22.983Z" }, 150 + ] 151 + 152 + [[package]] 153 + name = "pathspec" 154 + version = "1.0.4" 155 + source = { registry = "https://pypi.org/simple" } 156 + sdist = { url = "https://files.pythonhosted.org/packages/fa/36/e27608899f9b8d4dff0617b2d9ab17ca5608956ca44461ac14ac48b44015/pathspec-1.0.4.tar.gz", hash = "sha256:0210e2ae8a21a9137c0d470578cb0e595af87edaa6ebf12ff176f14a02e0e645", size = 131200, upload-time = "2026-01-27T03:59:46.938Z" } 157 + wheels = [ 158 + { url = "https://files.pythonhosted.org/packages/ef/3c/2c197d226f9ea224a9ab8d197933f9da0ae0aac5b6e0f884e2b8d9c8e9f7/pathspec-1.0.4-py3-none-any.whl", hash = "sha256:fb6ae2fd4e7c921a165808a552060e722767cfa526f99ca5156ed2ce45a5c723", size = 55206, upload-time = "2026-01-27T03:59:45.137Z" }, 159 + ] 160 + 161 + [[package]] 162 + name = "ruff" 163 + version = "0.14.14" 164 + source = { registry = "https://pypi.org/simple" } 165 + sdist = { url = "https://files.pythonhosted.org/packages/2e/06/f71e3a86b2df0dfa2d2f72195941cd09b44f87711cb7fa5193732cb9a5fc/ruff-0.14.14.tar.gz", hash = "sha256:2d0f819c9a90205f3a867dbbd0be083bee9912e170fd7d9704cc8ae45824896b", size = 4515732, upload-time = "2026-01-22T22:30:17.527Z" } 166 + wheels = [ 167 + { url = "https://files.pythonhosted.org/packages/d2/89/20a12e97bc6b9f9f68343952da08a8099c57237aef953a56b82711d55edd/ruff-0.14.14-py3-none-linux_armv6l.whl", hash = "sha256:7cfe36b56e8489dee8fbc777c61959f60ec0f1f11817e8f2415f429552846aed", size = 10467650, upload-time = "2026-01-22T22:30:08.578Z" }, 168 + { url = "https://files.pythonhosted.org/packages/a3/b1/c5de3fd2d5a831fcae21beda5e3589c0ba67eec8202e992388e4b17a6040/ruff-0.14.14-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:6006a0082336e7920b9573ef8a7f52eec837add1265cc74e04ea8a4368cd704c", size = 10883245, upload-time = "2026-01-22T22:30:04.155Z" }, 169 + { url = "https://files.pythonhosted.org/packages/b8/7c/3c1db59a10e7490f8f6f8559d1db8636cbb13dccebf18686f4e3c9d7c772/ruff-0.14.14-py3-none-macosx_11_0_arm64.whl", hash = "sha256:026c1d25996818f0bf498636686199d9bd0d9d6341c9c2c3b62e2a0198b758de", size = 10231273, upload-time = "2026-01-22T22:30:34.642Z" }, 170 + { url = "https://files.pythonhosted.org/packages/a1/6e/5e0e0d9674be0f8581d1f5e0f0a04761203affce3232c1a1189d0e3b4dad/ruff-0.14.14-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f666445819d31210b71e0a6d1c01e24447a20b85458eea25a25fe8142210ae0e", size = 10585753, upload-time = "2026-01-22T22:30:31.781Z" }, 171 + { url = "https://files.pythonhosted.org/packages/23/09/754ab09f46ff1884d422dc26d59ba18b4e5d355be147721bb2518aa2a014/ruff-0.14.14-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:3c0f18b922c6d2ff9a5e6c3ee16259adc513ca775bcf82c67ebab7cbd9da5bc8", size = 10286052, upload-time = "2026-01-22T22:30:24.827Z" }, 172 + { url = "https://files.pythonhosted.org/packages/c8/cc/e71f88dd2a12afb5f50733851729d6b571a7c3a35bfdb16c3035132675a0/ruff-0.14.14-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1629e67489c2dea43e8658c3dba659edbfd87361624b4040d1df04c9740ae906", size = 11043637, upload-time = "2026-01-22T22:30:13.239Z" }, 173 + { url = "https://files.pythonhosted.org/packages/67/b2/397245026352494497dac935d7f00f1468c03a23a0c5db6ad8fc49ca3fb2/ruff-0.14.14-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:27493a2131ea0f899057d49d303e4292b2cae2bb57253c1ed1f256fbcd1da480", size = 12194761, upload-time = "2026-01-22T22:30:22.542Z" }, 174 + { url = "https://files.pythonhosted.org/packages/5b/06/06ef271459f778323112c51b7587ce85230785cd64e91772034ddb88f200/ruff-0.14.14-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:01ff589aab3f5b539e35db38425da31a57521efd1e4ad1ae08fc34dbe30bd7df", size = 12005701, upload-time = "2026-01-22T22:30:20.499Z" }, 175 + { url = "https://files.pythonhosted.org/packages/41/d6/99364514541cf811ccc5ac44362f88df66373e9fec1b9d1c4cc830593fe7/ruff-0.14.14-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1cc12d74eef0f29f51775f5b755913eb523546b88e2d733e1d701fe65144e89b", size = 11282455, upload-time = "2026-01-22T22:29:59.679Z" }, 176 + { url = "https://files.pythonhosted.org/packages/ca/71/37daa46f89475f8582b7762ecd2722492df26421714a33e72ccc9a84d7a5/ruff-0.14.14-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bb8481604b7a9e75eff53772496201690ce2687067e038b3cc31aaf16aa0b974", size = 11215882, upload-time = "2026-01-22T22:29:57.032Z" }, 177 + { url = "https://files.pythonhosted.org/packages/2c/10/a31f86169ec91c0705e618443ee74ede0bdd94da0a57b28e72db68b2dbac/ruff-0.14.14-py3-none-manylinux_2_31_riscv64.whl", hash = "sha256:14649acb1cf7b5d2d283ebd2f58d56b75836ed8c6f329664fa91cdea19e76e66", size = 11180549, upload-time = "2026-01-22T22:30:27.175Z" }, 178 + { url = "https://files.pythonhosted.org/packages/fd/1e/c723f20536b5163adf79bdd10c5f093414293cdf567eed9bdb7b83940f3f/ruff-0.14.14-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:e8058d2145566510790eab4e2fad186002e288dec5e0d343a92fe7b0bc1b3e13", size = 10543416, upload-time = "2026-01-22T22:30:01.964Z" }, 179 + { url = "https://files.pythonhosted.org/packages/3e/34/8a84cea7e42c2d94ba5bde1d7a4fae164d6318f13f933d92da6d7c2041ff/ruff-0.14.14-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:e651e977a79e4c758eb807f0481d673a67ffe53cfa92209781dfa3a996cf8412", size = 10285491, upload-time = "2026-01-22T22:30:29.51Z" }, 180 + { url = "https://files.pythonhosted.org/packages/55/ef/b7c5ea0be82518906c978e365e56a77f8de7678c8bb6651ccfbdc178c29f/ruff-0.14.14-py3-none-musllinux_1_2_i686.whl", hash = "sha256:cc8b22da8d9d6fdd844a68ae937e2a0adf9b16514e9a97cc60355e2d4b219fc3", size = 10733525, upload-time = "2026-01-22T22:30:06.499Z" }, 181 + { url = "https://files.pythonhosted.org/packages/6a/5b/aaf1dfbcc53a2811f6cc0a1759de24e4b03e02ba8762daabd9b6bd8c59e3/ruff-0.14.14-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:16bc890fb4cc9781bb05beb5ab4cd51be9e7cb376bf1dd3580512b24eb3fda2b", size = 11315626, upload-time = "2026-01-22T22:30:36.848Z" }, 182 + { url = "https://files.pythonhosted.org/packages/2c/aa/9f89c719c467dfaf8ad799b9bae0df494513fb21d31a6059cb5870e57e74/ruff-0.14.14-py3-none-win32.whl", hash = "sha256:b530c191970b143375b6a68e6f743800b2b786bbcf03a7965b06c4bf04568167", size = 10502442, upload-time = "2026-01-22T22:30:38.93Z" }, 183 + { url = "https://files.pythonhosted.org/packages/87/44/90fa543014c45560cae1fffc63ea059fb3575ee6e1cb654562197e5d16fb/ruff-0.14.14-py3-none-win_amd64.whl", hash = "sha256:3dde1435e6b6fe5b66506c1dff67a421d0b7f6488d466f651c07f4cab3bf20fd", size = 11630486, upload-time = "2026-01-22T22:30:10.852Z" }, 184 + { url = "https://files.pythonhosted.org/packages/9e/6a/40fee331a52339926a92e17ae748827270b288a35ef4a15c9c8f2ec54715/ruff-0.14.14-py3-none-win_arm64.whl", hash = "sha256:56e6981a98b13a32236a72a8da421d7839221fa308b223b9283312312e5ac76c", size = 10920448, upload-time = "2026-01-22T22:30:15.417Z" }, 185 + ] 186 + 187 + [[package]] 188 + name = "tomli" 189 + version = "2.4.0" 190 + source = { registry = "https://pypi.org/simple" } 191 + sdist = { url = "https://files.pythonhosted.org/packages/82/30/31573e9457673ab10aa432461bee537ce6cef177667deca369efb79df071/tomli-2.4.0.tar.gz", hash = "sha256:aa89c3f6c277dd275d8e243ad24f3b5e701491a860d5121f2cdd399fbb31fc9c", size = 17477, upload-time = "2026-01-11T11:22:38.165Z" } 192 + wheels = [ 193 + { url = "https://files.pythonhosted.org/packages/3c/d9/3dc2289e1f3b32eb19b9785b6a006b28ee99acb37d1d47f78d4c10e28bf8/tomli-2.4.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:b5ef256a3fd497d4973c11bf142e9ed78b150d36f5773f1ca6088c230ffc5867", size = 153663, upload-time = "2026-01-11T11:21:45.27Z" }, 194 + { url = "https://files.pythonhosted.org/packages/51/32/ef9f6845e6b9ca392cd3f64f9ec185cc6f09f0a2df3db08cbe8809d1d435/tomli-2.4.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:5572e41282d5268eb09a697c89a7bee84fae66511f87533a6f88bd2f7b652da9", size = 148469, upload-time = "2026-01-11T11:21:46.873Z" }, 195 + { url = "https://files.pythonhosted.org/packages/d6/c2/506e44cce89a8b1b1e047d64bd495c22c9f71f21e05f380f1a950dd9c217/tomli-2.4.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:551e321c6ba03b55676970b47cb1b73f14a0a4dce6a3e1a9458fd6d921d72e95", size = 236039, upload-time = "2026-01-11T11:21:48.503Z" }, 196 + { url = "https://files.pythonhosted.org/packages/b3/40/e1b65986dbc861b7e986e8ec394598187fa8aee85b1650b01dd925ca0be8/tomli-2.4.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:5e3f639a7a8f10069d0e15408c0b96a2a828cfdec6fca05296ebcdcc28ca7c76", size = 243007, upload-time = "2026-01-11T11:21:49.456Z" }, 197 + { url = "https://files.pythonhosted.org/packages/9c/6f/6e39ce66b58a5b7ae572a0f4352ff40c71e8573633deda43f6a379d56b3e/tomli-2.4.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:1b168f2731796b045128c45982d3a4874057626da0e2ef1fdd722848b741361d", size = 240875, upload-time = "2026-01-11T11:21:50.755Z" }, 198 + { url = "https://files.pythonhosted.org/packages/aa/ad/cb089cb190487caa80204d503c7fd0f4d443f90b95cf4ef5cf5aa0f439b0/tomli-2.4.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:133e93646ec4300d651839d382d63edff11d8978be23da4cc106f5a18b7d0576", size = 246271, upload-time = "2026-01-11T11:21:51.81Z" }, 199 + { url = "https://files.pythonhosted.org/packages/0b/63/69125220e47fd7a3a27fd0de0c6398c89432fec41bc739823bcc66506af6/tomli-2.4.0-cp311-cp311-win32.whl", hash = "sha256:b6c78bdf37764092d369722d9946cb65b8767bfa4110f902a1b2542d8d173c8a", size = 96770, upload-time = "2026-01-11T11:21:52.647Z" }, 200 + { url = "https://files.pythonhosted.org/packages/1e/0d/a22bb6c83f83386b0008425a6cd1fa1c14b5f3dd4bad05e98cf3dbbf4a64/tomli-2.4.0-cp311-cp311-win_amd64.whl", hash = "sha256:d3d1654e11d724760cdb37a3d7691f0be9db5fbdaef59c9f532aabf87006dbaa", size = 107626, upload-time = "2026-01-11T11:21:53.459Z" }, 201 + { url = "https://files.pythonhosted.org/packages/2f/6d/77be674a3485e75cacbf2ddba2b146911477bd887dda9d8c9dfb2f15e871/tomli-2.4.0-cp311-cp311-win_arm64.whl", hash = "sha256:cae9c19ed12d4e8f3ebf46d1a75090e4c0dc16271c5bce1c833ac168f08fb614", size = 94842, upload-time = "2026-01-11T11:21:54.831Z" }, 202 + { url = "https://files.pythonhosted.org/packages/3c/43/7389a1869f2f26dba52404e1ef13b4784b6b37dac93bac53457e3ff24ca3/tomli-2.4.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:920b1de295e72887bafa3ad9f7a792f811847d57ea6b1215154030cf131f16b1", size = 154894, upload-time = "2026-01-11T11:21:56.07Z" }, 203 + { url = "https://files.pythonhosted.org/packages/e9/05/2f9bf110b5294132b2edf13fe6ca6ae456204f3d749f623307cbb7a946f2/tomli-2.4.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:7d6d9a4aee98fac3eab4952ad1d73aee87359452d1c086b5ceb43ed02ddb16b8", size = 149053, upload-time = "2026-01-11T11:21:57.467Z" }, 204 + { url = "https://files.pythonhosted.org/packages/e8/41/1eda3ca1abc6f6154a8db4d714a4d35c4ad90adc0bcf700657291593fbf3/tomli-2.4.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:36b9d05b51e65b254ea6c2585b59d2c4cb91c8a3d91d0ed0f17591a29aaea54a", size = 243481, upload-time = "2026-01-11T11:21:58.661Z" }, 205 + { url = "https://files.pythonhosted.org/packages/d2/6d/02ff5ab6c8868b41e7d4b987ce2b5f6a51d3335a70aa144edd999e055a01/tomli-2.4.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:1c8a885b370751837c029ef9bc014f27d80840e48bac415f3412e6593bbc18c1", size = 251720, upload-time = "2026-01-11T11:22:00.178Z" }, 206 + { url = "https://files.pythonhosted.org/packages/7b/57/0405c59a909c45d5b6f146107c6d997825aa87568b042042f7a9c0afed34/tomli-2.4.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:8768715ffc41f0008abe25d808c20c3d990f42b6e2e58305d5da280ae7d1fa3b", size = 247014, upload-time = "2026-01-11T11:22:01.238Z" }, 207 + { url = "https://files.pythonhosted.org/packages/2c/0e/2e37568edd944b4165735687cbaf2fe3648129e440c26d02223672ee0630/tomli-2.4.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:7b438885858efd5be02a9a133caf5812b8776ee0c969fea02c45e8e3f296ba51", size = 251820, upload-time = "2026-01-11T11:22:02.727Z" }, 208 + { url = "https://files.pythonhosted.org/packages/5a/1c/ee3b707fdac82aeeb92d1a113f803cf6d0f37bdca0849cb489553e1f417a/tomli-2.4.0-cp312-cp312-win32.whl", hash = "sha256:0408e3de5ec77cc7f81960c362543cbbd91ef883e3138e81b729fc3eea5b9729", size = 97712, upload-time = "2026-01-11T11:22:03.777Z" }, 209 + { url = "https://files.pythonhosted.org/packages/69/13/c07a9177d0b3bab7913299b9278845fc6eaaca14a02667c6be0b0a2270c8/tomli-2.4.0-cp312-cp312-win_amd64.whl", hash = "sha256:685306e2cc7da35be4ee914fd34ab801a6acacb061b6a7abca922aaf9ad368da", size = 108296, upload-time = "2026-01-11T11:22:04.86Z" }, 210 + { url = "https://files.pythonhosted.org/packages/18/27/e267a60bbeeee343bcc279bb9e8fbed0cbe224bc7b2a3dc2975f22809a09/tomli-2.4.0-cp312-cp312-win_arm64.whl", hash = "sha256:5aa48d7c2356055feef06a43611fc401a07337d5b006be13a30f6c58f869e3c3", size = 94553, upload-time = "2026-01-11T11:22:05.854Z" }, 211 + { url = "https://files.pythonhosted.org/packages/34/91/7f65f9809f2936e1f4ce6268ae1903074563603b2a2bd969ebbda802744f/tomli-2.4.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:84d081fbc252d1b6a982e1870660e7330fb8f90f676f6e78b052ad4e64714bf0", size = 154915, upload-time = "2026-01-11T11:22:06.703Z" }, 212 + { url = "https://files.pythonhosted.org/packages/20/aa/64dd73a5a849c2e8f216b755599c511badde80e91e9bc2271baa7b2cdbb1/tomli-2.4.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:9a08144fa4cba33db5255f9b74f0b89888622109bd2776148f2597447f92a94e", size = 149038, upload-time = "2026-01-11T11:22:07.56Z" }, 213 + { url = "https://files.pythonhosted.org/packages/9e/8a/6d38870bd3d52c8d1505ce054469a73f73a0fe62c0eaf5dddf61447e32fa/tomli-2.4.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c73add4bb52a206fd0c0723432db123c0c75c280cbd67174dd9d2db228ebb1b4", size = 242245, upload-time = "2026-01-11T11:22:08.344Z" }, 214 + { url = "https://files.pythonhosted.org/packages/59/bb/8002fadefb64ab2669e5b977df3f5e444febea60e717e755b38bb7c41029/tomli-2.4.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:1fb2945cbe303b1419e2706e711b7113da57b7db31ee378d08712d678a34e51e", size = 250335, upload-time = "2026-01-11T11:22:09.951Z" }, 215 + { url = "https://files.pythonhosted.org/packages/a5/3d/4cdb6f791682b2ea916af2de96121b3cb1284d7c203d97d92d6003e91c8d/tomli-2.4.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:bbb1b10aa643d973366dc2cb1ad94f99c1726a02343d43cbc011edbfac579e7c", size = 245962, upload-time = "2026-01-11T11:22:11.27Z" }, 216 + { url = "https://files.pythonhosted.org/packages/f2/4a/5f25789f9a460bd858ba9756ff52d0830d825b458e13f754952dd15fb7bb/tomli-2.4.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:4cbcb367d44a1f0c2be408758b43e1ffb5308abe0ea222897d6bfc8e8281ef2f", size = 250396, upload-time = "2026-01-11T11:22:12.325Z" }, 217 + { url = "https://files.pythonhosted.org/packages/aa/2f/b73a36fea58dfa08e8b3a268750e6853a6aac2a349241a905ebd86f3047a/tomli-2.4.0-cp313-cp313-win32.whl", hash = "sha256:7d49c66a7d5e56ac959cb6fc583aff0651094ec071ba9ad43df785abc2320d86", size = 97530, upload-time = "2026-01-11T11:22:13.865Z" }, 218 + { url = "https://files.pythonhosted.org/packages/3b/af/ca18c134b5d75de7e8dc551c5234eaba2e8e951f6b30139599b53de9c187/tomli-2.4.0-cp313-cp313-win_amd64.whl", hash = "sha256:3cf226acb51d8f1c394c1b310e0e0e61fecdd7adcb78d01e294ac297dd2e7f87", size = 108227, upload-time = "2026-01-11T11:22:15.224Z" }, 219 + { url = "https://files.pythonhosted.org/packages/22/c3/b386b832f209fee8073c8138ec50f27b4460db2fdae9ffe022df89a57f9b/tomli-2.4.0-cp313-cp313-win_arm64.whl", hash = "sha256:d20b797a5c1ad80c516e41bc1fb0443ddb5006e9aaa7bda2d71978346aeb9132", size = 94748, upload-time = "2026-01-11T11:22:16.009Z" }, 220 + { url = "https://files.pythonhosted.org/packages/f3/c4/84047a97eb1004418bc10bdbcfebda209fca6338002eba2dc27cc6d13563/tomli-2.4.0-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:26ab906a1eb794cd4e103691daa23d95c6919cc2fa9160000ac02370cc9dd3f6", size = 154725, upload-time = "2026-01-11T11:22:17.269Z" }, 221 + { url = "https://files.pythonhosted.org/packages/a8/5d/d39038e646060b9d76274078cddf146ced86dc2b9e8bbf737ad5983609a0/tomli-2.4.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:20cedb4ee43278bc4f2fee6cb50daec836959aadaf948db5172e776dd3d993fc", size = 148901, upload-time = "2026-01-11T11:22:18.287Z" }, 222 + { url = "https://files.pythonhosted.org/packages/73/e5/383be1724cb30f4ce44983d249645684a48c435e1cd4f8b5cded8a816d3c/tomli-2.4.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:39b0b5d1b6dd03684b3fb276407ebed7090bbec989fa55838c98560c01113b66", size = 243375, upload-time = "2026-01-11T11:22:19.154Z" }, 223 + { url = "https://files.pythonhosted.org/packages/31/f0/bea80c17971c8d16d3cc109dc3585b0f2ce1036b5f4a8a183789023574f2/tomli-2.4.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a26d7ff68dfdb9f87a016ecfd1e1c2bacbe3108f4e0f8bcd2228ef9a766c787d", size = 250639, upload-time = "2026-01-11T11:22:20.168Z" }, 224 + { url = "https://files.pythonhosted.org/packages/2c/8f/2853c36abbb7608e3f945d8a74e32ed3a74ee3a1f468f1ffc7d1cb3abba6/tomli-2.4.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:20ffd184fb1df76a66e34bd1b36b4a4641bd2b82954befa32fe8163e79f1a702", size = 246897, upload-time = "2026-01-11T11:22:21.544Z" }, 225 + { url = "https://files.pythonhosted.org/packages/49/f0/6c05e3196ed5337b9fe7ea003e95fd3819a840b7a0f2bf5a408ef1dad8ed/tomli-2.4.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:75c2f8bbddf170e8effc98f5e9084a8751f8174ea6ccf4fca5398436e0320bc8", size = 254697, upload-time = "2026-01-11T11:22:23.058Z" }, 226 + { url = "https://files.pythonhosted.org/packages/f3/f5/2922ef29c9f2951883525def7429967fc4d8208494e5ab524234f06b688b/tomli-2.4.0-cp314-cp314-win32.whl", hash = "sha256:31d556d079d72db7c584c0627ff3a24c5d3fb4f730221d3444f3efb1b2514776", size = 98567, upload-time = "2026-01-11T11:22:24.033Z" }, 227 + { url = "https://files.pythonhosted.org/packages/7b/31/22b52e2e06dd2a5fdbc3ee73226d763b184ff21fc24e20316a44ccc4d96b/tomli-2.4.0-cp314-cp314-win_amd64.whl", hash = "sha256:43e685b9b2341681907759cf3a04e14d7104b3580f808cfde1dfdb60ada85475", size = 108556, upload-time = "2026-01-11T11:22:25.378Z" }, 228 + { url = "https://files.pythonhosted.org/packages/48/3d/5058dff3255a3d01b705413f64f4306a141a8fd7a251e5a495e3f192a998/tomli-2.4.0-cp314-cp314-win_arm64.whl", hash = "sha256:3d895d56bd3f82ddd6faaff993c275efc2ff38e52322ea264122d72729dca2b2", size = 96014, upload-time = "2026-01-11T11:22:26.138Z" }, 229 + { url = "https://files.pythonhosted.org/packages/b8/4e/75dab8586e268424202d3a1997ef6014919c941b50642a1682df43204c22/tomli-2.4.0-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:5b5807f3999fb66776dbce568cc9a828544244a8eb84b84b9bafc080c99597b9", size = 163339, upload-time = "2026-01-11T11:22:27.143Z" }, 230 + { url = "https://files.pythonhosted.org/packages/06/e3/b904d9ab1016829a776d97f163f183a48be6a4deb87304d1e0116a349519/tomli-2.4.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:c084ad935abe686bd9c898e62a02a19abfc9760b5a79bc29644463eaf2840cb0", size = 159490, upload-time = "2026-01-11T11:22:28.399Z" }, 231 + { url = "https://files.pythonhosted.org/packages/e3/5a/fc3622c8b1ad823e8ea98a35e3c632ee316d48f66f80f9708ceb4f2a0322/tomli-2.4.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:0f2e3955efea4d1cfbcb87bc321e00dc08d2bcb737fd1d5e398af111d86db5df", size = 269398, upload-time = "2026-01-11T11:22:29.345Z" }, 232 + { url = "https://files.pythonhosted.org/packages/fd/33/62bd6152c8bdd4c305ad9faca48f51d3acb2df1f8791b1477d46ff86e7f8/tomli-2.4.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0e0fe8a0b8312acf3a88077a0802565cb09ee34107813bba1c7cd591fa6cfc8d", size = 276515, upload-time = "2026-01-11T11:22:30.327Z" }, 233 + { url = "https://files.pythonhosted.org/packages/4b/ff/ae53619499f5235ee4211e62a8d7982ba9e439a0fb4f2f351a93d67c1dd2/tomli-2.4.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:413540dce94673591859c4c6f794dfeaa845e98bf35d72ed59636f869ef9f86f", size = 273806, upload-time = "2026-01-11T11:22:32.56Z" }, 234 + { url = "https://files.pythonhosted.org/packages/47/71/cbca7787fa68d4d0a9f7072821980b39fbb1b6faeb5f5cf02f4a5559fa28/tomli-2.4.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:0dc56fef0e2c1c470aeac5b6ca8cc7b640bb93e92d9803ddaf9ea03e198f5b0b", size = 281340, upload-time = "2026-01-11T11:22:33.505Z" }, 235 + { url = "https://files.pythonhosted.org/packages/f5/00/d595c120963ad42474cf6ee7771ad0d0e8a49d0f01e29576ee9195d9ecdf/tomli-2.4.0-cp314-cp314t-win32.whl", hash = "sha256:d878f2a6707cc9d53a1be1414bbb419e629c3d6e67f69230217bb663e76b5087", size = 108106, upload-time = "2026-01-11T11:22:34.451Z" }, 236 + { url = "https://files.pythonhosted.org/packages/de/69/9aa0c6a505c2f80e519b43764f8b4ba93b5a0bbd2d9a9de6e2b24271b9a5/tomli-2.4.0-cp314-cp314t-win_amd64.whl", hash = "sha256:2add28aacc7425117ff6364fe9e06a183bb0251b03f986df0e78e974047571fd", size = 120504, upload-time = "2026-01-11T11:22:35.764Z" }, 237 + { url = "https://files.pythonhosted.org/packages/b3/9f/f1668c281c58cfae01482f7114a4b88d345e4c140386241a1a24dcc9e7bc/tomli-2.4.0-cp314-cp314t-win_arm64.whl", hash = "sha256:2b1e3b80e1d5e52e40e9b924ec43d81570f0e7d09d11081b797bc4692765a3d4", size = 99561, upload-time = "2026-01-11T11:22:36.624Z" }, 238 + { url = "https://files.pythonhosted.org/packages/23/d1/136eb2cb77520a31e1f64cbae9d33ec6df0d78bdf4160398e86eec8a8754/tomli-2.4.0-py3-none-any.whl", hash = "sha256:1f776e7d669ebceb01dee46484485f43a4048746235e683bcdffacdf1fb4785a", size = 14477, upload-time = "2026-01-11T11:22:37.446Z" }, 239 + ] 240 + 241 + [[package]] 242 + name = "typing-extensions" 243 + version = "4.15.0" 244 + source = { registry = "https://pypi.org/simple" } 245 + sdist = { url = "https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz", hash = "sha256:0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466", size = 109391, upload-time = "2025-08-25T13:49:26.313Z" } 246 + wheels = [ 247 + { url = "https://files.pythonhosted.org/packages/18/67/36e9267722cc04a6b9f15c7f3441c2363321a3ea07da7ae0c0707beb2a9c/typing_extensions-4.15.0-py3-none-any.whl", hash = "sha256:f0fa19c6845758ab08074a0cfa8b7aecb71c999ca73d62883bc25cc018c4e548", size = 44614, upload-time = "2025-08-25T13:49:24.86Z" }, 248 + ]