commons.units   A
last analyzed

Complexity

Total Complexity 0

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 0
eloc 21
dl 0
loc 26
rs 10
c 0
b 0
f 0
1
from candv import Values
2
from candv import VerboseValueConstant
3
from candv import with_constant_class
4
5
from ._translations import gettext_lazy as _
6
from ._utils import export
7
8
9
@export
10
class UnitTypeConstant(VerboseValueConstant):
11
  ...
12
13
14
@export
15
class UNIT_TYPES(with_constant_class(UnitTypeConstant), Values):
16
  AIRCRAFT   = UnitTypeConstant("planes",      _("aircraft"))
17
  ARMOR      = UnitTypeConstant("armor",       _("armor"))
18
  ARTILLERY  = UnitTypeConstant("artillery",   _("artillery"))
19
  BALLOON    = UnitTypeConstant("aeronautics", _("balloon"))
20
  LIGHT      = UnitTypeConstant("lights",      _("light"))
21
  RADIO      = UnitTypeConstant("radios",      _("radio"))
22
  SHIP       = UnitTypeConstant("ships",       _("ship"))
23
  STATIONARY = UnitTypeConstant("stationary",  _("stationary"))
24
  TRAIN      = UnitTypeConstant("trains",      _("train"))
25
  VEHICLE    = UnitTypeConstant("vehicles",    _("vehicle"))
26