Skip to content

Commit

Permalink
Use implicit cls instead of explicit self reference, allows for easie…
Browse files Browse the repository at this point in the history
…r subclassing
  • Loading branch information
Hultner committed May 26, 2020
1 parent 7a50f9d commit 7a022ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rich/markdown.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ class Heading(TextElement):

@classmethod
def create(cls, markdown: "Markdown", node: Any) -> "Heading":
heading = Heading(node.level)
heading = cls(node.level)
return heading

def on_enter(self, context: "MarkdownContext") -> None:
Expand Down

0 comments on commit 7a022ab

Please sign in to comment.