Skip to content

Commit a0c47c9

Browse files
committed
TYP: Using string in a typing.cast
1 parent cca49db commit a0c47c9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

plotnine/_mpl/layout_manager/_layout_items.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
from itertools import chain
55
from typing import TYPE_CHECKING, cast
66

7-
from matplotlib.backend_bases import RendererBase
87
from matplotlib.text import Text
98

109
from plotnine.exceptions import PlotnineError
@@ -28,6 +27,7 @@
2827
from matplotlib.artist import Artist
2928
from matplotlib.axes import Axes
3029
from matplotlib.axis import Tick
30+
from matplotlib.backend_bases import RendererBase
3131
from matplotlib.transforms import Bbox, Transform
3232

3333
from plotnine import ggplot
@@ -70,7 +70,7 @@ class Calc:
7070

7171
def __post_init__(self):
7272
self.figure = self.plot.figure
73-
self.renderer = cast(RendererBase, self.plot.figure._get_renderer()) # pyright: ignore
73+
self.renderer = cast("RendererBase", self.plot.figure._get_renderer()) # pyright: ignore
7474

7575
def bbox(self, artist: Artist) -> Bbox:
7676
"""

0 commit comments

Comments
 (0)