Passed
Push — dependabot/pip/flake8-bugbear-... ( 82a4d5...16d864 )
by
unknown
02:18
created

mandos.entries.api_singletons   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 19
dl 0
loc 27
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A Apis.set_default() 0 6 1
A Apis.set() 0 4 1
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
3
from mandos.model.querying_pubchem_api import QueryingPubchemApi
4
from mandos.model.caching_pubchem_api import CachingPubchemApi
5
from mandos.model.settings import MANDOS_SETTINGS
6
7
8
class Apis:
0 ignored issues
show
introduced by
Missing class docstring
Loading history...
9
10
    Pubchem = None
11
    Chembl = None
12
13
    @classmethod
14
    def set(cls, chembl: ChemblApi, pubchem: PubchemApi) -> None:
0 ignored issues
show
introduced by
Missing function or method docstring
Loading history...
15
        cls.Chembl = chembl
16
        cls.Pubchem = pubchem
17
18
    @classmethod
19
    def set_default(cls) -> None:
0 ignored issues
show
introduced by
Missing function or method docstring
Loading history...
20
        from chembl_webresource_client.new_client import new_client as _Chembl
0 ignored issues
show
introduced by
Unable to import 'chembl_webresource_client.new_client'
Loading history...
introduced by
Import outside toplevel (chembl_webresource_client.new_client.new_client)
Loading history...
21
22
        cls.Pubchem = CachingPubchemApi(MANDOS_SETTINGS.cache_path, QueryingPubchemApi())
23
        cls.Chembl = ChemblApi.wrap(_Chembl)
24
25
26
__all__ = ["Apis"]
27