Closed lubaskinc0de closed 4 months ago
We can make the dc_field
parameter positional-only, and put _
since the parameter name will now be unimportant
If HAS_PY_310:
def _get_param_kind(dc_field: DCField, /) -> ParamKind:
return ParamKind.KW_ONLY if dc_field.kw_only else ParamKind.POS_OR_KW
else:
def _get_param_kind(_dc_field: DCField, /) -> ParamKind:
return ParamKind.POS_OR_KW
Click to see where and how coverage changed
File Statements Missing Coverage Coverage
(new stmts)Lines missing
src/adaptix/_internal/model_tools/introspection
dataclass.py
Project Total
This report was generated by python-coverage-comment-action
Rename
to
because the function creates one input field from ONE dataclass field, not from multiple dataclass fields.
Which can be seen from the code:
as well as
to
since the dc_field parameter is not used (to avoid warnings in IDE)