Skip to content

Commit

Permalink
Maint: features.__init__
Browse files Browse the repository at this point in the history
  • Loading branch information
AhmetNSimsek committed Dec 14, 2023
1 parent 36c18cd commit 760d10b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions siibra/features/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@

from typing import Union
from .feature import Feature
get = Feature._match

get = Feature._match

TYPES = Feature._get_subclasses() # Feature types that can be used to query for features

Expand Down Expand Up @@ -60,12 +60,13 @@ def render_ascii_tree(class_or_classname: Union[type, str]):
Parameters
----------
Cls: Feature class, str
class_or_classname: type, str
Any Feature class or string of the feature type name
"""
from anytree.importer import DictImporter
from anytree import RenderTree
Cls = TYPES[class_or_classname] if isinstance(class_or_classname, str) else class_or_classname
assert isinstance(Cls, Feature)

def create_treenode(feature_type):
return {
Expand Down

0 comments on commit 760d10b

Please sign in to comment.