diff --git a/Justfile b/Justfile index 730b97c..fabf8c0 100644 --- a/Justfile +++ b/Justfile @@ -5,13 +5,13 @@ install: uv sync --all-extras --frozen --group lint lint: - uv run end-of-file-fixer . + uv run eof-fixer . uv run ruff format uv run ruff check --fix uv run mypy . lint-ci: - uv run end-of-file-fixer . --check + uv run eof-fixer . --check uv run ruff format --check uv run ruff check --no-fix uv run mypy . diff --git a/lite_bootstrap/instruments/healthchecks_instrument.py b/lite_bootstrap/instruments/healthchecks_instrument.py index 36e608e..ac8074d 100644 --- a/lite_bootstrap/instruments/healthchecks_instrument.py +++ b/lite_bootstrap/instruments/healthchecks_instrument.py @@ -17,6 +17,14 @@ class HealthChecksConfig(BaseConfig): health_checks_path: str = "/health/" health_checks_include_in_schema: bool = False + @property + def health_check_data(self) -> HealthCheckTypedDict: + return { + "service_version": self.service_version, + "service_name": self.service_name, + "health_status": True, + } + @dataclasses.dataclass(kw_only=True, slots=True, frozen=True) class HealthChecksInstrument(BaseInstrument): @@ -27,8 +35,4 @@ def is_ready(self) -> bool: return self.bootstrap_config.health_checks_enabled def render_health_check_data(self) -> HealthCheckTypedDict: - return { - "service_version": self.bootstrap_config.service_version, - "service_name": self.bootstrap_config.service_name, - "health_status": True, - } + return self.bootstrap_config.health_check_data diff --git a/pyproject.toml b/pyproject.toml index 54a4197..1461899 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -122,7 +122,7 @@ dev = [ lint = [ "mypy", "ruff", - "end-of-file-fixer", + "eof-fixer", ] [build-system]