Last change
on this file was 100, checked in by ruud, 20 months ago |
python installs also wheel to avoid error messages
|
File size:
698 bytes
|
Line | |
---|
1 | from abc import ABC
|
---|
2 |
|
---|
3 | from pyson.JsonSubTypes import JsonSubTypes
|
---|
4 | from pyson.JsonTypeInfo import Id, As
|
---|
5 | from 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)
|
---|
16 | class 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.