py-pandas: exchange import_modules with skip_modules (#38227)

This commit is contained in:
Manuela Kuhn 2023-06-11 18:14:56 +02:00 committed by GitHub
parent 00257f6824
commit fa2e1c0653
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -126,14 +126,4 @@ class PyPandas(PythonPackage):
# Optional dependencies # Optional dependencies
# https://pandas.pydata.org/pandas-docs/stable/getting_started/install.html#optional-dependencies # https://pandas.pydata.org/pandas-docs/stable/getting_started/install.html#optional-dependencies
@property skip_modules = ["pandas.tests", "pandas.plotting._matplotlib", "pandas.core._numba.kernels"]
def import_modules(self):
modules = super(__class__, self).import_modules
ignored_imports = [
"pandas.tests",
"pandas.plotting._matplotlib",
"pandas.core._numba.kernels",
]
return [i for i in modules if not any(map(i.startswith, ignored_imports))]