File tree 3 files changed +8
-8
lines changed
3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 8
8
from commitizen import defaults
9
9
from commitizen .config import BaseConfig
10
10
from commitizen .cz .base import BaseCommitizen
11
- from commitizen .exceptions import MissingConfigError
11
+ from commitizen .exceptions import MissingCzCustomizeConfigError
12
12
13
13
__all__ = ["CustomizeCommitsCz" ]
14
14
@@ -21,7 +21,7 @@ def __init__(self, config: BaseConfig):
21
21
super (CustomizeCommitsCz , self ).__init__ (config )
22
22
23
23
if "customize" not in self .config .settings :
24
- raise MissingConfigError ()
24
+ raise MissingCzCustomizeConfigError ()
25
25
self .custom_settings = self .config .settings ["customize" ]
26
26
27
27
custom_bump_pattern = self .custom_settings .get ("bump_pattern" )
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ class ExitCode(enum.IntEnum):
19
19
CUSTOM_ERROR = 12
20
20
NO_COMMAND_FOUND = 13
21
21
INVALID_COMMIT_MSG = 14
22
- MISSING_CONFIG = 15
22
+ MISSING_CZ_CUSTOMIZE_CONFIG = 15
23
23
NO_REVISION = 16
24
24
CURRENT_VERSION_NOT_FOUND = 17
25
25
INVALID_COMMAND_ARGUMENT = 18
@@ -62,8 +62,8 @@ class NotAGitProjectError(CommitizenException):
62
62
message = "fatal: not a git repository (or any of the parent directories): .git"
63
63
64
64
65
- class MissingConfigError (CommitizenException ):
66
- exit_code = ExitCode .MISSING_CONFIG
65
+ class MissingCzCustomizeConfigError (CommitizenException ):
66
+ exit_code = ExitCode .MISSING_CZ_CUSTOMIZE_CONFIG
67
67
message = "fatal: customize is not set in configuration file."
68
68
69
69
Original file line number Diff line number Diff line change 2
2
3
3
from commitizen .config import BaseConfig , TomlConfig
4
4
from commitizen .cz .customize import CustomizeCommitsCz
5
- from commitizen .exceptions import MissingConfigError
5
+ from commitizen .exceptions import MissingCzCustomizeConfigError
6
6
7
7
8
8
@pytest .fixture (scope = "module" )
@@ -39,11 +39,11 @@ def config():
39
39
40
40
41
41
def test_initialize_cz_customize_failed ():
42
- with pytest .raises (MissingConfigError ) as excinfo :
42
+ with pytest .raises (MissingCzCustomizeConfigError ) as excinfo :
43
43
config = BaseConfig ()
44
44
_ = CustomizeCommitsCz (config )
45
45
46
- assert MissingConfigError .message in str (excinfo .value )
46
+ assert MissingCzCustomizeConfigError .message in str (excinfo .value )
47
47
48
48
49
49
def test_bump_pattern (config ):
You can’t perform that action at this time.
0 commit comments