Passed
Push — main ( 9ff912...d08a4e )
by Douglas
03:54
created

mandos.search.api_singletons.Apis.set()   A

Complexity

Conditions 1

Size

Total Lines 4
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 4
nop 3
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
from mandos.model.chembl_api import ChemblApi
0 ignored issues
show
introduced by
Missing module docstring
Loading history...
2
from mandos.model.pubchem_api import PubchemApi, CachingPubchemApi, QueryingPubchemApi
3
from mandos.model.settings import MANDOS_SETTINGS
4
5
6
class Apis:
0 ignored issues
show
introduced by
Missing class docstring
Loading history...
7
8
    Pubchem = None
9
    Chembl = None
10
11
    @classmethod
12
    def set(cls, chembl: ChemblApi, pubchem: PubchemApi) -> None:
0 ignored issues
show
introduced by
Missing function or method docstring
Loading history...
13
        cls.Chembl = chembl
14
        cls.Pubchem = pubchem
15
16
    @classmethod
17
    def set_default(cls) -> None:
0 ignored issues
show
introduced by
Missing function or method docstring
Loading history...
18
        from chembl_webresource_client.new_client import new_client as _Chembl
0 ignored issues
show
introduced by
Import outside toplevel (chembl_webresource_client.new_client.new_client)
Loading history...
introduced by
Unable to import 'chembl_webresource_client.new_client'
Loading history...
19
20
        cls.Pubchem = CachingPubchemApi(MANDOS_SETTINGS.cache_path, QueryingPubchemApi())
21
        cls.Chembl = ChemblApi.wrap(_Chembl)
22
23
24
__all__ = ["Apis"]
25