Skip to content

Commit f8e8733

Browse files
Few small lints
1 parent fb4a2c3 commit f8e8733

File tree

4 files changed

+3
-5
lines changed

4 files changed

+3
-5
lines changed

docs/changelog.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ _This project uses semantic versioning_
55
## UNRELEASED
66

77
- Add WIP `egglog.exp.any_expr` code for tracing arbitrary expressions with Python fallback [#366](https://github.com/egraphs-good/egglog-python/pull/366)
8-
- BREAKING: Remove suport for Python 3.11 now that pyo3 has dropped support.
8+
- BREAKING: Remove support for Python 3.11 now that pyo3 has dropped support.
99
- Allow mutating methods to update their underlying expression via `Expr.__replace_expr__`, and ensure default rewrites return the mutated receiver when using `mutates_self` or `mutates_first_arg`.
1010
- BREAKING: Store `PyObject` values as `cloudpickle` bytes instead of live references so duplicates merge by value; `.value` now returns a fresh copy and the sort accepts objects like `None` that previously failed.
1111
- Adds a `__call__` method (and `call_extended` for kwargs) to `PyObject` to replace `py_eval_fn`, which is now deprecated.

python/egglog/conversion.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,3 @@ def resolve_type(x: object) -> JustTypeRef | type:
288288
if isinstance(x, RuntimeExpr):
289289
return x.__egg_typed_expr__.tp
290290
return type(x)
291-
# If this value has a custom metaclass, let's use that as our index instead of the type
292-
# if type(tp) is not type:
293-
# return type(tp)

python/egglog/exp/any_expr.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ def __getattr__(self, name: StringLike) -> AnyExpr | Any:
178178
return any_eval(res)
179179
return with_assert(res)
180180

181+
# TODO: Not working for now
181182
# @method(mutates_self=True)
182183
# def __setattr__(self, name: StringLike, value: object) -> None:
183184
# """

src/py_object_sort.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ impl BaseSort for PyObjectSort {
111111
// (py-call <fn-obj> [<arg-object>]*)
112112
add_primitive!(eg, "py-call" = [xs: PyPickledValue] -?> PyPickledValue {
113113
attach("py-call", |py| {
114-
let xs = xs.map(|x| load(py, &x)).collect::<PyResult<Vec<_>>>().map_err(|e| {e.add_note(py, "Loadng arguments").unwrap(); e})?;
114+
let xs = xs.map(|x| load(py, &x)).collect::<PyResult<Vec<_>>>().map_err(|e| {e.add_note(py, "Loading arguments").unwrap(); e})?;
115115
let fn_obj = &xs[0];
116116
let args = PyTuple::new(py, xs[1..].to_vec()).map_err(|e| {e.add_note(py, "Creating tuple").unwrap(); e})?;
117117
dump(fn_obj.call1(args).map_err(|e| {e.add_note(py, format!("Calling function {}", fn_obj)).unwrap(); e})?)

0 commit comments

Comments
 (0)