diff options
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/genotypes/preprocess_csv_collect_info.py | 6 | ||||
| -rw-r--r-- | scripts/genotypes/types.py | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/scripts/genotypes/preprocess_csv_collect_info.py b/scripts/genotypes/preprocess_csv_collect_info.py index ab046d8..2d76021 100644 --- a/scripts/genotypes/preprocess_csv_collect_info.py +++ b/scripts/genotypes/preprocess_csv_collect_info.py @@ -21,8 +21,7 @@ logger = logging.getLogger(__name__) def filecontents(path: Path) -> Iterator[str]: """Return an iterator to the file contents""" with path.open("r") as fl: - for line in fl.readlines(): - yield line + yield from fl.readlines() def identify_columns( @@ -82,7 +81,7 @@ def file_statistics(lines: Iterator[str], fileconfigs: dict) -> FileStats: dotgeno = {} headers: tuple[str, ...] = tuple() genosymbols: set[str] = set() - errors: tuple() + # errors: tuple() for line in lines: stats["total_lines"] = stats.get("total_lines", 0) + 1 _line = line.strip() @@ -236,6 +235,7 @@ if __name__ == "__main__": def main() -> SysExit: + """Entry-point to the pre-processor.""" try: args = parse_args() setup_logging(logger, args.log_level.upper(), tuple()) diff --git a/scripts/genotypes/types.py b/scripts/genotypes/types.py index 8eeb574..bf46606 100644 --- a/scripts/genotypes/types.py +++ b/scripts/genotypes/types.py @@ -42,7 +42,7 @@ class LineError: @dataclass(frozen=True) -class FileStats: +class FileStats:# pylint: disable=[too-many-instance-attributes] """Custom file statistics.""" data_lines: int total_lines: int |
