Remove usage of pkg_resources
in docs/conf.py
(#4251)
This commit is contained in:
parent
ea66d40dd7
commit
899002399a
@ -15,10 +15,9 @@
|
||||
|
||||
import os
|
||||
import string
|
||||
from importlib.metadata import version
|
||||
from pathlib import Path
|
||||
|
||||
from pkg_resources import get_distribution
|
||||
|
||||
CURRENT_DIR = Path(__file__).parent
|
||||
|
||||
|
||||
@ -43,7 +42,7 @@ def make_pypi_svg(version: str) -> None:
|
||||
|
||||
# Autopopulate version
|
||||
# The version, including alpha/beta/rc tags, but not commit hash and datestamps
|
||||
release = get_distribution("black").version.split("+")[0]
|
||||
release = version("black").split("+")[0]
|
||||
# The short X.Y version.
|
||||
version = release
|
||||
for sp in "abcfr":
|
||||
|
Loading…
Reference in New Issue
Block a user