We have some dataclasses with a lot of fields, and the reprs can be a bit overwhelming, especially when included in logs/warnings/exceptions.
Request is for reprs to exclude fields where their value is ==
the field default.
KwargDefinition
(and subtypes) and the OpenAPI spec models are examples of types that would benefit from this.
ParameterKwarg(examples=None, external_docs=None, content_encoding=None, default=<_EmptyEnum.EMPTY: 0>, title=None, description=None, const=None, gt=None, ge=3, lt=None, le=None, multiple_of=None, min_items=None, max_items=None, min_length=None, max_length=None, pattern=None, lower_case=None, upper_case=None, format=None, enum=None, read_only=None, schema_extra=None, annotation=<_EmptyEnum.EMPTY: 0>, header=None, cookie=None, query=None, required=None)
vs
ParameterKwarg(ge=3)
Pros: easier to parse and reason about.
Cons: maybe some users prefer the verbosity.
Could changing the reprs of these things be considered breaking??
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too