Passed
Branch master (0fb205)
by Oleksandr
03:17
created

commons.targets   A

Complexity

Total Complexity 0

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 0
eloc 22
dl 0
loc 31
ccs 21
cts 21
cp 1
rs 10
c 0
b 0
f 0
1 1
from candv import Values
2 1
from candv import VerboseValueConstant
3 1
from candv import with_constant_class
4
5 1
from ._translations import gettext_lazy as _
6
7
8 1
class TargetType(VerboseValueConstant):
9 1
  ...
10
11
12 1
class TargetTypes(with_constant_class(TargetType), Values):
13 1
  destroy        = TargetType(0, _("destroy"))
14 1
  destroy_area   = TargetType(1, _("destroy area"))
15 1
  destroy_bridge = TargetType(2, _("destroy bridge"))
16 1
  recon          = TargetType(3, _("recon"))
17 1
  escort         = TargetType(4, _("escort"))
18 1
  cover          = TargetType(5, _("cover"))
19 1
  cover_area     = TargetType(6, _("cover area"))
20 1
  cover_bridge   = TargetType(7, _("cover bridge"))
21
22
23 1
class TargetPriority(VerboseValueConstant):
24 1
  ...
25
26
27 1
class TargetPriorities(with_constant_class(TargetPriority), Values):
28 1
  primary   = TargetPriority(0, _("primary"))
29 1
  secondary = TargetPriority(1, _("secondary"))
30
  hidden    = TargetPriority(2, _("hidden"))
31