| 344 | |
| 345 | |
| 346 | class _DataclassParams: |
| 347 | __slots__ = ('init', |
| 348 | 'repr', |
| 349 | 'eq', |
| 350 | 'order', |
| 351 | 'unsafe_hash', |
| 352 | 'frozen', |
| 353 | 'match_args', |
| 354 | 'kw_only', |
| 355 | 'slots', |
| 356 | 'weakref_slot', |
| 357 | ) |
| 358 | |
| 359 | def __init__(self, |
| 360 | init, repr, eq, order, unsafe_hash, frozen, |
| 361 | match_args, kw_only, slots, weakref_slot): |
| 362 | self.init = init |
| 363 | self.repr = repr |
| 364 | self.eq = eq |
| 365 | self.order = order |
| 366 | self.unsafe_hash = unsafe_hash |
| 367 | self.frozen = frozen |
| 368 | self.match_args = match_args |
| 369 | self.kw_only = kw_only |
| 370 | self.slots = slots |
| 371 | self.weakref_slot = weakref_slot |
| 372 | |
| 373 | def __repr__(self): |
| 374 | return ('_DataclassParams(' |
| 375 | f'init={self.init!r},' |
| 376 | f'repr={self.repr!r},' |
| 377 | f'eq={self.eq!r},' |
| 378 | f'order={self.order!r},' |
| 379 | f'unsafe_hash={self.unsafe_hash!r},' |
| 380 | f'frozen={self.frozen!r},' |
| 381 | f'match_args={self.match_args!r},' |
| 382 | f'kw_only={self.kw_only!r},' |
| 383 | f'slots={self.slots!r},' |
| 384 | f'weakref_slot={self.weakref_slot!r}' |
| 385 | ')') |
| 386 | |
| 387 | |
| 388 | # This function is used instead of exposing Field creation directly, |
no outgoing calls
no test coverage detected
searching dependent graphs…