mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-01 02:05:00 +00:00
better handle __version__ errors
This commit is contained in:
parent
2c7251f4b9
commit
2439891ee0
1 changed files with 12 additions and 1 deletions
|
@ -1,6 +1,17 @@
|
|||
from packaging import version
|
||||
|
||||
__version__ = "0.65.2.dev"
|
||||
safe_version = __version__
|
||||
|
||||
try:
|
||||
from aider.__version__ import __version__
|
||||
except Exception:
|
||||
__version__ = "0.65.2.dev"
|
||||
__version__ = safe_version + ".import"
|
||||
|
||||
try:
|
||||
if version.parse(__version__) < version.parse(safe_version):
|
||||
__version__ = safe_version + ".less"
|
||||
except Exception:
|
||||
__version__ = safe_version + ".parse"
|
||||
|
||||
__all__ = [__version__]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue