Skip to content

Commit 9b4eb54

Browse files
Backport PR #48240 on branch 1.5.x (Fix mypy erroring on backport branches) (#48259)
Backport PR #48240: Fix mypy erroring on backport branches Co-authored-by: Patrick Hoefler <[email protected]>
1 parent 992cfcd commit 9b4eb54

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

doc/source/development/contributing_codebase.rst

+5-1
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,11 @@ pandas uses `mypy <http://mypy-lang.org>`_ and `pyright <https://github.com/micr
265265

266266
.. code-block:: shell
267267
268-
pre-commit run --hook-stage manual --all-files
268+
# the following might fail if the installed pandas version does not correspond to your local git version
269+
pre-commit run --hook-stage manual --all-files
270+
271+
# if the above fails due to stubtest
272+
SKIP=stubtest pre-commit run --hook-stage manual --all-files
269273
270274
in your activated python environment. A recent version of ``numpy`` (>=1.22.0) is required for type validation.
271275

scripts/run_stubtest.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import pandas as pd
1010

1111
# fail early if pandas is not installed
12-
if "dev" not in getattr(pd, "__version__", ""):
12+
if not getattr(pd, "__version__", ""):
1313
# fail on the CI, soft fail during local development
1414
warnings.warn("You need to install the development version of pandas")
1515
if pd.compat.is_ci_environment():

0 commit comments

Comments
 (0)