From 538996a3659703718d08b5badc7438230b161dde Mon Sep 17 00:00:00 2001 From: Cal Wing Date: Tue, 2 Jun 2026 17:21:46 +1000 Subject: [PATCH] Fix typehinting in `colours.py` --- pyproject.toml | 2 +- src/makegraph/__init__.py | 2 +- src/makegraph/colours.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 641707b..6a329a5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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 = [ diff --git a/src/makegraph/__init__.py b/src/makegraph/__init__.py index 45c043c..7a26733 100644 --- a/src/makegraph/__init__.py +++ b/src/makegraph/__init__.py @@ -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", diff --git a/src/makegraph/colours.py b/src/makegraph/colours.py index 5299466..28864fb 100644 --- a/src/makegraph/colours.py +++ b/src/makegraph/colours.py @@ -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)