Skip to content

Instantly share code, notes, and snippets.

@abelcheung
Last active February 23, 2023 04:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abelcheung/6dd02527d3073176836d93aa9ecea7ba to your computer and use it in GitHub Desktop.
Save abelcheung/6dd02527d3073176836d93aa9ecea7ba to your computer and use it in GitHub Desktop.
UML diagram of lxml.etree Element inheritance in source and in stub
@startuml
!theme materia
hide empty members
!$notable_cls_color = "#header:Teal|DarkTurquoise"
skinparam title {
RoundCorner 15
BorderThickness 2
Padding 10
FontSize 24
}
skinparam classFontSize 14
skinparam classFontColor white
skinparam backgroundColor transparent
title Lxml Element Class Inheritance
!procedure $notable($class)
class $class $notable_cls_color
!endprocedure
package lxml.etree #LightSteelBlue {
class "_Element"
"__ContentOnlyElement" -|> "_Element"
"__ContentOnlyElement" <|-- "_Comment"
"__ContentOnlyElement" <|-- "_ProcessingInstruction"
"__ContentOnlyElement" <|-- "_Entity"
"_Comment" <|-- CommentBase
"_ProcessingInstruction" <|-- PIBase
"_Entity" <|-- EntityBase
"_Element" <|--- ElementBase
$notable("_Element")
}
package "lxml.html" #PaleGreen {
lxml.etree.ElementBase <|-- HtmlElement
lxml.etree.CommentBase <|-- HtmlComment
lxml.etree.PIBase <|-- HtmlPI
lxml.etree.EntityBase <|-- HtmlEntity
HtmlElement --|> HtmlMixin
HtmlComment --|> HtmlMixin
HtmlPI --|> HtmlMixin
HtmlEntity --|> HtmlMixin
package "Form related" #SteelBlue|CornFlowerBlue {
}
HtmlElement <|-- "Form related"
HtmlElement <|-- LabelElement
$notable("HtmlElement")
}
package "lxml.objectify" #LightSkyBlue {
lxml.etree.ElementBase <|-- ObjectifiedElement
ObjectifiedElement <|-- ObjectifiedDataElement
$notable("ObjectifiedElement")
}
@enduml
@startuml
!theme materia
hide empty members
!$notable_cls_color = "#header:Teal|DarkTurquoise"
!$changed_cls_color = "#header:Orchid|MediumOrchid"
skinparam title {
RoundCorner 15
BorderThickness 2
Padding 10
FontSize 24
}
skinparam classFontSize 14
skinparam classFontColor white
skinparam backgroundColor transparent
title Lxml Element Class Inheritance in stub
!procedure $notable($class)
class $class $notable_cls_color
!endprocedure
!procedure $changed($class)
class $class $changed_cls_color
!endprocedure
package lxml.etree #LightSteelBlue {
class "_Element"
"__ContentOnlyElement" -|> "_Element"
"__ContentOnlyElement" <|-- "_Comment"
"__ContentOnlyElement" <|-- "_ProcessingInstruction"
"__ContentOnlyElement" <|-- "_Entity"
"_Comment" <|-- CommentBase
"_ProcessingInstruction" <|-- PIBase
"_Entity" <|-- EntityBase
"_Element" <|--- ElementBase
$notable("_Element")
}
package "lxml.html" #PaleGreen {
class "HtmlElement" {
{field} merge all HtmlMixin properties
{method} merge all HtmlMixin methods
}
lxml.etree.ElementBase <|-- HtmlElement
lxml.etree.CommentBase <|--- HtmlComment
lxml.etree.EntityBase <|--- HtmlEntity
HtmlElement <|-- HtmlComment
HtmlElement <|-- HtmlEntity
package "Form related" #SteelBlue|CornFlowerBlue {
}
HtmlElement <|-- "Form related"
HtmlElement <|-- LabelElement
$notable("HtmlElement")
$changed("HtmlComment")
$changed("HtmlEntity")
}
package "lxml.objectify" #LightSkyBlue {
lxml.etree.ElementBase <|-- ObjectifiedElement
ObjectifiedElement <|-- ObjectifiedDataElement
$notable("ObjectifiedElement")
}
@enduml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment