Projekt

Obecné

Profil

« Předchozí | Další » 

Revize af7609b5

Přidáno uživatelem Tomáš Ballák před více než 3 roky(ů)

Re #8193 - refactoring crawler

Zobrazit rozdíly:

modules/crawler/DatasetProcessing/OBSAZENIMISTNOSTI_processor.py
5 5
import time
6 6
import datetime
7 7

  
8
from shared_types import DateDict
9

  
8 10
logging.basicConfig(filename='../../CrawlerLogs' + 'Crawlerlog-' +
9 11
                    date.today().strftime("%b-%Y") + '.log',
10 12
                    level=logging.INFO,
11 13
                    format='%(asctime)s %(message)s')
12 14

  
13 15

  
14
def process_file(filename):
16
def process_file(filename: str) -> DateDict:
15 17
    """
16 18
    Method that take path to crawled file and outputs date dictionary:
17 19
    Date dictionary is a dictionary where keys are dates in format YYYY-mm-dd-hh (2018-04-08-15)
......
25 27
    None if not implemented
26 28
    date_dict when implemented
27 29
    """
28
    date_dict = dict()
30
    date_dict = {}
29 31

  
30 32
    with open(filename, "r") as file:
31 33

  

Také k dispozici: Unified diff