Commit 7b360e6
authored
add mypy-based validation, drop syntactic check on return type (#536)
* add mypy-based validation, drop syntactic check on return type
* resurrects tests for test_handlers_llm_encoding.py
* switched to type error instead of value error
* neatened up type checking tests
* added mypy to llm dependencies
* switched to use typing_extensions TypeAliasType
* moved type checking to an operation
* refined exception guard and switched to any instead of skipping bindings with un-representable types
* refactored code to construct asts, added more systematic tests, and checks
* updated deps of llm submodule
* llm tests all pass
* minor bug
* ruff formatting
* updated imports to include sys.modules
* restricted sys.modules in imports and suppressed warnings on importing untyped modules
* added ignore to ast.FunctionDef
* updated to use ruff to clean up generated code and avoid redundant mypy lag
* updated codeadapt fixture
* added --unsafe-fixes to ruff invocation
* updated prompt
* format notebook
* format notebook
* switched from ruff to autoflake
* fix for __init__
* fixed test with __init__ returning None
* final fixes
* added type_checking1 parent c2491e6 commit 7b360e6
12 files changed
Lines changed: 2825 additions & 888 deletions
File tree
- docs/source
- effectful/handlers/llm
- tests
- fixtures
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
272 | 272 | | |
273 | 273 | | |
274 | 274 | | |
275 | | - | |
| 275 | + | |
276 | 276 | | |
277 | 277 | | |
278 | 278 | | |
| |||
366 | 366 | | |
367 | 367 | | |
368 | 368 | | |
369 | | - | |
370 | | - | |
371 | | - | |
372 | | - | |
373 | | - | |
374 | | - | |
375 | | - | |
376 | | - | |
377 | 369 | | |
378 | 370 | | |
379 | 371 | | |
| |||
455 | 447 | | |
456 | 448 | | |
457 | 449 | | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
458 | 455 | | |
459 | 456 | | |
460 | 457 | | |
| |||
620 | 617 | | |
621 | 618 | | |
622 | 619 | | |
623 | | - | |
| 620 | + | |
624 | 621 | | |
625 | 622 | | |
626 | 623 | | |
0 commit comments