diff options
author | Frederick Muriuki Muriithi | 2022-06-15 09:36:18 +0300 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2022-06-15 09:36:18 +0300 |
commit | d2605cb72d7cdbc7d3cc633b94a451c0acd2edbb (patch) | |
tree | 8bf992967a750bf4dc71290b78285f6239823816 /quality_control/headers.py | |
parent | 6760d322637a3d875242a66e9c1a784866d7df1d (diff) | |
download | gn-uploader-d2605cb72d7cdbc7d3cc633b94a451c0acd2edbb.tar.gz |
Fix linting and type errors
Diffstat (limited to 'quality_control/headers.py')
-rw-r--r-- | quality_control/headers.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/quality_control/headers.py b/quality_control/headers.py index 79d7e43..f4f4dad 100644 --- a/quality_control/headers.py +++ b/quality_control/headers.py @@ -27,14 +27,15 @@ def invalid_headings( enumerate(headings, start=2) if header not in strains) def duplicate_headings( - line_number: int, headers: Sequence[str]) -> Union[InvalidValue, None]: + line_number: int, + headers: Sequence[str]) -> Tuple[DuplicateHeading, ...]: """Return a tuple of `DuplicateHeading` objects for each column heading that is a duplicate of another column heading.""" def __update_columns__(acc, item): if item[1] in acc.keys(): return {**acc, item[1]: acc[item[1]] + (item[0],)} return {**acc, item[1]: (item[0],)} - repeated = { + repeated = {# type: ignore[var-annotated] heading: columns for heading, columns in reduce(__update_columns__, enumerate(headers, start=1), {}).items() if len(columns) > 1 |