From c18e584f429c5f251a5d9f97181711ed33b74e14 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 29 Apr 2024 23:31:28 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- docs/source/conf.py | 1 + ssm_dox/__init__.py | 1 + ssm_dox/_cli/commands/__init__.py | 1 + ssm_dox/_cli/commands/_build.py | 1 + ssm_dox/_cli/commands/_check.py | 1 + ssm_dox/_cli/commands/_publish.py | 1 + ssm_dox/_cli/commands/utils.py | 1 + ssm_dox/_cli/logs.py | 1 + ssm_dox/_cli/main.py | 1 + ssm_dox/_logging.py | 1 + ssm_dox/constants.py | 1 + ssm_dox/document.py | 1 + ssm_dox/dox.py | 1 + ssm_dox/exceptions.py | 1 + ssm_dox/finder.py | 1 + ssm_dox/mixins.py | 1 + ssm_dox/models/base.py | 1 + ssm_dox/models/document.py | 1 + ssm_dox/models/main_steps/__init__.py | 1 + ssm_dox/models/main_steps/aws_runpowershellscript.py | 1 + ssm_dox/models/main_steps/aws_runshellscript.py | 1 + ssm_dox/models/main_steps/base.py | 1 + ssm_dox/models/parameter.py | 1 + tests/conftest.py | 1 + tests/integration/cli/commands/test_build.py | 1 + tests/integration/cli/commands/test_check.py | 1 + tests/integration/cli/commands/test_publish.py | 1 + tests/integration/conftest.py | 1 + tests/unit/conftest.py | 1 + tests/unit/models/main_steps/test_aws_runpowershellscript.py | 1 + tests/unit/models/main_steps/test_aws_runshellscript.py | 1 + tests/unit/models/main_steps/test_base.py | 1 + tests/unit/models/test_base.py | 1 + tests/unit/models/test_document.py | 1 + tests/unit/models/test_parameter.py | 1 + tests/unit/test_document.py | 1 + tests/unit/test_dox.py | 1 + tests/unit/test_finder.py | 1 + tests/unit/test_mixins.py | 1 + 39 files changed, 39 insertions(+) diff --git a/docs/source/conf.py b/docs/source/conf.py index 83949ad..4324366 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -6,6 +6,7 @@ For a full list see the documentation: http://www.sphinx-doc.org/en/master/config """ + # pylint: skip-file import os from pathlib import Path diff --git a/ssm_dox/__init__.py b/ssm_dox/__init__.py index db60280..f0d5bd5 100644 --- a/ssm_dox/__init__.py +++ b/ssm_dox/__init__.py @@ -1,4 +1,5 @@ """SSM Document builder.""" + import logging from importlib.metadata import PackageNotFoundError, version diff --git a/ssm_dox/_cli/commands/__init__.py b/ssm_dox/_cli/commands/__init__.py index 6771df6..9903195 100644 --- a/ssm_dox/_cli/commands/__init__.py +++ b/ssm_dox/_cli/commands/__init__.py @@ -1,4 +1,5 @@ """CLI commands.""" + from ._build import build from ._check import check from ._publish import publish diff --git a/ssm_dox/_cli/commands/_build.py b/ssm_dox/_cli/commands/_build.py index 32394d8..2fac5be 100644 --- a/ssm_dox/_cli/commands/_build.py +++ b/ssm_dox/_cli/commands/_build.py @@ -21,6 +21,7 @@ $ ssm-dox build ./dox --output ./ssm_documents """ + from pathlib import Path import click diff --git a/ssm_dox/_cli/commands/_check.py b/ssm_dox/_cli/commands/_check.py index 3ba1bb5..0eff6a1 100644 --- a/ssm_dox/_cli/commands/_check.py +++ b/ssm_dox/_cli/commands/_check.py @@ -16,6 +16,7 @@ $ ssm-dox check ./dox ./ssm_documents """ + import logging from pathlib import Path diff --git a/ssm_dox/_cli/commands/_publish.py b/ssm_dox/_cli/commands/_publish.py index 378da89..40ad603 100644 --- a/ssm_dox/_cli/commands/_publish.py +++ b/ssm_dox/_cli/commands/_publish.py @@ -23,6 +23,7 @@ $ ssm-dox publish example-bucket ./ssm_documents --region us-east-1 """ + import logging from pathlib import Path from typing import Optional diff --git a/ssm_dox/_cli/commands/utils.py b/ssm_dox/_cli/commands/utils.py index d215abd..b13c931 100644 --- a/ssm_dox/_cli/commands/utils.py +++ b/ssm_dox/_cli/commands/utils.py @@ -1,4 +1,5 @@ """Utilities.""" + from __future__ import annotations from pathlib import Path diff --git a/ssm_dox/_cli/logs.py b/ssm_dox/_cli/logs.py index b1f916a..7d52bf7 100644 --- a/ssm_dox/_cli/logs.py +++ b/ssm_dox/_cli/logs.py @@ -1,4 +1,5 @@ """CLI logging setup.""" + import logging import os from functools import cached_property diff --git a/ssm_dox/_cli/main.py b/ssm_dox/_cli/main.py index 2dc8022..103074a 100644 --- a/ssm_dox/_cli/main.py +++ b/ssm_dox/_cli/main.py @@ -1,4 +1,5 @@ """SSM Document Builder CLI entrypoint.""" + from __future__ import annotations from typing import Any, Dict diff --git a/ssm_dox/_logging.py b/ssm_dox/_logging.py index 7163c9b..7a7c094 100644 --- a/ssm_dox/_logging.py +++ b/ssm_dox/_logging.py @@ -1,4 +1,5 @@ """Custom logging.""" + import logging from enum import IntEnum from typing import Any, Text, Union diff --git a/ssm_dox/constants.py b/ssm_dox/constants.py index 17b574d..29126eb 100644 --- a/ssm_dox/constants.py +++ b/ssm_dox/constants.py @@ -1,4 +1,5 @@ """Constant values.""" + from pathlib import Path DOCUMENTS_DIR = Path("./ssm_documents") diff --git a/ssm_dox/document.py b/ssm_dox/document.py index bbbfea9..b7772d3 100644 --- a/ssm_dox/document.py +++ b/ssm_dox/document.py @@ -1,4 +1,5 @@ """SSM Documents.""" + from __future__ import annotations import logging diff --git a/ssm_dox/dox.py b/ssm_dox/dox.py index 8c48c16..dd2871e 100644 --- a/ssm_dox/dox.py +++ b/ssm_dox/dox.py @@ -1,4 +1,5 @@ """Objects for working with Dox.""" + from __future__ import annotations import difflib diff --git a/ssm_dox/exceptions.py b/ssm_dox/exceptions.py index 6dc0d58..9a36463 100644 --- a/ssm_dox/exceptions.py +++ b/ssm_dox/exceptions.py @@ -1,4 +1,5 @@ """Exceptions.""" + from __future__ import annotations from typing import TYPE_CHECKING diff --git a/ssm_dox/finder.py b/ssm_dox/finder.py index 6b5e370..5864025 100644 --- a/ssm_dox/finder.py +++ b/ssm_dox/finder.py @@ -1,4 +1,5 @@ """Explore a directory.""" + from __future__ import annotations import logging diff --git a/ssm_dox/mixins.py b/ssm_dox/mixins.py index b95cde0..3a4a3fa 100644 --- a/ssm_dox/mixins.py +++ b/ssm_dox/mixins.py @@ -1,4 +1,5 @@ """Mixins.""" + from __future__ import annotations import os diff --git a/ssm_dox/models/base.py b/ssm_dox/models/base.py index 63fd577..8aeaa1e 100644 --- a/ssm_dox/models/base.py +++ b/ssm_dox/models/base.py @@ -1,4 +1,5 @@ """Base classes for data models.""" + from pydantic import BaseModel as _BaseModel diff --git a/ssm_dox/models/document.py b/ssm_dox/models/document.py index 002b29f..3701c19 100644 --- a/ssm_dox/models/document.py +++ b/ssm_dox/models/document.py @@ -1,4 +1,5 @@ """AWS SSM Document data model.""" + from __future__ import annotations from typing import Dict, List, Optional diff --git a/ssm_dox/models/main_steps/__init__.py b/ssm_dox/models/main_steps/__init__.py index a3eebaa..51901d5 100644 --- a/ssm_dox/models/main_steps/__init__.py +++ b/ssm_dox/models/main_steps/__init__.py @@ -1,4 +1,5 @@ """AWS SSM Document mainStep data models.""" + from typing import Union from .aws_runpowershellscript import AwsRunPowerShellScript diff --git a/ssm_dox/models/main_steps/aws_runpowershellscript.py b/ssm_dox/models/main_steps/aws_runpowershellscript.py index dc75624..b620c9d 100644 --- a/ssm_dox/models/main_steps/aws_runpowershellscript.py +++ b/ssm_dox/models/main_steps/aws_runpowershellscript.py @@ -3,6 +3,7 @@ https://docs.aws.amazon.com/systems-manager/latest/userguide/ssm-plugins.html#aws-runPowerShellScript """ + from __future__ import annotations from typing import List, Literal, Optional diff --git a/ssm_dox/models/main_steps/aws_runshellscript.py b/ssm_dox/models/main_steps/aws_runshellscript.py index e5c765b..0b4bfc1 100644 --- a/ssm_dox/models/main_steps/aws_runshellscript.py +++ b/ssm_dox/models/main_steps/aws_runshellscript.py @@ -3,6 +3,7 @@ https://docs.aws.amazon.com/systems-manager/latest/userguide/ssm-plugins.html#aws-runShellScript """ + from __future__ import annotations from typing import List, Literal, Optional diff --git a/ssm_dox/models/main_steps/base.py b/ssm_dox/models/main_steps/base.py index 6b9ddd7..edc10fe 100644 --- a/ssm_dox/models/main_steps/base.py +++ b/ssm_dox/models/main_steps/base.py @@ -1,4 +1,5 @@ """AWS SSM Document mainStep base data model.""" + from __future__ import annotations from typing import Dict, List, Literal, Optional diff --git a/ssm_dox/models/parameter.py b/ssm_dox/models/parameter.py index 988ee54..a5f93d8 100644 --- a/ssm_dox/models/parameter.py +++ b/ssm_dox/models/parameter.py @@ -1,4 +1,5 @@ """AWS SSM Document parameter data model.""" + from __future__ import annotations from typing import Any, Dict, List, Literal, Optional, cast diff --git a/tests/conftest.py b/tests/conftest.py index 01793d5..0c0788f 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,4 +1,5 @@ """Pytest configuration, fixtures, and plugins.""" + # pylint: disable=redefined-outer-name from __future__ import annotations diff --git a/tests/integration/cli/commands/test_build.py b/tests/integration/cli/commands/test_build.py index b76b9a0..fc90869 100644 --- a/tests/integration/cli/commands/test_build.py +++ b/tests/integration/cli/commands/test_build.py @@ -1,4 +1,5 @@ """Test build command.""" + from __future__ import annotations from typing import TYPE_CHECKING diff --git a/tests/integration/cli/commands/test_check.py b/tests/integration/cli/commands/test_check.py index 7b3f1f7..45b0b73 100644 --- a/tests/integration/cli/commands/test_check.py +++ b/tests/integration/cli/commands/test_check.py @@ -1,4 +1,5 @@ """Test check command.""" + from __future__ import annotations from typing import TYPE_CHECKING diff --git a/tests/integration/cli/commands/test_publish.py b/tests/integration/cli/commands/test_publish.py index 5fbbaa2..5912341 100644 --- a/tests/integration/cli/commands/test_publish.py +++ b/tests/integration/cli/commands/test_publish.py @@ -1,4 +1,5 @@ """Test publish command.""" + # pylint: disable=unused-argument from __future__ import annotations diff --git a/tests/integration/conftest.py b/tests/integration/conftest.py index 2e944ea..69ea909 100644 --- a/tests/integration/conftest.py +++ b/tests/integration/conftest.py @@ -1,4 +1,5 @@ """Pytest configuration, fixtures, and plugins.""" + # pylint: disable=redefined-outer-name from __future__ import annotations diff --git a/tests/unit/conftest.py b/tests/unit/conftest.py index af229a2..88a3a15 100644 --- a/tests/unit/conftest.py +++ b/tests/unit/conftest.py @@ -1,4 +1,5 @@ """Pytest configuration, fixtures, and plugins.""" + # pylint: disable=redefined-outer-name from __future__ import annotations diff --git a/tests/unit/models/main_steps/test_aws_runpowershellscript.py b/tests/unit/models/main_steps/test_aws_runpowershellscript.py index 420355d..e4d54be 100644 --- a/tests/unit/models/main_steps/test_aws_runpowershellscript.py +++ b/tests/unit/models/main_steps/test_aws_runpowershellscript.py @@ -1,4 +1,5 @@ """Test ssm_dox.models.main_steps.aws_runpowershellscript.""" + # pylint: disable=no-member,no-self-use from typing import Dict diff --git a/tests/unit/models/main_steps/test_aws_runshellscript.py b/tests/unit/models/main_steps/test_aws_runshellscript.py index 85915f2..4371d14 100644 --- a/tests/unit/models/main_steps/test_aws_runshellscript.py +++ b/tests/unit/models/main_steps/test_aws_runshellscript.py @@ -1,4 +1,5 @@ """Test ssm_dox.models.main_steps.aws_runshellscript.""" + # pylint: disable=no-member,no-self-use from typing import Dict diff --git a/tests/unit/models/main_steps/test_base.py b/tests/unit/models/main_steps/test_base.py index 6a02c4b..7297c4f 100644 --- a/tests/unit/models/main_steps/test_base.py +++ b/tests/unit/models/main_steps/test_base.py @@ -1,4 +1,5 @@ """Test ssm_dox.models.main_steps.base.""" + # pylint: disable=no-self-use from typing import Any, Dict, Optional diff --git a/tests/unit/models/test_base.py b/tests/unit/models/test_base.py index 473a139..0fc97a3 100644 --- a/tests/unit/models/test_base.py +++ b/tests/unit/models/test_base.py @@ -1,4 +1,5 @@ """Test ssm_dox.models.base.""" + # pylint: disable=no-self-use,unneeded-not import json from typing import Optional diff --git a/tests/unit/models/test_document.py b/tests/unit/models/test_document.py index 551b834..cdf879c 100644 --- a/tests/unit/models/test_document.py +++ b/tests/unit/models/test_document.py @@ -1,4 +1,5 @@ """Test ssm_dox.models.document.""" + # pylint: disable=no-self-use,unsubscriptable-object from typing import Dict diff --git a/tests/unit/models/test_parameter.py b/tests/unit/models/test_parameter.py index 817674e..77bee3a 100644 --- a/tests/unit/models/test_parameter.py +++ b/tests/unit/models/test_parameter.py @@ -1,4 +1,5 @@ """Test ssm_dox.models.parameter.""" + # pylint: disable=no-self-use from typing import Any, Optional diff --git a/tests/unit/test_document.py b/tests/unit/test_document.py index 4e39114..f435488 100644 --- a/tests/unit/test_document.py +++ b/tests/unit/test_document.py @@ -1,4 +1,5 @@ """Test ssm_dox.document.""" + # pylint: disable=no-self-use from __future__ import annotations diff --git a/tests/unit/test_dox.py b/tests/unit/test_dox.py index bad2b6c..4631ed9 100644 --- a/tests/unit/test_dox.py +++ b/tests/unit/test_dox.py @@ -1,4 +1,5 @@ """Test ssm_dox.dox.""" + # pylint: disable=no-self-use from __future__ import annotations diff --git a/tests/unit/test_finder.py b/tests/unit/test_finder.py index 7ed5f9b..decdbc3 100644 --- a/tests/unit/test_finder.py +++ b/tests/unit/test_finder.py @@ -1,4 +1,5 @@ """Test ssm_dox.finder.""" + # pylint: disable=no-self-use from __future__ import annotations diff --git a/tests/unit/test_mixins.py b/tests/unit/test_mixins.py index 9bba1c1..4e04ec7 100644 --- a/tests/unit/test_mixins.py +++ b/tests/unit/test_mixins.py @@ -1,4 +1,5 @@ """Test ssm_dox.mixins.""" + # pylint: disable=no-self-use from __future__ import annotations