diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6e08a6a..89c1a58 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -57,13 +57,3 @@ repos: pass_filenames: true types: - python - - - id: pydocstyle - name: pydocstyle - entry: pydocstyle - exclude: ^$ - files: "containers_sugar/" - language: system - pass_filenames: true - types: - - python diff --git a/containers_sugar/cli.py b/containers_sugar/cli.py index d425a6c..b1a2461 100644 --- a/containers_sugar/cli.py +++ b/containers_sugar/cli.py @@ -2,6 +2,7 @@ import argparse import os import sys + from pathlib import Path from typing import Tuple diff --git a/containers_sugar/logs.py b/containers_sugar/logs.py index 60df606..5b9601a 100644 --- a/containers_sugar/logs.py +++ b/containers_sugar/logs.py @@ -1,5 +1,6 @@ """Logs classes and function for containers-sugar system.""" import os + from enum import Enum from colorama import Fore diff --git a/containers_sugar/sugar.py b/containers_sugar/sugar.py index 4dcf5db..8e544e9 100644 --- a/containers_sugar/sugar.py +++ b/containers_sugar/sugar.py @@ -2,6 +2,7 @@ import io import os import sys + from copy import deepcopy from pathlib import Path from typing import Dict, List, Optional, Type @@ -9,6 +10,7 @@ import dotenv import sh import yaml # type: ignore + from jinja2 import Template from containers_sugar import __version__ @@ -159,8 +161,8 @@ def _load_config(self): with open(self.config_file, 'r') as f: # escape template tags content = escape_template_tag(f.read()) - f = io.StringIO(content) - self.config = yaml.safe_load(f) + f_content = io.StringIO(content) + self.config = yaml.safe_load(f_content) def _load_compose_app(self): compose_cmd = self.config.get('compose-app', '')