diff --git a/krakenparser/pipeline.py b/krakenparser/pipeline.py index 9c28c01..0520780 100644 --- a/krakenparser/pipeline.py +++ b/krakenparser/pipeline.py @@ -58,11 +58,8 @@ def _is_processable(filepath: Path) -> bool: except Exception: return False - # 3. СТРОГАЯ проверка на UTF-8 (вот здесь косяк) try: - # Добавляем errors="strict", чтобы не глотать BOM и левые кодировки with open(filepath, "r", encoding="utf-8", errors="strict") as f: - # Читаем небольшой кусок файла для проверки f.read(1024) return True except UnicodeDecodeError: diff --git a/pyproject.toml b/pyproject.toml index a19c147..5110fba 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,9 +6,9 @@ build-backend = "setuptools.build_meta" name = "krakenparser" version = "1.1.2" description = "A collection of scripts designed to process Kraken2 reports and convert them into CSV format." -readme = {file = "README.md", content-type = "text/markdown"} -license = {file = "LICENSE"} -authors = [{name = "Ilia Popov", email = "iljapopov17@gmail.com"}] +readme = { file = "README.md", content-type = "text/markdown" } +license = { file = "LICENSE" } +authors = [{ name = "Ilia Popov", email = "iljapopov17@gmail.com" }] requires-python = ">=3.10,<=3.16" dependencies = [ "pandas>=2.0.0,<=2.3.3", @@ -20,10 +20,7 @@ dependencies = [ ] [project.optional-dependencies] -dev = [ - "pytest>=7.0.0", - "pytest-cov>=4.0.0", -] +dev = ["pytest>=7.0.0", "pytest-cov>=4.0.0"] [project.urls] Homepage = "https://github.com/PopovIILab/KrakenParser" @@ -52,7 +49,4 @@ omit = [ ] [tool.coverage.report] -exclude_lines = [ - "pragma: no cover", - "if __name__ == .__main__.:", -] +exclude_lines = ["pragma: no cover", "if __name__ == .__main__.:"]