6 Mar 2025 |
nbp | That's because you do not have the same priority level. | 14:44:19 |
nbp | Or there is a problem with the merge function of the option. | 14:45:37 |
Matt Sturgeon | Sounds like your definition has a higher override priority. For example a "normal" definition will not be merged with a "default" definition, because merging is only done for definitions of whatever happens to be the highest priority | 14:45:41 |
mr-qubo | Yes, I want to merge with the default value of that option. | 14:46:34 |
mr-qubo | This module needs the flags, which are passed in default value. | 14:46:56 |
nbp | then you need mkDefault (mkAfter suffix) | 14:47:00 |
Matt Sturgeon | Assuming the option's type actually supports merging, you need to make your definition have the same override priority. This is probably either mkDefault or more likely mkOptionDefault | 14:47:30 |
nbp | * then you need mkOptionDefault (mkAfter suffix) — editted: wrong function name | 14:48:21 |
Matt Sturgeon | If the option doesn't support merging, a less idiomatic solution would be to read the option's default value and use that in your overriding definition:
foo = options.foo.default + "suffix";
This is ugly and fragile, but could work as a hacky solution if necessary. | 14:50:45 |
mr-qubo | mkOptionDefault raises an error. The type is types.str . I'll guess I'll go with options..default then. | 15:24:07 |
Matt Sturgeon | types.str has merge = mergeEqualOption , which essentially means it doesn't support merging multiple definitions | 15:58:40 |
7 Mar 2025 |
| Qyriad changed their display name from Qyriad to qyriad. | 16:43:26 |
8 Mar 2025 |
| Qyriad changed their display name from qyriad to Qyriad. | 21:41:03 |
9 Mar 2025 |
| jappie joined the room. | 09:23:03 |