Skip to content

Invalid output when updating no value key. #141

Description

@hrehfeld

Description of your problem

Please provide a minimal, self-contained, and reproducible example.

[options]
Color
import configupdater
updater = configupdater.ConfigUpdater(allow_no_value=True)

updater.read("pacman.conf")

updater['options']['Color'] = 'yes'

with open('pacman.conf2', 'w') as f:
    updater.write(f)

Expected:

[options]
Color=yes

Result:

[options]
Color None yes

Versions and main components

  • ConfigUpdater Version: 3.2
  • Python Version: 3.13.3
  • Operating system: arch
  • How did you install ConfigUpdater: (pip)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions