egglog 8.0.0__cp310-none-win_amd64.whl → 8.0.1__cp310-none-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of egglog might be problematic. Click here for more details.
- egglog/bindings.cp310-win_amd64.pyd +0 -0
- egglog/bindings.pyi +49 -35
- egglog/conversion.py +1 -1
- egglog/declarations.py +1 -2
- egglog/egraph.py +23 -10
- egglog/egraph_state.py +12 -5
- egglog/examples/higher_order_functions.py +1 -1
- egglog/exp/array_api.py +17 -14
- egglog/exp/array_api_jit.py +4 -5
- egglog/exp/array_api_loopnest.py +15 -11
- egglog/exp/array_api_program_gen.py +11 -13
- egglog/exp/program_gen.py +23 -17
- egglog/ipython_magic.py +1 -1
- egglog/pretty.py +4 -4
- egglog/runtime.py +1 -1
- egglog/visualizer.css +1 -1
- egglog/visualizer.js +1658 -1637
- {egglog-8.0.0.dist-info → egglog-8.0.1.dist-info}/METADATA +2 -2
- {egglog-8.0.0.dist-info → egglog-8.0.1.dist-info}/RECORD +21 -21
- {egglog-8.0.0.dist-info → egglog-8.0.1.dist-info}/WHEEL +0 -0
- {egglog-8.0.0.dist-info → egglog-8.0.1.dist-info}/licenses/LICENSE +0 -0
egglog/pretty.py
CHANGED
|
@@ -147,7 +147,7 @@ class TraverseContext:
|
|
|
147
147
|
"""
|
|
148
148
|
return PrettyContext(self.decls, self.parents)
|
|
149
149
|
|
|
150
|
-
def __call__(self, decl: AllDecls, toplevel: bool = False) -> None: # noqa: C901
|
|
150
|
+
def __call__(self, decl: AllDecls, toplevel: bool = False) -> None: # noqa: C901, PLR0912
|
|
151
151
|
if not toplevel:
|
|
152
152
|
self.parents[decl] += 1
|
|
153
153
|
if decl in self._seen:
|
|
@@ -236,7 +236,7 @@ class PrettyContext:
|
|
|
236
236
|
return expr_name
|
|
237
237
|
return expr
|
|
238
238
|
|
|
239
|
-
def uncached(self, decl: AllDecls, *, unwrap_lit: bool, parens: bool, ruleset_name: str | None) -> tuple[str, str]: # noqa: PLR0911
|
|
239
|
+
def uncached(self, decl: AllDecls, *, unwrap_lit: bool, parens: bool, ruleset_name: str | None) -> tuple[str, str]: # noqa: C901, PLR0911, PLR0912
|
|
240
240
|
match decl:
|
|
241
241
|
case LitDecl(value):
|
|
242
242
|
match value:
|
|
@@ -382,7 +382,7 @@ class PrettyContext:
|
|
|
382
382
|
return expr_name, tp_name
|
|
383
383
|
return expr, tp_name
|
|
384
384
|
|
|
385
|
-
def _call_inner( # noqa: PLR0911
|
|
385
|
+
def _call_inner( # noqa: C901, PLR0911, PLR0912
|
|
386
386
|
self,
|
|
387
387
|
ref: CallableRef,
|
|
388
388
|
args: list[ExprDecl],
|
|
@@ -513,6 +513,6 @@ def _plot_line_length(expr: object): # pragma: no cover
|
|
|
513
513
|
new_l = len(str(expr).split())
|
|
514
514
|
sizes.append((line_length, diff, new_l))
|
|
515
515
|
|
|
516
|
-
df = pd.DataFrame(sizes, columns=["MAX_LINE_LENGTH", "LENGTH_DIFFERENCE", "n"])
|
|
516
|
+
df = pd.DataFrame(sizes, columns=["MAX_LINE_LENGTH", "LENGTH_DIFFERENCE", "n"])
|
|
517
517
|
|
|
518
518
|
return alt.Chart(df).mark_rect().encode(x="MAX_LINE_LENGTH:O", y="LENGTH_DIFFERENCE:O", color="n:Q")
|
egglog/runtime.py
CHANGED
|
@@ -81,7 +81,7 @@ def resolve_type_annotation(decls: Declarations, tp: object) -> TypeOrVarRef:
|
|
|
81
81
|
return resolve_type_annotation(decls, first)
|
|
82
82
|
|
|
83
83
|
# If the type is `object` then this is assumed to be a PyObjectLike, i.e. converted into a PyObject
|
|
84
|
-
if tp
|
|
84
|
+
if tp is object:
|
|
85
85
|
assert _PY_OBJECT_CLASS
|
|
86
86
|
return resolve_type_annotation(decls, _PY_OBJECT_CLASS)
|
|
87
87
|
# If the type is a `Callable` then convert it into a UnstableFn
|