-
Notifications
You must be signed in to change notification settings - Fork 466
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Accept duplicate entries in INI config files #2757
Accept duplicate entries in INI config files #2757
Conversation
c2db608
to
2524aa0
Compare
Rationale: 1. The `-D` command line option can be specified multiple times. It makes sense to be able to specify the respective config file option `dictionary` multiple times too. 2. While specifying an option multiple times might be an error, setting strict to `True` catches duplicates only within a single INI file, not across multiple INI files. If we are serious about handling duplicate options, we should therefore handle that manually, distinguishing options that can be duplicated or not.
2524aa0
to
30fc670
Compare
Worth adding a test that fails on |
Indeed, we could add a test with multiple |
Besides, it doesn't even work because the underlying data structure is still a dict: in case of duplicate keys, the new value overwrites the old value, which makes sense but is not what we would like here. I will try a few things, such as:
|
an alternative could be specification via |
#1980 does not just concatenate lines as claimed, instead it |
Replaced by #2767, a better alternative (see #2727 (comment)). |
Rationale:
-D
command line option can be specified multiple times. It makes sense to be able to specify the respective config file optiondictionary
multiple times too.True
catches duplicates only within a single INI file, not across multiple INI files. If we are serious about handling duplicate options, we should therefore handle that manually, distinguishing between options that can be duplicated or not.Fixes #2727.