Skip to content

Commit be14a32

Browse files
bearomorphismLee-W
authored andcommitted
refactor(BaseCommitizen): construct Style object directly to get rid of potential type error
1 parent b76301d commit be14a32

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

commitizen/cz/base.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from typing import Any, Callable, Protocol
66

77
from jinja2 import BaseLoader, PackageLoader
8-
from prompt_toolkit.styles import Style, merge_styles
8+
from prompt_toolkit.styles import Style
99

1010
from commitizen import git
1111
from commitizen.config.base_config import BaseConfig
@@ -77,12 +77,12 @@ def message(self, answers: Mapping[str, Any]) -> str:
7777

7878
@property
7979
def style(self) -> Style:
80-
return merge_styles(
80+
return Style(
8181
[
82-
Style(BaseCommitizen.default_style_config),
83-
Style(self.config.settings["style"]),
82+
*BaseCommitizen.default_style_config,
83+
*self.config.settings["style"],
8484
]
85-
) # type: ignore[return-value]
85+
)
8686

8787
def example(self) -> str:
8888
"""Example of the commit message."""

0 commit comments

Comments
 (0)