Skip to content

Commit

Permalink
Attribute enorcement with NotImplimentError
Browse files Browse the repository at this point in the history
  • Loading branch information
sbradnam committed Nov 6, 2024
1 parent 7f2ddfe commit 2d88920
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions jade/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -1147,16 +1147,14 @@ def parse_output_data(
tally_comments = sim_output.output.tally_comments
return sim_output, tally_numbers, tally_comments

class AbstractSimOutput(abc.ABC):
@property
@abc.abstractmethod
def tallydata(self):
pass

@property
@abc.abstractmethod
def totalbin(self):
pass
class AbstractSimOutput:
tallydata = None
totalbin = None
def __init__(self):
if not isinstance(self.tallydata, dict):
raise NotImplementedError
if not isinstance(self.totalbin, dict):
raise NotImplementedError

class MCNPSimOutput(AbstractSimOutput):
def __init__(
Expand Down

0 comments on commit 2d88920

Please sign in to comment.