One function
mergeConfig in CleanCut/green
The author described this change as “Fixed a regression that prevented targets, help, config, store_opt, and parser from making it into the args object returned from mergeConfig()”. It counts as a record because the check below fails on the code as it stood at 365b2327d and passes on 1d800f88c, with nothing else changed between the two runs.
ProjectCleanCut/green
Fix saved2014-07-25
Sharing licenceMIT · LICENSE
Change size+2 −5
What the code was meant to do, written into the code itself as a docstring
I take in a namespace created by the ArgumentParser in cmdline.main() and merge in options from configuration files. The config items only replace argument items that are set to default value. Returns: I return a new argparse.Namespace, adding members: shouldExit = default False exitCode = default 0 omit = omit settings converted to list and extended cov = coverage object default None
The change
| 25 | 25 | elif name in ['omit']: | |
| 26 | 26 | config_getter = config.get | |
| 27 | 27 | elif name in ['targets', 'help', 'config']: | |
| 28 | - | continue # Some options only make sense coming on the command-line. | |
| 28 | + | pass # Some options only make sense coming on the command-line. | |
| 29 | 29 | elif name in ['store_opt', 'parser']: | |
| 30 | - | continue # These are added members we need to ignore | |
| 30 | + | pass # These are convenience objects, not actual settings | |
| 31 | 31 | else: | |
| 32 | 32 | raise NotImplementedError(name) | |
| 33 | 33 | ||
| ⋯ | |||
| 45 | 45 | new_args.shouldExit = False | |
| 46 | 46 | new_args.exitCode = 0 | |
| 47 | 47 | new_args.cov = None | |
| 48 | - | # These two were added in getParser() | |
| 49 | - | new_args.parser = args.parser | |
| 50 | - | new_args.store_opt = args.store_opt | |
| 51 | 48 | ||
| 52 | 49 | # Help? | |
| 53 | 50 | if new_args.help: # pragma: no cover | |
The check that tells the two apart
fail→pass·green/test/test_config.py::TestMergeConfig::test_targets
Check file green/test/test_config.py, taken without changes from the fix and copied onto the older code, so the exact same check runs against both versions.
Origin and history
The code before it365b2327d3325256074f1b581181b92eae578419
Broken version dated2014-07-25
Modulegreen.config
Units changedmergeConfig
Fingerprint6561d4af726d54ad
Checked2026-08-18 by goldset/0.1
Every field above is generated by our program. None of it is written by hand.