Skip to content

Commit 1ab8f30

Browse files
Restyled by black
1 parent 3705bae commit 1ab8f30

File tree

2 files changed

+22
-58
lines changed

2 files changed

+22
-58
lines changed

minos/cli/templating/processors.py

Lines changed: 17 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,8 @@
1-
from __future__ import (
2-
annotations,
3-
)
1+
from __future__ import annotations
42

53
import logging
6-
from collections.abc import (
7-
Callable,
8-
)
9-
from pathlib import (
10-
Path,
11-
)
4+
from collections.abc import Callable
5+
from pathlib import Path
126
from typing import (
137
Any,
148
Optional,
@@ -17,42 +11,22 @@
1711

1812
import copier
1913
import yaml
20-
from cached_property import (
21-
cached_property,
22-
)
23-
# noinspection PyProtectedMember
24-
from copier.config.factory import (
25-
filter_config,
26-
)
27-
from copier.config.objects import (
28-
EnvOps,
29-
)
30-
from copier.config.user_data import (
31-
load_config_data,
32-
)
14+
from cached_property import cached_property
15+
3316
# noinspection PyProtectedMember
34-
from copier.tools import (
35-
get_jinja_env,
36-
)
37-
from jinja2 import (
38-
Environment,
39-
)
17+
from copier.config.factory import filter_config
18+
from copier.config.objects import EnvOps
19+
from copier.config.user_data import load_config_data
4020

41-
from ..consoles import (
42-
console,
43-
)
44-
from ..importlib import (
45-
FunctionLoader,
46-
)
47-
from ..pathlib import (
48-
get_project_target_directory,
49-
)
50-
from ..wizards import (
51-
Form,
52-
)
53-
from .fetchers import (
54-
TemplateFetcher,
55-
)
21+
# noinspection PyProtectedMember
22+
from copier.tools import get_jinja_env
23+
from jinja2 import Environment
24+
25+
from ..consoles import console
26+
from ..importlib import FunctionLoader
27+
from ..pathlib import get_project_target_directory
28+
from ..wizards import Form
29+
from .fetchers import TemplateFetcher
5630

5731
logger = logging.getLogger(__name__)
5832

tests/test_cli/test_templating/test_processors.py

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,14 @@
11
import unittest
2-
from pathlib import (
3-
Path,
4-
)
5-
from tempfile import (
6-
TemporaryDirectory,
7-
)
2+
from pathlib import Path
3+
from tempfile import TemporaryDirectory
84
from unittest.mock import (
95
PropertyMock,
106
call,
117
patch,
128
)
139

1410
import yaml
15-
from jinja2 import (
16-
Environment,
17-
)
11+
from jinja2 import Environment
1812

1913
from minos.cli import (
2014
Form,
@@ -137,17 +131,13 @@ def test_answers_do_not_override_template_registry_and_version(self):
137131
"template_version": "wrong_version",
138132
}
139133
yaml.dump(
140-
answers_with_wrong_version,
141-
file,
134+
answers_with_wrong_version, file,
142135
)
143136

144137
microservice_destination = project_destination / "microservices" / "foo"
145138
microservice_destination.mkdir(parents=True)
146139

147-
processor = TemplateProcessor.from_fetcher(
148-
self.fetcher,
149-
microservice_destination,
150-
)
140+
processor = TemplateProcessor.from_fetcher(self.fetcher, microservice_destination,)
151141

152142
with patch("minos.cli.Form.ask", return_value=expected_answers) as mock:
153143
self.assertEqual(expected_answers, processor.answers)

0 commit comments

Comments
 (0)