Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix mypy erroring on backport branches #48240

Merged
merged 3 commits into from
Aug 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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