osm_poi_matchmaker.dataproviders.hu_takko   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 47
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 38
dl 0
loc 47
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A hu_takko.constains() 0 10 1
A hu_takko.types() 0 9 1
A hu_takko.process() 0 2 1
1
# -*- coding: utf-8 -*-
0 ignored issues
show
introduced by
Missing module docstring
Loading history...
2
3
try:
4
    import logging
5
    import sys
6
    import os
0 ignored issues
show
Unused Code introduced by
The import os seems to be unused.
Loading history...
7
    import json
0 ignored issues
show
Unused Code introduced by
The import json seems to be unused.
Loading history...
8
    from osm_poi_matchmaker.libs.soup import save_downloaded_soup
0 ignored issues
show
Unused Code introduced by
Unused save_downloaded_soup imported from osm_poi_matchmaker.libs.soup
Loading history...
9
    from osm_poi_matchmaker.libs.address import extract_street_housenumber_better_2, clean_city, clean_phone_to_str, \
0 ignored issues
show
Coding Style introduced by
This line is too long as per the coding-style (118/100).

This check looks for lines that are too long. You can specify the maximum line length.

Loading history...
Unused Code introduced by
Unused extract_street_housenumber_better_2 imported from osm_poi_matchmaker.libs.address
Loading history...
Unused Code introduced by
Unused clean_city imported from osm_poi_matchmaker.libs.address
Loading history...
Unused Code introduced by
Unused clean_phone_to_str imported from osm_poi_matchmaker.libs.address
Loading history...
Unused Code introduced by
Unused clean_string imported from osm_poi_matchmaker.libs.address
Loading history...
10
        clean_string
11
    from osm_poi_matchmaker.libs.geo import check_hu_boundary
0 ignored issues
show
Unused Code introduced by
Unused check_hu_boundary imported from osm_poi_matchmaker.libs.geo
Loading history...
12
    from osm_poi_matchmaker.libs.osm_tag_sets import POS_HU_GEN, PAY_CASH
13
    from osm_poi_matchmaker.utils.data_provider import DataProvider
14
    from osm_poi_matchmaker.utils.enums import FileType
15
except ImportError as err:
16
    logging.error('Error %s import module: %s', __name__, err)
17
    logging.exception('Exception occurred')
18
19
    sys.exit(128)
20
21
22
class hu_takko(DataProvider):
0 ignored issues
show
Coding Style Naming introduced by
Class name "hu_takko" doesn't conform to PascalCase naming style ('[^\\W\\da-z][^\\W_]+$' pattern)

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
introduced by
Missing class docstring
Loading history...
23
24
    def constains(self):
25
        self.link = ''
26
        self.tags = {'shop': 'clothes', 'operator': 'Takko Fashion Kft.',
27
                     'operator:addr': '2040 Budaörs, Ébner György köz 4.',
28
                     'ref:HU:company': '13-10-040628', 'ref:vatin:hu': '1335199-2-13', 'ref:vatin': 'HU1335199',
0 ignored issues
show
Coding Style introduced by
This line is too long as per the coding-style (112/100).

This check looks for lines that are too long. You can specify the maximum line length.

Loading history...
29
                     'brand': 'Takko', 'contact:website': 'https://www.takko.com/hu-hu/', 'loyalty_card': 'yes',
0 ignored issues
show
Coding Style introduced by
This line is too long as per the coding-style (112/100).

This check looks for lines that are too long. You can specify the maximum line length.

Loading history...
30
                     'air_conditioning': 'yes'}
31
        self.filetype = FileType.json
32
        self.filename = '{}.{}'.format(
33
            self.__class__.__name__, self.filetype.name)
34
35
    def types(self):
36
        hutakkocl = self.tags.copy()
37
        hutakkocl.update(POS_HU_GEN)
38
        hutakkocl.update(PAY_CASH)
39
        self.__types = [
40
            {'poi_code': 'hutakkocl', 'poi_name': 'Takko', 'poi_type': 'shop',
41
             'poi_tags': hutakkocl, 'poi_url_base': 'https://takko.hu', 'poi_search_name': 'takko'},
42
        ]
43
        return self.__types
44
45
    def process(self):
46
        pass
47