diff --git a/README.md b/README.md index 137257a..b2299e4 100644 --- a/README.md +++ b/README.md @@ -152,7 +152,7 @@ source venv/bin/activate # On Windows: venv\Scripts\activate pip install -e ".[dev]" ``` -**Note**: This package has no external runtime dependencies (uses only Python standard library). Development dependencies (pytest, pytest-cov) are only needed for running tests. +**Note**: This package has no external runtime dependencies (uses only Python standard library). Development dependencies (pytest, pytest-cov) are only needed for running tests. **Python >= 3.10 is required for installing the development dependencies.** ## Quick Start diff --git a/dataprov/dataprov.py b/dataprov/dataprov.py index 1f9be2b..42a53b4 100644 --- a/dataprov/dataprov.py +++ b/dataprov/dataprov.py @@ -1,3 +1,5 @@ +from __future__ import annotations + """ Data Provenance Tracking Library (PROV-JSON Format) @@ -854,9 +856,7 @@ def add( } # Process input entities - for i, (file_path, file_format) in enumerate( - zip(inputs, input_formats, strict=True) - ): + for i, (file_path, file_format) in enumerate(zip(inputs, input_formats)): entity_id = f"entity:{file_path}" # Create entity if not exists @@ -917,9 +917,7 @@ def add( self.data["used"][usage_id] = usage # Process output entities - for i, (file_path, file_format) in enumerate( - zip(outputs, output_formats, strict=True) - ): + for i, (file_path, file_format) in enumerate(zip(outputs, output_formats)): entity_id = f"entity:{file_path}" # Create entity diff --git a/pyproject.toml b/pyproject.toml index 82dc55c..2188fcb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,14 +4,14 @@ build-backend = "setuptools.build_meta" [project] name = "dataprov" -version = "3.0.2" +version = "3.1.0" description = "W3C PROV-compliant data provenance tracking library for recording processing chains" readme = "README.md" license = {file = "LICENSE"} authors = [ {name = "Fredrik Warg"} ] -requires-python = ">=3.10" +requires-python = ">=3.8" classifiers = [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", @@ -30,16 +30,16 @@ keywords = ["provenance", "data-lineage", "data-tracking", "metadata", "prov", " dev = [ "pytest>=7.0", "pytest-cov>=4.0", - "ruff>=0.8.0", - "pre-commit>=4.0", + "ruff>=0.8.0; python_version >= '3.10'", + "pre-commit>=4.0; python_version >= '3.10'", ] [dependency-groups] dev = [ "pytest>=7.0", "pytest-cov>=4.0", - "ruff>=0.8.0", - "pre-commit>=4.0", + "ruff>=0.8.0; python_version >= '3.10'", + "pre-commit>=4.0; python_version >= '3.10'", ] [project.scripts] @@ -80,6 +80,9 @@ select = [ ignore = [ "E501", # line too long (handled by formatter) "SIM108", # use ternary operator (can reduce readability) + "B905", # zip() without 'strict=' + "E402", # Module level import not at top of file + "UP037", # Remove quotes from type annotation ] [tool.ruff.lint.isort]