You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Refactor(Optimizer): improve typing coverage of optimizer modules (#7446)
* refactor (optimizer): add various type annotations to public functions
* refactor(optimizer): add various type annotations to simplify module
* refactor(optimizer): improve documnetation for `OptimizerFn` Protocol
* Chore: ran ruff format
* refactor (optimizer): going back to original import pattern for `normalized`. the caller site is currently untypted anyway
* refactor (optimizer): make `_simplify_integer_cast` generic, optimize function body to avoid redundant/type unsafe double isinstance check
* fix: make `S` TypeVar a runtime concrete value for mypc
* fix: for some reason mypc don't work well with generics for `_simplify_integer_cast`. trying with overloads
* fix: revert `_simplify_integer_cast` to original typing to avoid mypc issues
* Fix: Use a Protocol for `eval_boolean`, since it can take any comparable value
* Chore: run formatter
* Refactor (optimizer): widen some helper functions input types
* refactor (optimizer): use `TypeIs` in `simplify_literals` for type narrowing
* chore: ruff format
* fix: added various return types to `simplify` functions
* chore: ruff format
* fix: annotate `_simplify_comparison` return type
* refactor: add type hints to `extract_interval` and `date_literal`
* fix: widen return type of `date_literal` to satisfy mypc
0 commit comments