Skip to content

Commit

Permalink
ignore ImportError when importing __version__ number
Browse files Browse the repository at this point in the history
  • Loading branch information
astanin committed Oct 6, 2022
1 parent 3e45eac commit d99d9ae
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tabulate/__init__.py
Expand Up @@ -22,8 +22,10 @@ def _is_file(f):


__all__ = ["tabulate", "tabulate_formats", "simple_separated_format"]
if __name__ != "__main__":
try:
from .version import version as __version__ # noqa: F401
except ImportError:
pass # running __init__.py as a script, AppVeyor pytests


# minimum extra space in headers
Expand Down

0 comments on commit d99d9ae

Please sign in to comment.