diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f4f5935..91ffba3 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -11,22 +11,22 @@ repos: - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook - rev: v9.23.0 + rev: v9.24.0 hooks: - id: commitlint stages: - commit-msg additional_dependencies: ['conventional-changelog-conventionalcommits'] - repo: https://github.com/pycqa/isort - rev: 7.0.0 + rev: 8.0.1 hooks: - id: isort - repo: https://github.com/psf/black-pre-commit-mirror - rev: 25.12.0 + rev: 26.3.1 hooks: - id: black - repo: https://github.com/codespell-project/codespell - rev: v2.4.1 + rev: v2.4.2 hooks: - id: codespell args: ["-x", ".codespellignorelines"] diff --git a/luigi_tools/parameter.py b/luigi_tools/parameter.py index c7dc989..50a3d2f 100644 --- a/luigi_tools/parameter.py +++ b/luigi_tools/parameter.py @@ -13,6 +13,7 @@ # limitations under the License. """This module provides some specific luigi parameters.""" + import collections.abc import dataclasses import typing diff --git a/luigi_tools/target.py b/luigi_tools/target.py index 53193e5..690c553 100644 --- a/luigi_tools/target.py +++ b/luigi_tools/target.py @@ -13,6 +13,7 @@ # limitations under the License. """This module provides some specific luigi targets.""" + from pathlib import Path import luigi diff --git a/luigi_tools/task.py b/luigi_tools/task.py index cd501f7..d423ed8 100644 --- a/luigi_tools/task.py +++ b/luigi_tools/task.py @@ -13,6 +13,7 @@ # limitations under the License. """This module provides some specific luigi tasks and associated tools.""" + import logging import types from copy import deepcopy diff --git a/luigi_tools/util.py b/luigi_tools/util.py index 030651a..ea7efe7 100644 --- a/luigi_tools/util.py +++ b/luigi_tools/util.py @@ -13,6 +13,7 @@ # limitations under the License. """This module provides some functions to work with luigi tasks.""" + import configparser import logging import os diff --git a/tests/test_parameter.py b/tests/test_parameter.py index 931d9bf..c9b30ea 100644 --- a/tests/test_parameter.py +++ b/tests/test_parameter.py @@ -1135,33 +1135,21 @@ def output(self): return luigi.LocalTarget("not_existing_file") # Test with values from config - with set_luigi_config( - { - "TaskDataClassParameter": { - "a": """{ + with set_luigi_config({"TaskDataClassParameter": {"a": """{ "a": {"a": 1, "b": "2"}, "b": {"c": 3.0, "d": 4}, "c": {"e": 5, "f": 6}, "d": {"7": 8.0, "9": 10.0} - }""" - } - } - ): + }"""}}): assert luigi.build([TaskDataClassParameter()], local_scheduler=True) # Parsing fails with integer keys - with set_luigi_config( - { - "TaskDataClassParameter": { - "a": """{ + with set_luigi_config({"TaskDataClassParameter": {"a": """{ "a": {"a": 1, "b": "2"}, "b": {"c": 3.0, "d": 4}, "c": {"e": 5, "f": 6}, "d": {7: 8.0, 9: 10.0} - }""" - } - } - ): + }"""}}): with pytest.raises(ValueError): luigi.build([TaskDataClassParameter()], local_scheduler=True) diff --git a/tests/tools.py b/tests/tools.py index 19a6d74..aa9f56f 100644 --- a/tests/tools.py +++ b/tests/tools.py @@ -13,6 +13,7 @@ # limitations under the License. """A few helpers for luigi-tools test suite.""" + from pathlib import Path