Fix typehinting in colours.py

This commit is contained in:
2026-06-02 17:21:46 +10:00
parent 0ec2dd96f8
commit 538996a365
3 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
[project]
name = "makegraph"
version = "0.2.1"
version = "0.2.2"
description = "A custom python Matplotlib wrapper"
readme = "README.md"
authors = [
+1 -1
View File
@@ -2,7 +2,7 @@ from .colours import ColourValue, ColourContainer
from .uq_colours import UQ_COLOURS_DICT, UQ_COLOURS, add_colours_to_mpl
from .makegraph import makeGraph, pltKeyClose
__version__ = "0.2.1"
__version__ = "0.2.2"
__all__ = [
"makeGraph", "pltKeyClose",
+2 -2
View File
@@ -1,7 +1,7 @@
# Better Colour Class for matplotlib
__author__ = "Cal Wing"
__version__ = "0.0.1"
__version__ = "0.0.2"
from cycler import cycler, Cycler
from typing import Sequence, ItemsView, KeysView
@@ -41,7 +41,7 @@ class ColourValue(str):
f"({self.rgba[0]:.2f}, {self.rgba[1]:.2f}, " \
f"{self.rgba[2]:.2f}, {self.rgba[3]:.2f})>"
def alpha_adj(self, alpha):
def alpha_adj(self, alpha) -> tuple[float, float, float, float]:
r, g, b, _ = self.rgba
return (r, g, b, alpha)