Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)
That's it!
(async function generateReplies(document) { | |
// https://conventionalcomments.org/#labels | |
const LABEL = { | |
praise: "praise", | |
nitpick: "nitpick", | |
suggestion: "suggestion", | |
issue: "issue", | |
todo: "todo", | |
question: "question", | |
thought: "thought", |
Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)
That's it!