Skip to content

Commit

Permalink
Fix Mypy config.
Browse files Browse the repository at this point in the history
  • Loading branch information
vnmabus committed Jan 22, 2024
1 parent e9b3d50 commit f23570b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/mypy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ jobs:
reporter: github-pr-review
# The action will output fail if there are mypy errors
level: error
setup_command: pip install . pytest mypy
setup_command: pip install ".[test,typing]" mypy
mypy_flags: ''
7 changes: 4 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ docs = [
"sphinx>=3.1",
"sphinx-gallery",
]
typing = [
"mypy",
"pandas-stubs",
]
test = [
"pytest",
"pytest-cov",
Expand Down Expand Up @@ -121,9 +125,6 @@ implicit_reexport = true
module = [
"igraph.*",
"ipywidgets.*",
"numpy.*",
"pandas.*",
"setuptools.*",
]
ignore_missing_imports = true

Expand Down
4 changes: 2 additions & 2 deletions rdata/conversion/_conversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ def dataframe_constructor(

# Default row names are stored as [R_INT_NA, -len]
default_row_names_len = 2
index = (
index: pd.RangeIndex | tuple[str, ...] = (
pd.RangeIndex(1, abs(row_names[1]) + 1)
if (
len(row_names) == default_row_names_len
Expand Down Expand Up @@ -477,7 +477,7 @@ def ordered_constructor(
def ts_constructor(
obj: np.ndarray[Any, Any],
attrs: Mapping[str, Any],
) -> pd.Series:
) -> pd.Series[Any]:
"""Construct a time series object."""
start, end, frequency = attrs["tsp"]

Expand Down

0 comments on commit f23570b

Please sign in to comment.