diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7dd3fb2..959a374 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,19 +4,19 @@ repos: - repo: https://github.com/asottile/pyupgrade - rev: v3.10.1 + rev: v3.21.2 hooks: - id: pyupgrade - - repo: https://github.com/psf/black - rev: 23.7.0 + - repo: https://github.com/psf/black-pre-commit-mirror + rev: 26.5.0 hooks: - id: black - repo: https://github.com/pre-commit/mirrors-prettier - rev: v3.0.3 + rev: v4.0.0-alpha.8 hooks: - id: prettier - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v6.0.0 hooks: - id: check-added-large-files - id: check-ast @@ -26,20 +26,20 @@ repos: - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/PyCQA/flake8 - rev: 6.1.0 + rev: 7.3.0 hooks: - id: flake8 args: [--max-line-length=100] - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.5.1 + rev: v2.1.0 hooks: - id: mypy args: [--no-strict-optional, --ignore-missing-imports] additional_dependencies: [types-six, types-PyYAML] - repo: https://github.com/packit/pre-commit-hooks - rev: v1.2.0 + rev: v1.3.0 hooks: - id: check-rebase args: - git://github.com/user-cont/colin.git - stages: [manual, push] + stages: [manual, pre-push] diff --git a/colin/core/ruleset/loader.py b/colin/core/ruleset/loader.py index e39b165..7a00b46 100644 --- a/colin/core/ruleset/loader.py +++ b/colin/core/ruleset/loader.py @@ -16,6 +16,7 @@ """ This module is responsible for loading rulesets: reading from disk, parsing/validating """ + import yaml import logging diff --git a/colin/utils/cont.py b/colin/utils/cont.py index 508f7bf..14945af 100644 --- a/colin/utils/cont.py +++ b/colin/utils/cont.py @@ -2,6 +2,7 @@ This is a temporary module to support unpriv way of interacting with container images. """ + import logging logger = logging.getLogger(__name__) diff --git a/tests/integration/test_cont.py b/tests/integration/test_cont.py index 861add8..35c22fa 100644 --- a/tests/integration/test_cont.py +++ b/tests/integration/test_cont.py @@ -1,6 +1,7 @@ """ Testing of low level interaction with images. """ + import pytest diff --git a/tests/integration/test_ruleset_file.py b/tests/integration/test_ruleset_file.py index cf961b5..19de9a6 100644 --- a/tests/integration/test_ruleset_file.py +++ b/tests/integration/test_ruleset_file.py @@ -92,7 +92,7 @@ def get_results_from_colin_labels_image( def test_specific_ruleset_as_fileobj(tmpdir, ruleset, expected_dict, target_label): - (_, t) = tempfile.mkstemp(dir=str(tmpdir)) + _, t = tempfile.mkstemp(dir=str(tmpdir)) with open(t, "w") as f: yaml.dump(ruleset, f)