Skip to content

Commit

Permalink
Backport PR pandas-dev#48240 on branch 1.5.x (Fix mypy erroring on ba…
Browse files Browse the repository at this point in the history
…ckport branches) (pandas-dev#48259)

Backport PR pandas-dev#48240: Fix mypy erroring on backport branches

Co-authored-by: Patrick Hoefler <61934744+phofl@users.noreply.github.com>
  • Loading branch information
meeseeksmachine and phofl authored Aug 25, 2022
1 parent 992cfcd commit 9b4eb54
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion doc/source/development/contributing_codebase.rst
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,11 @@ pandas uses `mypy <http://mypy-lang.org>`_ and `pyright <https://github.com/micr

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

Expand Down
2 changes: 1 addition & 1 deletion scripts/run_stubtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import pandas as pd

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

0 comments on commit 9b4eb54

Please sign in to comment.