Switch to dataclass

NamedTuple has some bug that makes dumping broken
master
Salvo 'LtWorf' Tomaselli 2020-08-24 17:38:16 +07:00
parent ff9f0c10b6
commit 2e5d18f418
No known key found for this signature in database
GPG Key ID: B3A7CF0C801886CF
1 changed files with 4 additions and 3 deletions

@ -22,7 +22,8 @@
import csv
from itertools import chain, repeat, product as iproduct
from collections import deque
from typing import NamedTuple, FrozenSet, Iterable, List, Dict, Tuple
from typing import FrozenSet, Iterable, List, Dict, Tuple
from dataclasses import dataclass
from pathlib import Path
from relational.rtypes import *
@ -33,8 +34,8 @@ __all__ = [
'Header',
]
class Relation(NamedTuple):
@dataclass(repr=True, unsafe_hash=False, frozen=True)
class Relation:
'''
This object defines a relation (as a group of consistent tuples) and operations.