source: geniuswebcore/geniusweb/inform/Inform.py@ 99

Last change on this file since 99 was 96, checked in by Bart Vastenhouw, 2 years ago

Fixed small issues in domaineditor.

File size: 698 bytes
Line 
1from abc import ABC
2
3from pyson.JsonSubTypes import JsonSubTypes
4from pyson.JsonTypeInfo import Id, As
5from pyson.JsonTypeInfo import JsonTypeInfo
6
7
8@JsonSubTypes(["geniusweb.inform.Settings.Settings",\
9 "geniusweb.inform.YourTurn.YourTurn",\
10 "geniusweb.inform.ActionDone.ActionDone",\
11 "geniusweb.inform.Finished.Finished",\
12 "geniusweb.inform.OptIn.OptIn",\
13 "geniusweb.inform.Voting.Voting"\
14 ])
15@JsonTypeInfo(use=Id.NAME, include=As.WRAPPER_OBJECT)
16class Inform(ABC):
17
18 '''
19 base class of all information sent to a Party
20 HACK for now this just extends dict, instead
21 of properly defining all subclasses.
22 '''
23
24 def __eq__(self, other):
25 return isinstance(other, self.__class__)
Note: See TracBrowser for help on using the repository browser.