Commit 499827a7 authored by Pierre Dittgen's avatar Pierre Dittgen
Browse files

Fix linter issues

parent 980af6f2
Pipeline #256784 passed with stage
in 2 minutes and 25 seconds
......@@ -28,6 +28,7 @@ import logging
import shutil
import sys
from pathlib import Path
from typing import List
import convert_util as cu
......@@ -124,7 +125,7 @@ class CSVLineHelper:
assert header_cols[0] == "Item_Number"
period_values = []
current_period_values = []
current_period_values: List = []
start = 0
# Cuts period list into sublist
......@@ -148,7 +149,7 @@ class CSVLineHelper:
code_set = set()
for p in period_values:
freq, code = compute_freq_and_code(p[2][0])
assert not code in code_set, "Code [{}] already found".format(code)
assert code not in code_set, "Code [{}] already found".format(code)
p_info = {
"col_interval": (p[0] + 3, p[1] + 3),
"obs_status": ["p" if p.startswith("p ") else "" for p in p[2]],
......@@ -227,7 +228,7 @@ def extract_timeseries_from_csv(
Generates tsv files
Returns time series info to write dataset.json
"""
series_info = []
series_info: List = []
with csv_filepath.open("rt", encoding="ascii") as csv_fd:
csv_name = None
in_data = False
......@@ -240,7 +241,8 @@ def extract_timeseries_from_csv(
# Most frequently use case
if in_data:
series_info.extend(csv_lh.generate_tsv_from_csv_row(cols))
if csv_lh:
series_info.extend(csv_lh.generate_tsv_from_csv_row(cols))
continue
# First line: get csv name
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment