egglog 8.0.0__cp312-none-win_amd64.whl → 8.0.1__cp312-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/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"]) # noqa: PD901
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 == object:
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