about summary refs log tree commit diff
path: root/quality_control
diff options
context:
space:
mode:
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)