From 4e3826f8457de48dda292a7f06204048c6a9e8ba Mon Sep 17 00:00:00 2001 From: Alex Povel <48824213+alexpovel@users.noreply.github.com> Date: Thu, 3 Mar 2022 19:46:15 +0100 Subject: [PATCH] TYP: loosen types of to_markdown, align to docs (#46212) --- pandas/core/frame.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pandas/core/frame.py b/pandas/core/frame.py index b7974e5764100..e23c735fe41df 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -18,7 +18,6 @@ import itertools from textwrap import dedent from typing import ( - IO, TYPE_CHECKING, Any, Callable, @@ -2717,7 +2716,7 @@ def to_feather(self, path: FilePath | WriteBuffer[bytes], **kwargs) -> None: ) def to_markdown( self, - buf: IO[str] | str | None = None, + buf: FilePath | WriteBuffer[str] | None = None, mode: str = "wt", index: bool = True, storage_options: StorageOptions = None,