From 9b4eb540a8c4d591b5faa43641dd6e084edd2ba5 Mon Sep 17 00:00:00 2001 From: MeeseeksMachine <39504233+meeseeksmachine@users.noreply.github.com> Date: Fri, 26 Aug 2022 00:17:48 +0200 Subject: [PATCH] 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 <61934744+phofl@users.noreply.github.com> --- doc/source/development/contributing_codebase.rst | 6 +++++- scripts/run_stubtest.py | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/doc/source/development/contributing_codebase.rst b/doc/source/development/contributing_codebase.rst index bc85a54e61f22..15931a1a3eb83 100644 --- a/doc/source/development/contributing_codebase.rst +++ b/doc/source/development/contributing_codebase.rst @@ -265,7 +265,11 @@ pandas uses `mypy `_ and `pyright =1.22.0) is required for type validation. diff --git a/scripts/run_stubtest.py b/scripts/run_stubtest.py index cea9665e649d6..8cf5b81ba398c 100644 --- a/scripts/run_stubtest.py +++ b/scripts/run_stubtest.py @@ -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():