Skip to content
Snippets Groups Projects
Commit c19f5d87 authored by Christophe Benz's avatar Christophe Benz
Browse files

Simplify code, avoid docstring rot

parent 9c1a6ade
No related branches found
No related tags found
No related merge requests found
Pipeline #422088 failed
......@@ -159,25 +159,12 @@ def load_series_xml_file(xml_file: Path):
if k != "TIME_PERIOD" and k != "OBS_VALUE" and v != ""
}
NON_WANTED_SERIES_ATTRIBUTES = {
"FREQ",
"BBK_ID",
"BBK_TITLE",
"BBK_TITLE_ENG",
"BBK_COMM_GEN",
"BBK_COMM_GEN_ENG",
}
def compute_series_attributes(elt):
"""Compute a dictionary containing additional information about series.
This applies to series other than FREQ, BBK_ID, BBK_TITLE*, BBK_COMM_GEN
and BBK_COMM_GEN_ENG
"""
"""Compute a dictionary containing additional information about series."""
return {
k: norm_space(v)
for k, v in elt.attrib.items()
if k not in NON_WANTED_SERIES_ATTRIBUTES and v != ""
if k not in {"FREQ", "BBK_TITLE", "BBK_TITLE_ENG", "BBK_COMM_GEN", "BBK_COMM_GEN_ENG"} and v != ""
}
SERIES_TAG = "{http://www.bundesbank.de/statistik/zeitreihen/BBKcompact}Series"
......
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