aboutsummaryrefslogtreecommitdiff
path: root/quality_control
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2025-06-11 05:37:30 -0500
committerFrederick Muriuki Muriithi2025-06-11 05:37:30 -0500
commit91df005212363108f4deb31dc0fc81e2424547ce (patch)
tree51666cad37a262c8d82b5391a1ab668fe7d63d3e /quality_control
parent34161e8f6147120eae6530d9de501b0866bb84c6 (diff)
downloadgn-uploader-91df005212363108f4deb31dc0fc81e2424547ce.tar.gz
Fix issues caught by linter.
Diffstat (limited to 'quality_control')
-rw-r--r--quality_control/checks.py15
-rw-r--r--quality_control/parsing.py17
2 files changed, 17 insertions, 15 deletions
diff --git a/quality_control/checks.py b/quality_control/checks.py
index bdfd12b..bb05e31 100644
--- a/quality_control/checks.py
+++ b/quality_control/checks.py
@@ -52,12 +52,15 @@ def decimal_places_pattern(mini: int, maxi: Optional[int] = None) -> re.Pattern:
+ r")$"
)
-def decimal_points_error(filename: str,# pylint: disable=[too-many-arguments]
- lineno: int,
- field: str,
- value: str,
- mini: int,
- maxi: Optional[int] = None) -> Optional[InvalidValue]:
+def decimal_points_error(
+ # pylint: disable=[too-many-arguments, too-many-positional-arguments]
+ filename: str,
+ lineno: int,
+ field: str,
+ value: str,
+ mini: int,
+ maxi: Optional[int] = None
+) -> Optional[InvalidValue]:
"""
Check that 'value' in a decimal number with the appropriate decimal places.
"""
diff --git a/quality_control/parsing.py b/quality_control/parsing.py
index f1d21fc..7a8185d 100644
--- a/quality_control/parsing.py
+++ b/quality_control/parsing.py
@@ -104,23 +104,22 @@ def collect_errors(
if line_number == 1:
consistent_columns_checker = make_column_consistency_checker(
filename, line)
- for error in __process_errors__(
- filename, line_number, line,
- partial(header_errors, strains=strains),
- errors):
- yield error
+ yield from __process_errors__(
+ filename, line_number, line,
+ partial(header_errors, strains=strains),
+ errors)
if line_number != 1:
- col_consistency_error = consistent_columns_checker(line_number, line)
+ col_consistency_error = consistent_columns_checker(# pylint: disable=[possibly-used-before-assignment]
+ line_number, line)
if col_consistency_error:
yield col_consistency_error
- for error in __process_errors__(
+ yield from __process_errors__(
filename, line_number, line, (
average_errors if filetype == FileType.AVERAGE
else se_errors),
- errors):
- yield error
+ errors)
if update_progress:
update_progress(line_number, line)