Passed
Push — main ( 65730f...fad324 )
by Douglas
06:54 queued 02:27
created

mandos.model.utils.resources   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 12
dl 0
loc 18
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A _MandosResources.__init__() 0 3 1
1
from pathlib import Path
0 ignored issues
show
introduced by
Missing module docstring
Loading history...
2
3
from pocketutils.misc.resources import Resources
0 ignored issues
show
introduced by
Unable to import 'pocketutils.misc.resources'
Loading history...
4
5
from mandos.model.utils.setup import logger
6
7
8
class _MandosResources(Resources):
9
    def __init__(self, path: Path, ell=logger):
10
        super().__init__(path, logger=ell)
11
        self.strings = None
12
13
14
MandosResources = _MandosResources(Path(__file__).parent.parent.parent)
15
16
MandosResources.strings = {
17
    k.partition(":")[2]: v for k, v in MandosResources.json("strings.json").items()
18
}
19