python 3 compatibility

* removing dataclasses
This commit is contained in:
t2 2019-08-29 00:30:02 +02:00
parent 0afe22aa71
commit df5c567482
2 changed files with 14 additions and 8 deletions

View File

@ -1,5 +1,4 @@
from collections import defaultdict from collections import defaultdict
from dataclasses import dataclass
from typing import Callable, Tuple from typing import Callable, Tuple
from brukeropusreader.block_parser import parse_series, parse_param, parse_text from brukeropusreader.block_parser import parse_series, parse_param, parse_text
@ -46,13 +45,20 @@ DIFFERENT_BLOCKS = {
} }
@dataclass
class BlockMeta: class BlockMeta:
data_type: int def __init__(
channel_type: int self,
text_type: int data_type: int,
chunk_size: int channel_type: int,
offset: int text_type: int,
chunk_size: int,
offset: int,
):
self.data_type = data_type
self.channel_type = channel_type
self.text_type = text_type
self.chunk_size = chunk_size
self.offset = offset
def get_name_and_parser(self) -> Tuple[str, Callable]: def get_name_and_parser(self) -> Tuple[str, Callable]:
if self.data_type == 0: if self.data_type == 0:

View File

@ -3,7 +3,7 @@ from distutils.core import setup
setup( setup(
name="brukeropusreader", name="brukeropusreader",
version="1.3.2", version="1.3.3",
description="Bruker OPUS File Reader", description="Bruker OPUS File Reader",
author="QED", author="QED",
author_email="brukeropusreader-dev@qed.ai", author_email="brukeropusreader-dev@qed.ai",