Backport PR #27217 on branch v3.8.x: Fix type hints for undeprecated contour APIs by rcomer · Pull Request #27220 · matplotlib/matplotlib · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions ci/mypy-stubtest-allowlist.txt
11 changes: 8 additions & 3 deletions lib/matplotlib/contour.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,17 @@ class ContourSet(ContourLabeler, Collection):
clip_path: Patch | Path | TransformedPath | TransformedPatchPath | None
labelTexts: list[Text]
labelCValues: list[ColorType]
allkinds: list[np.ndarray]
tcolors: list[tuple[float, float, float, float]]
@property
def tcolors(self) -> list[tuple[tuple[float, float, float, float]]]: ...

# only for not filled
tlinewidths: list[tuple[float]]
@property
def tlinewidths(self) -> list[tuple[float]]: ...

@property
def allkinds(self) -> list[list[np.ndarray | None]]: ...
@property
def allsegs(self) -> list[list[np.ndarray]]: ...
@property
def alpha(self) -> float | None: ...
@property
Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/path.pyi