Completed
Push — master ( a1e8f3...b95acc )
by Oleksandr
02:23
created

Logging

Complexity

Total Complexity 0

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 0
c 2
b 0
f 0
dl 0
loc 13
ccs 4
cts 4
cp 1
1
# coding: utf-8
2
3 1
from schematics.models import Model
4 1
from schematics.types import StringType, IntType, BooleanType
5 1
from schematics.types.compound import ModelType
6
7
8 1
class Logging(Model):
9 1
    file_name = StringType(
10
        default="eventlog.lst",
11
        min_length=1,
12
        required=True,
13
    )
14 1
    keep = BooleanType(
15
        default=True,
16
        required=True,
17
    )
18 1
    log_buildings = BooleanType(
19
        default=False,
20
        required=True,
21
    )
22
23
24 1
class Events(Model):
25 1
    chat_level = IntType(
26
        min_value=0,
27
        max_value=3,
28
        default=0,
29
        required=True,
30
    )
31 1
    logging = ModelType(
32
        model_spec=Logging,
33
        required=True,
34
    )
35