Skip to content

Commit 5c557ad

Browse files
Proper initialization for __version__
Also, AppVeyor is not used any more, is it?
1 parent 1c7bbd8 commit 5c557ad

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

tabulate/__init__.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@
88
try:
99
__version__ = _version("tabulate")
1010
except _PackageNotFoundError:
11-
__version__ = "unknown"
11+
try:
12+
from .version import version as __version__ # noqa: F401
13+
except ImportError:
14+
__version__ = "unknown"
1215

1316
import warnings
1417
from collections import namedtuple
@@ -35,11 +38,6 @@ def _is_file(f):
3538

3639

3740
__all__ = ["tabulate", "tabulate_formats", "simple_separated_format"]
38-
try:
39-
from .version import version as __version__ # noqa: F401
40-
except ImportError:
41-
pass # running __init__.py as a script, AppVeyor pytests
42-
4341

4442
# minimum extra space in headers
4543
MIN_PADDING = 2

0 commit comments

Comments
 (0)