Skip to content

Commit 37ac76e

Browse files
committed
restore tabulate.__version__
1 parent 37e1ed0 commit 37ac76e

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

‎tabulate/__init__.py‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
"""Pretty-print tabular data."""
22

3+
from importlib.metadata import (
4+
version as _version,
5+
PackageNotFoundError as _PackageNotFoundError,
6+
)
7+
8+
try:
9+
__version__ = _version("tabulate")
10+
except _PackageNotFoundError:
11+
__version__ = "unknown"
12+
313
import warnings
414
from collections import namedtuple
515
from collections.abc import Iterable, Sized

0 commit comments

Comments
 (0)