diff --git a/plotnine/scales/_expand.py b/plotnine/scales/_expand.py index c62ad602c..fcf0ec110 100644 --- a/plotnine/scales/_expand.py +++ b/plotnine/scales/_expand.py @@ -32,7 +32,7 @@ def _expand_range_distinct( def expand_range( x: CoordRange, expand: tuple[float, float] | tuple[float, float, float, float], - trans: trans | Type[trans], + trans: trans, ) -> range_view: """ Expand Coordinate Range in coordinate space diff --git a/plotnine/scales/scale.py b/plotnine/scales/scale.py index c6316cedb..ce2cb4358 100644 --- a/plotnine/scales/scale.py +++ b/plotnine/scales/scale.py @@ -3,7 +3,6 @@ from abc import ABC from copy import copy, deepcopy from dataclasses import dataclass, field -from functools import cached_property from typing import TYPE_CHECKING, Generic, cast import numpy as np diff --git a/plotnine/scales/scale_continuous.py b/plotnine/scales/scale_continuous.py index d85060082..ae873c1e0 100644 --- a/plotnine/scales/scale_continuous.py +++ b/plotnine/scales/scale_continuous.py @@ -2,7 +2,6 @@ from contextlib import suppress from dataclasses import dataclass -from functools import cached_property from typing import TYPE_CHECKING, Sequence from warnings import warn @@ -507,7 +506,7 @@ def get_labels( if self.labels is False or self.labels is None: labels = [] elif self.labels is True: - labels = self._trans.format(breaks) # type: ignore + labels = self._trans.format(breaks) elif callable(self.labels): labels = self.labels(breaks) elif isinstance(self.labels, dict): diff --git a/plotnine/scales/scale_datetime.py b/plotnine/scales/scale_datetime.py index d40f98583..958bd485b 100644 --- a/plotnine/scales/scale_datetime.py +++ b/plotnine/scales/scale_datetime.py @@ -1,21 +1,10 @@ from __future__ import annotations from dataclasses import KW_ONLY, InitVar, dataclass -from datetime import timedelta -from typing import TYPE_CHECKING, overload - -import numpy as np from ._runtime_typing import TransUser # noqa: TCH001 from .scale_continuous import scale_continuous -if TYPE_CHECKING: - from typing import Sequence - - import pandas as pd - - from plotnine.typing import FloatArray - @dataclass class scale_datetime(scale_continuous): diff --git a/pyproject.toml b/pyproject.toml index 0e0c41c4a..568317bb9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,7 +24,7 @@ classifiers = [ dependencies = [ "matplotlib>=3.8.0", "pandas>=2.2.0", - "mizani~=0.12.2", + "mizani~=0.13.0", "numpy>=1.23.5", "scipy>=1.8.0", "statsmodels>=0.14.0",