gwmock.cli.utils.config_state¶
gwmock.cli.utils.config_state
¶
Pure state management for the interactive config editor.
ConfigState holds the current configuration as a plain dict, provides section-aware getters/setters with type coercion, and validates via the existing Pydantic Config model. No I/O beyond YAML loading — the TUI layer (config_editor.py) is responsible for display.
gwmock.cli.utils.config_state.ConfigState
¶
Mutable, section-aware wrapper around a gwmock config dict.
Source code in src/gwmock/cli/utils/config_state.py
298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 | |
gwmock.cli.utils.config_state.ConfigState.set(section, key, raw_value)
¶
Set key in section from a string raw_value.
Source code in src/gwmock/cli/utils/config_state.py
307 308 309 310 311 312 313 314 315 316 317 318 319 320 | |
gwmock.cli.utils.config_state.ConfigState.get(section, key)
¶
Get key from section, or None if unset.
Source code in src/gwmock/cli/utils/config_state.py
322 323 324 325 326 327 328 | |
gwmock.cli.utils.config_state.ConfigState.get_section(section)
¶
Return the raw dict for section, or None if empty.
Source code in src/gwmock/cli/utils/config_state.py
330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 | |