Skip to content

Commit

Permalink
refactor: more concise version check
Browse files Browse the repository at this point in the history
Co-authored-by: Fabian Gebhart <[email protected]>
  • Loading branch information
moldhouse and fgebhart authored Nov 13, 2024
1 parent 1362a8e commit 1e6bd75
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions aleph_alpha_client/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ def user_agent_headers() -> Dict[str, str]:
new clients to fail on deserialization. To prevent these errors, we omit the
user agent header in cases where the version is not available (== 0.0.0).
"""
if __version__ != "0.0.0":
return {"User-Agent": "Aleph-Alpha-Python-Client-" + __version__}
return {}
if __version__ == "0.0.0":
return {}
else:
return {"User-Agent": "Aleph-Alpha-Python-Client-" + __version__}

0 comments on commit 1e6bd75

Please sign in to comment.