diff --git a/pandas/__init__.py b/pandas/__init__.py index c2daf70e05f09..164c96e0eb0c7 100644 --- a/pandas/__init__.py +++ b/pandas/__init__.py @@ -178,7 +178,10 @@ # use the closest tagged version if possible _built_with_meson = False try: - from pandas._version_meson import __version__, __git_version__ + from pandas._version_meson import ( + __version__, + __git_version__, + ) # pyright: ignore [reportMissingImports] _built_with_meson = True except ImportError: diff --git a/pandas/tests/api/test_api.py b/pandas/tests/api/test_api.py index e792824dce0a8..56797df71df7b 100644 --- a/pandas/tests/api/test_api.py +++ b/pandas/tests/api/test_api.py @@ -258,7 +258,6 @@ def test_testing(self): self.check(testing, self.funcs) - def test_util_in_top_level(self, monkeypatch): # Can't import pandas from the test directory since its not # built inplace with meson diff --git a/pandas/util/_print_versions.py b/pandas/util/_print_versions.py index 20d63d66a0279..7a1984a8bac54 100644 --- a/pandas/util/_print_versions.py +++ b/pandas/util/_print_versions.py @@ -22,7 +22,9 @@ def _get_commit_hash() -> str | None: git worktree correctly. """ try: - from pandas._version_meson import __git_version__ + from pandas._version_meson import ( # pyright: ignore [reportMissingImports] + __git_version__, + ) return __git_version__ except ImportError: