INNER CODE UNIT · Python
_freeze_config
GodsScion/Auto_job_applier_linkedIn · app.py:483
def _freeze_config() -> None:
'''
Copy the settings the tool is using RIGHT NOW into user_config.json, before
an update rewrites the config/*.py files.
For control-panel users this is a no-op: their values are already in the
JSON. For someone who configured the old way by hand-editing config/*.py it
is what stops the update reverting them to the shipped defaults, because
config/_overrides.py re-applies the JSON over whatever `git pull` writes.
ponytail: this pins every schema key to today's value, so a later change to
a shipped default stops reaching that user. Acceptable - a hand-edited file
was already pinned. Freeze only the keys that differ from HEAD if it bites.
'''
current = _overrides.load_user_config()
for section, values in _effective_config().items():
if not isinstance(current.get(section), dict):
current[section] = {}