Skip to content

Commit

Permalink
revert default colors
Browse files Browse the repository at this point in the history
  • Loading branch information
DudeNr33 committed Feb 8, 2023
1 parent 24f6e4a commit 31ccdb3
Show file tree
Hide file tree
Showing 6 changed files with 56 additions and 37 deletions.
37 changes: 28 additions & 9 deletions pylint/pyreverse/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,35 @@
)

DEFAULT_COLOR_PALETTE = (
"aliceblue",
"antiquewhite",
"aquamarine",
"burlywood",
"cadetblue",
"chartreuse",
"chocolate",
"coral",
"cornflowerblue",
"cyan",
"darkgoldenrod",
"darkseagreen",
"dodgerblue",
"orange",
"teal",
"sienna",
"orchid",
"lightsalmon",
"plum",
"gray",
"yellow",
"steelblue",
"forestgreen",
"gold",
"hotpink",
"mediumspringgreen",
# TODO for 3.0: replace the colors above with the ones below
# Those are more colorblind friendly
# "dodgerblue",
# "orange",
# "teal",
# "sienna",
# "orchid",
# "lightsalmon",
# "plum",
# "gray",
# "yellow",
# "steelblue",
)

OPTIONS: Options = (
Expand Down
16 changes: 8 additions & 8 deletions tests/pyreverse/data/classes_colorized.dot
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
digraph "classes_colorized" {
rankdir=BT
charset="utf-8"
"data.clientmodule_test.Ancestor" [color="dodgerblue", fontcolor="black", label=<{Ancestor|attr : str<br ALIGN="LEFT"/>cls_member<br ALIGN="LEFT"/>|get_value()<br ALIGN="LEFT"/>set_value(value)<br ALIGN="LEFT"/>}>, shape="record", style="filled"];
"data.suppliermodule_test.CustomException" [color="dodgerblue", fontcolor="red", label=<{CustomException|<br ALIGN="LEFT"/>|}>, shape="record", style="filled"];
"data.suppliermodule_test.DoNothing" [color="dodgerblue", fontcolor="black", label=<{DoNothing|<br ALIGN="LEFT"/>|}>, shape="record", style="filled"];
"data.suppliermodule_test.DoNothing2" [color="dodgerblue", fontcolor="black", label=<{DoNothing2|<br ALIGN="LEFT"/>|}>, shape="record", style="filled"];
"data.suppliermodule_test.DoSomething" [color="dodgerblue", fontcolor="black", label=<{DoSomething|my_int : Optional[int]<br ALIGN="LEFT"/>my_int_2 : Optional[int]<br ALIGN="LEFT"/>my_string : str<br ALIGN="LEFT"/>|do_it(new_int: int): int<br ALIGN="LEFT"/>}>, shape="record", style="filled"];
"data.suppliermodule_test.Interface" [color="dodgerblue", fontcolor="black", label=<{Interface|<br ALIGN="LEFT"/>|<I>get_value</I>()<br ALIGN="LEFT"/><I>set_value</I>(value)<br ALIGN="LEFT"/>}>, shape="record", style="filled"];
"data.property_pattern.PropertyPatterns" [color="dodgerblue", fontcolor="black", label=<{PropertyPatterns|prop1<br ALIGN="LEFT"/>prop2<br ALIGN="LEFT"/>|}>, shape="record", style="filled"];
"data.clientmodule_test.Specialization" [color="dodgerblue", fontcolor="black", label=<{Specialization|TYPE : str<br ALIGN="LEFT"/>relation<br ALIGN="LEFT"/>relation2<br ALIGN="LEFT"/>top : str<br ALIGN="LEFT"/>|from_value(value: int)<br ALIGN="LEFT"/>increment_value(): None<br ALIGN="LEFT"/>transform_value(value: int): int<br ALIGN="LEFT"/>}>, shape="record", style="filled"];
"data.clientmodule_test.Ancestor" [color="aliceblue", fontcolor="black", label=<{Ancestor|attr : str<br ALIGN="LEFT"/>cls_member<br ALIGN="LEFT"/>|get_value()<br ALIGN="LEFT"/>set_value(value)<br ALIGN="LEFT"/>}>, shape="record", style="filled"];
"data.suppliermodule_test.CustomException" [color="aliceblue", fontcolor="red", label=<{CustomException|<br ALIGN="LEFT"/>|}>, shape="record", style="filled"];
"data.suppliermodule_test.DoNothing" [color="aliceblue", fontcolor="black", label=<{DoNothing|<br ALIGN="LEFT"/>|}>, shape="record", style="filled"];
"data.suppliermodule_test.DoNothing2" [color="aliceblue", fontcolor="black", label=<{DoNothing2|<br ALIGN="LEFT"/>|}>, shape="record", style="filled"];
"data.suppliermodule_test.DoSomething" [color="aliceblue", fontcolor="black", label=<{DoSomething|my_int : Optional[int]<br ALIGN="LEFT"/>my_int_2 : Optional[int]<br ALIGN="LEFT"/>my_string : str<br ALIGN="LEFT"/>|do_it(new_int: int): int<br ALIGN="LEFT"/>}>, shape="record", style="filled"];
"data.suppliermodule_test.Interface" [color="aliceblue", fontcolor="black", label=<{Interface|<br ALIGN="LEFT"/>|<I>get_value</I>()<br ALIGN="LEFT"/><I>set_value</I>(value)<br ALIGN="LEFT"/>}>, shape="record", style="filled"];
"data.property_pattern.PropertyPatterns" [color="aliceblue", fontcolor="black", label=<{PropertyPatterns|prop1<br ALIGN="LEFT"/>prop2<br ALIGN="LEFT"/>|}>, shape="record", style="filled"];
"data.clientmodule_test.Specialization" [color="aliceblue", fontcolor="black", label=<{Specialization|TYPE : str<br ALIGN="LEFT"/>relation<br ALIGN="LEFT"/>relation2<br ALIGN="LEFT"/>top : str<br ALIGN="LEFT"/>|from_value(value: int)<br ALIGN="LEFT"/>increment_value(): None<br ALIGN="LEFT"/>transform_value(value: int): int<br ALIGN="LEFT"/>}>, shape="record", style="filled"];
"data.clientmodule_test.Specialization" -> "data.clientmodule_test.Ancestor" [arrowhead="empty", arrowtail="none"];
"data.clientmodule_test.Ancestor" -> "data.suppliermodule_test.Interface" [arrowhead="empty", arrowtail="node", style="dashed"];
"data.suppliermodule_test.DoNothing" -> "data.clientmodule_test.Ancestor" [arrowhead="diamond", arrowtail="none", fontcolor="green", label="cls_member", style="solid"];
Expand Down
16 changes: 8 additions & 8 deletions tests/pyreverse/data/classes_colorized.puml
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
@startuml classes_colorized
set namespaceSeparator none
class "Ancestor" as data.clientmodule_test.Ancestor #dodgerblue {
class "Ancestor" as data.clientmodule_test.Ancestor #aliceblue {
attr : str
cls_member
get_value()
set_value(value)
}
class "<color:red>CustomException</color>" as data.suppliermodule_test.CustomException #dodgerblue {
class "<color:red>CustomException</color>" as data.suppliermodule_test.CustomException #aliceblue {
}
class "DoNothing" as data.suppliermodule_test.DoNothing #dodgerblue {
class "DoNothing" as data.suppliermodule_test.DoNothing #aliceblue {
}
class "DoNothing2" as data.suppliermodule_test.DoNothing2 #dodgerblue {
class "DoNothing2" as data.suppliermodule_test.DoNothing2 #aliceblue {
}
class "DoSomething" as data.suppliermodule_test.DoSomething #dodgerblue {
class "DoSomething" as data.suppliermodule_test.DoSomething #aliceblue {
my_int : Optional[int]
my_int_2 : Optional[int]
my_string : str
do_it(new_int: int) -> int
}
class "Interface" as data.suppliermodule_test.Interface #dodgerblue {
class "Interface" as data.suppliermodule_test.Interface #aliceblue {
{abstract}get_value()
{abstract}set_value(value)
}
class "PropertyPatterns" as data.property_pattern.PropertyPatterns #dodgerblue {
class "PropertyPatterns" as data.property_pattern.PropertyPatterns #aliceblue {
prop1
prop2
}
class "Specialization" as data.clientmodule_test.Specialization #dodgerblue {
class "Specialization" as data.clientmodule_test.Specialization #aliceblue {
TYPE : str
relation
relation2
Expand Down
8 changes: 4 additions & 4 deletions tests/pyreverse/data/packages_colorized.dot
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
digraph "packages_colorized" {
rankdir=BT
charset="utf-8"
"data" [color="dodgerblue", label=<data>, shape="box", style="filled"];
"data.clientmodule_test" [color="dodgerblue", label=<data.clientmodule_test>, shape="box", style="filled"];
"data.property_pattern" [color="dodgerblue", label=<data.property_pattern>, shape="box", style="filled"];
"data.suppliermodule_test" [color="dodgerblue", label=<data.suppliermodule_test>, shape="box", style="filled"];
"data" [color="aliceblue", label=<data>, shape="box", style="filled"];
"data.clientmodule_test" [color="aliceblue", label=<data.clientmodule_test>, shape="box", style="filled"];
"data.property_pattern" [color="aliceblue", label=<data.property_pattern>, shape="box", style="filled"];
"data.suppliermodule_test" [color="aliceblue", label=<data.suppliermodule_test>, shape="box", style="filled"];
"data.clientmodule_test" -> "data.suppliermodule_test" [arrowhead="open", arrowtail="none"];
}
8 changes: 4 additions & 4 deletions tests/pyreverse/data/packages_colorized.puml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
@startuml packages_colorized
set namespaceSeparator none
package "data" as data #dodgerblue {
package "data" as data #aliceblue {

}
package "data.clientmodule_test" as data.clientmodule_test #dodgerblue {
package "data.clientmodule_test" as data.clientmodule_test #aliceblue {

}
package "data.property_pattern" as data.property_pattern #dodgerblue {
package "data.property_pattern" as data.property_pattern #aliceblue {

}
package "data.suppliermodule_test" as data.suppliermodule_test #dodgerblue {
package "data.suppliermodule_test" as data.suppliermodule_test #aliceblue {

}
data.clientmodule_test --> data.suppliermodule_test
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
@startuml classes
set namespaceSeparator none
class "CheckerCollector" as colorized.CheckerCollector #dodgerblue {
class "CheckerCollector" as colorized.CheckerCollector #aliceblue {
checker1
checker2
checker3
}
class "ElseifUsedChecker" as pylint.extensions.check_elif.ElseifUsedChecker #orange {
class "ElseifUsedChecker" as pylint.extensions.check_elif.ElseifUsedChecker #antiquewhite {
msgs : dict
name : str
leave_module(_: nodes.Module) -> None
process_tokens(tokens: list[TokenInfo]) -> None
visit_if(node: nodes.If) -> None
}
class "ExceptionsChecker" as pylint.checkers.exceptions.ExceptionsChecker #teal {
class "ExceptionsChecker" as pylint.checkers.exceptions.ExceptionsChecker #aquamarine {
msgs : dict
name : str
options : tuple
Expand All @@ -22,7 +22,7 @@ class "ExceptionsChecker" as pylint.checkers.exceptions.ExceptionsChecker #teal
visit_raise(node: nodes.Raise) -> None
visit_tryexcept(node: nodes.TryExcept) -> None
}
class "StdlibChecker" as pylint.checkers.stdlib.StdlibChecker #teal {
class "StdlibChecker" as pylint.checkers.stdlib.StdlibChecker #aquamarine {
msgs : dict[str, MessageDefinitionTuple]
name : str
deprecated_arguments(method: str) -> tuple[tuple[int | None, str], ...]
Expand Down

0 comments on commit 31ccdb3

Please sign in to comment.