<#18784 _defaults_ does not support nested dicts> ...
# github-notifications
c
#18784 __defaults__ does not support nested dicts Issue created by Ryan-Draves Describe the bug Using
__defaults__
to extend an
overrides
field is not supported; using
Copy code
__defaults__(
    {
        (python_sources, ): dict(overrides={
            "*_generated.py": {
                "skip_yapf": True
            },
        })
    },
    extend=True,
    ignore_unknown_fields=True,
)
yields
Copy code
TypeError: Even though you are using a `FrozenDict`, the underlying values are not hashable. Please use hashable (and preferably immutable) types for the underlying values, e.g. use tuples instead of lists and use FrozenOrderedSet instead of set().

Original error message: unhashable type: 'dict'

Value: FrozenDict({'overrides': {('*_generated.py',): {'skip_yapf': True}}})
while fudging the type of the
overrides
yields
Copy code
InvalidFieldTypeException: The 'overrides' field in target my/path#__defaults__ must be dict[str | tuple[str, ...], dict[str, Any]], but was `(('*_generated.py',), (('skip_yapf', True),))` with type `tuple`.
Pants version 2.15.0 OS Linux Additional info Expected behavior is that one can provide default override entry values. pantsbuild/pants