FAQ | This is a LIVE service | Changelog

Skip to content
Snippets Groups Projects
Commit 9847fe73 authored by E. Evstafiev's avatar E. Evstafiev :bulb:
Browse files

refactor: add cache decorator to `get_version` to prevent redundant file reads

parent 72a9f439
No related branches found
No related tags found
1 merge request!52Resolve "Ensure OpenAPI specification is generated correctly"
import os
import sys
import tomllib
import functools
from datetime import timedelta
from pathlib import Path
......@@ -9,7 +10,7 @@ import structlog
from api.versions import AVAILABLE_VERSIONS
@functools.cache
def get_version():
"""
Retrieves the project's version number from pyproject.toml.
......
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