Skip to content

Commit dbfc2ae

Browse files
committed
Improve type hints
1 parent 065ec12 commit dbfc2ae

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

pygmt/datatypes/dataset.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
"""
44

55
import ctypes as ctp
6-
from typing import ClassVar
6+
from collections.abc import Mapping
7+
from typing import Any, ClassVar
78

89
import numpy as np
910
import pandas as pd
@@ -145,8 +146,8 @@ class _GMT_DATASEGMENT(ctp.Structure): # noqa: N801
145146

146147
def to_dataframe(
147148
self,
148-
column_names: list[str] | None = None,
149-
dtype: type | dict[str, type] | None = None,
149+
column_names: pd.Index | None = None,
150+
dtype: type | Mapping[Any, type] | None = None,
150151
index_col: str | int | None = None,
151152
) -> pd.DataFrame:
152153
"""

0 commit comments

Comments
 (0)