Skip to content

Commit ee87490

Browse files
committed
Fix lint error;
1 parent 9f8bc6d commit ee87490

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

examples/real_world_app_example.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,15 @@
2424

2525
from dataclasses import dataclass, field
2626
from pathlib import Path
27-
from typing import Optional
2827

2928
from varlord import Config, sources
3029
from varlord.global_config import get_global_config, set_global_config
3130

32-
3331
# ============================================================================
3432
# Configuration Models (config/models.py)
3533
# ============================================================================
3634

35+
3736
@dataclass(frozen=True)
3837
class DatabaseConfig:
3938
"""Database configuration."""
@@ -68,6 +67,7 @@ class AppConfig:
6867
# Configuration Setup (config/setup.py)
6968
# ============================================================================
7069

70+
7171
def setup_config() -> Config:
7272
"""Initialize and register application configuration.
7373
@@ -113,6 +113,7 @@ def get_config():
113113
# Business Code (src/services/database.py)
114114
# ============================================================================
115115

116+
116117
def get_db_connection():
117118
"""Get database connection using global configuration."""
118119
config = get_global_config(name="app")
@@ -134,13 +135,14 @@ def get_db_connection():
134135
# Application Entry Point (src/main.py)
135136
# ============================================================================
136137

138+
137139
def main():
138140
"""Main application entry point."""
139141
import sys
140142

141143
# Step 1: Initialize configuration (once at startup)
142144
try:
143-
cfg = setup_config()
145+
setup_config()
144146
app_config = get_config()
145147
except Exception as e:
146148
print(f"❌ Failed to load configuration: {e}")
@@ -168,4 +170,3 @@ def main():
168170

169171
if __name__ == "__main__":
170172
main()
171-

0 commit comments

Comments
 (0)