(f)
| 649 | |
| 650 | |
| 651 | def _init_param(f): |
| 652 | # Return the __init__ parameter string for this field. For |
| 653 | # example, the equivalent of 'x:int=3' (except instead of 'int', |
| 654 | # reference a variable set to int, and instead of '3', reference a |
| 655 | # variable set to 3). |
| 656 | if f.default is MISSING and f.default_factory is MISSING: |
| 657 | # There's no default, and no default_factory, just output the |
| 658 | # variable name and type. |
| 659 | default = '' |
| 660 | elif f.default is not MISSING: |
| 661 | # There's a default, this will be the name that's used to look |
| 662 | # it up. |
| 663 | default = f'=__dataclass_dflt_{f.name}__' |
| 664 | elif f.default_factory is not MISSING: |
| 665 | # There's a factory function. Set a marker. |
| 666 | default = '=__dataclass_HAS_DEFAULT_FACTORY__' |
| 667 | return f'{f.name}{default}' |
| 668 | |
| 669 | |
| 670 | def _init_fn(fields, std_fields, kw_only_fields, frozen, has_post_init, |
no outgoing calls
no test coverage detected
searching dependent graphs…