Skip to content
Snippets Groups Projects
Commit 47ab21ccfe06 authored by Vincent Hatakeyama's avatar Vincent Hatakeyama
Browse files

:shirt:

parent 959d450fc171
No related branches found
No related tags found
1 merge request!200📝 do_tests.zsh: Use pg_extensions env var if it has values
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
try: try:
# python 3.8+ # python 3.8+
from importlib.metadata import PackageNotFoundError, distribution, version from importlib.metadata import PackageNotFoundError, distribution
except ModuleNotFoundError: except ModuleNotFoundError:
from importlib_metadata import ( # type: ignore[import,no-redef,assignment] from importlib_metadata import ( # type: ignore[import,no-redef,assignment]
PackageNotFoundError, PackageNotFoundError,
distribution, distribution,
...@@ -7,8 +7,7 @@ ...@@ -7,8 +7,7 @@
except ModuleNotFoundError: except ModuleNotFoundError:
from importlib_metadata import ( # type: ignore[import,no-redef,assignment] from importlib_metadata import ( # type: ignore[import,no-redef,assignment]
PackageNotFoundError, PackageNotFoundError,
distribution, distribution,
version,
) )
# This is maintained by bump2version. # This is maintained by bump2version.
...@@ -12,7 +11,7 @@ ...@@ -12,7 +11,7 @@
) )
# This is maintained by bump2version. # This is maintained by bump2version.
_manual_version = "20.10.1.dev" __version__ = "20.10.1.dev"
try: try:
# When using an editable install, the number would be off # When using an editable install, the number would be off
distrib = distribution("odoo-scripts") distrib = distribution("odoo-scripts")
...@@ -16,9 +15,9 @@ ...@@ -16,9 +15,9 @@
try: try:
# When using an editable install, the number would be off # When using an editable install, the number would be off
distrib = distribution("odoo-scripts") distrib = distribution("odoo-scripts")
json = loads(distrib.read_text("direct_url.json")) text = distrib.read_text("direct_url.json")
if not json.get("dir_info", {}).get("editable", False): if text is not None:
__version__ = distrib.version json = loads(text)
else: if not json.get("dir_info", {}).get("editable", False):
__version__ = _manual_version __version__ = distrib.version
except PackageNotFoundError: except PackageNotFoundError:
...@@ -24,5 +23,5 @@ ...@@ -24,5 +23,5 @@
except PackageNotFoundError: except PackageNotFoundError:
__version__ = _manual_version pass
__author__ = "XCG Consulting" __author__ = "XCG Consulting"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment