Skip to content

Commit

Permalink
Fix String DType incorrect name
Browse files Browse the repository at this point in the history
  • Loading branch information
NMAC427 committed Jul 20, 2023
1 parent 1ca9ac0 commit f15a247
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/pydiverse/transform/core/ops/dtypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class Float(DType):


class String(DType):
name = "float"
name = "str"


class Bool(DType):
Expand Down
9 changes: 9 additions & 0 deletions src/pydiverse/transform/core/ops/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import functools
import inspect
import itertools
import textwrap
import typing
from functools import partial

Expand Down Expand Up @@ -381,6 +382,14 @@ class TrieNode:
operator: OperatorImpl | None
children: list[OperatorImplementationStore.TrieNode]

def __repr__(self):
self_text = f"({self.value} - {self.operator})"
if self.children:
children_text = "\n".join(repr(c) for c in self.children)
children_text = textwrap.indent(children_text, " ")
return self_text + "\n" + children_text
return self_text

def __init__(self, operator: Operator):
self.operator = operator
self.root = self.TrieNode("ROOT", None, [])
Expand Down

0 comments on commit f15a247

Please sign in to comment.