Skip to content

Commit 6c77062

Browse files
authored
Fix nightly test (#751)
* fix nightly test * remove comment in template, nightly tests are not run for PRs
1 parent 8d5a827 commit 6c77062

File tree

5 files changed

+9
-19
lines changed

5 files changed

+9
-19
lines changed

.github/pull_request_template.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,2 @@
1-
<!--
2-
Two CI tests are using not yet released versions of pandas ("nightly") and mypy ("mypy_nightly"). It is okay if they fail.
3-
-->
4-
51
- [ ] Closes #xxxx (Replace xxxx with the Github issue number)
62
- [ ] Tests added: Please use `assert_type()` to assert the type of any return value

.pre-commit-config.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ ci:
33
autofix_prs: false
44
repos:
55
- repo: https://github.com/python/black
6-
rev: 23.3.0
6+
rev: 23.7.0
77
hooks:
88
- id: black
99
- repo: https://github.com/PyCQA/isort
1010
rev: 5.12.0
1111
hooks:
1212
- id: isort
1313
- repo: https://github.com/asottile/pyupgrade
14-
rev: v3.4.0
14+
rev: v3.9.0
1515
hooks:
1616
- id: pyupgrade
1717
types_or: [python, pyi]
@@ -27,15 +27,15 @@ repos:
2727
- id: flake8
2828
name: flake8 (pyi)
2929
additional_dependencies:
30-
- flake8-pyi==23.3.1
30+
- flake8-pyi==23.6.0
3131
types: [pyi]
3232
args: [
33-
--ignore=E301 E302 E305 E402 E501 E701 E704 F401 F811 W503 Y042,
33+
--ignore=E301 E302 E305 E402 E501 E701 E704 F401 F811 F821 W503 Y042,
3434
# TypeVars in private files are already private
3535
--per-file-ignores=_*.pyi:Y001
3636
]
3737
- repo: https://github.com/codespell-project/codespell
38-
rev: v2.2.4
38+
rev: v2.2.5
3939
hooks:
4040
- id: codespell
4141
additional_dependencies: [ tomli ]

pandas-stubs/_typing.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,9 +265,9 @@ AxisColumn: TypeAlias = Literal["columns", 1]
265265
Axis: TypeAlias = AxisIndex | AxisColumn
266266
DtypeNp = TypeVar("DtypeNp", bound=np.dtype[np.generic])
267267
KeysArgType: TypeAlias = Any
268-
ListLike = TypeVar("ListLike", Sequence, np.ndarray, "Series", "Index")
268+
ListLike = TypeVar("ListLike", Sequence, np.ndarray, Series, Index)
269269
ListLikeExceptSeriesAndStr = TypeVar(
270-
"ListLikeExceptSeriesAndStr", MutableSequence, np.ndarray, tuple, "Index"
270+
"ListLikeExceptSeriesAndStr", MutableSequence, np.ndarray, tuple, Index
271271
)
272272
ListLikeU: TypeAlias = Sequence | np.ndarray | Series | Index
273273
ListLikeHashable: TypeAlias = (

pandas-stubs/core/indexes/accessors.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ class _MiniSeconds(Generic[_DTFieldOpsReturnType]):
8989
@property
9090
def nanosecond(self) -> _DTFieldOpsReturnType: ...
9191

92-
_DTBoolOpsReturnType = TypeVar("_DTBoolOpsReturnType", "Series[bool]", np_ndarray_bool)
92+
_DTBoolOpsReturnType = TypeVar("_DTBoolOpsReturnType", Series[bool], np_ndarray_bool)
9393

9494
class _IsLeapYearProperty(Generic[_DTBoolOpsReturnType]):
9595
@property

tests/test_series.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -462,13 +462,7 @@ def square(x: float) -> float:
462462
def makeseries(x: float) -> pd.Series:
463463
return pd.Series([x, 2 * x])
464464

465-
with pytest_warns_bounded(
466-
FutureWarning,
467-
"Returning a DataFrame from Series.apply when the supplied function"
468-
"returns a Series is deprecated",
469-
lower="2.0.99",
470-
):
471-
check(assert_type(s.apply(makeseries), pd.DataFrame), pd.DataFrame)
465+
check(assert_type(s.apply(makeseries), pd.DataFrame), pd.DataFrame)
472466

473467
# GH 293
474468

0 commit comments

Comments
 (0)