@@ -2,6 +2,7 @@ from enum import Enum
22from functools import total_ordering
33from io import BytesIO
44from typing import Any , Callable , Optional , Set
5+ from typing_extensions import Self
56
67import numpy as np
78from matplotlib ._enums import CapStyle , JoinStyle
@@ -217,7 +218,7 @@ class GraphicsContextPdf(GraphicsContextBase):
217218 joinstyles : dict [str , int ] = ...
218219 def capstyle_cmd (self , style : CapStyle ) -> list [int | Op ]: ...
219220 def joinstyle_cmd (self , style : JoinStyle ) -> list [int | Op ]: ...
220- def linewidth_cmd (self , width : int | float ) -> list [float | Op ]: ...
221+ def linewidth_cmd (self , width : float ) -> list [float | Op ]: ...
221222 def dash_cmd (self , dashes ) -> list : ...
222223 def alpha_cmd (self , alpha : float , forced : bool , effective_alphas : tuple [float , float ]) -> list [Name | Op ]: ...
223224 def hatch_cmd (self , hatch : None , hatch_color : tuple [float , float , float , float ]) -> list [Name | Op | float ]: ...
@@ -239,7 +240,7 @@ class GraphicsContextPdf(GraphicsContextBase):
239240
240241class PdfPages :
241242 def __init__ (self , filename : str , keep_empty : bool = ..., metadata : dict [str , Any ] = ...) -> None : ...
242- def __enter__ (self ) -> PdfPages : ...
243+ def __enter__ (self ) -> Self : ...
243244 def __exit__ (self , exc_type , exc_val , exc_tb ) -> None : ...
244245 def close (self ) -> None : ...
245246 def infodict (self ) -> dict [str , Any ]: ...
0 commit comments