Skip to content

Commit

Permalink
fix type annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
mozman committed Jun 27, 2024
1 parent 10617b6 commit 80d28df
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/ezdxf/entities/dxfgfx.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,14 +227,13 @@ def post_new_hook(self) -> None:
)

@property
def rgb(self) -> Optional[clr.RGB | tuple[int, int, int]]:
def rgb(self) -> tuple[int, int, int] | None:
"""Returns RGB true color as (r, g, b) tuple or None if true_color is
not set.
"""
if self.dxf.hasattr("true_color"):
return clr.int2rgb(self.dxf.get("true_color"))
else:
return None
return None

@rgb.setter
def rgb(self, rgb: clr.RGB | tuple[int, int, int]) -> None:
Expand Down

0 comments on commit 80d28df

Please sign in to comment.