Skip to content

Commit

Permalink
DEP: move pkg_resources back inline in function (delayed import) (pan…
Browse files Browse the repository at this point in the history
  • Loading branch information
jorisvandenbossche authored and JulianWgs committed Jul 3, 2021
1 parent ddfec0a commit 321daf4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pandas/plotting/_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
Sequence,
)

import pkg_resources

from pandas._config import get_option

from pandas._typing import IndexLabel
Expand Down Expand Up @@ -1745,6 +1743,8 @@ def _load_backend(backend: str) -> types.ModuleType:
types.ModuleType
The imported backend.
"""
import pkg_resources

if backend == "matplotlib":
# Because matplotlib is an optional dependency and first-party backend,
# we need to attempt an import here to raise an ImportError if needed.
Expand Down

0 comments on commit 321daf4

Please sign in to comment.