Skip to content

Commit 84a2118

Browse files
committed
style(config): remove unused variables
1 parent 225a8c2 commit 84a2118

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

commitizen/commands/check.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
from commitizen import factory, out
55
from commitizen.config import BaseConfig
6-
from commitizen.error_codes import NO_COMMIT_MSG, INVALID_COMMIT_MSG
6+
from commitizen.error_codes import INVALID_COMMIT_MSG
77

88

99
class Check:

tests/test_conf.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,14 @@ def test_set_key(configure_supported_files, config_files_manager):
133133
def test_find_git_project_root(tmpdir):
134134
assert git.find_git_project_root() == Path(os.getcwd())
135135

136-
with tmpdir.as_cwd() as tmp_cwd:
137-
assert git.find_git_project_root() == None
136+
with tmpdir.as_cwd() as _:
137+
assert git.find_git_project_root() is None
138+
139+
140+
def test_read_cfg_when_not_in_a_git_project(tmpdir):
141+
with tmpdir.as_cwd() as _:
142+
with pytest.raises(SystemExit):
143+
config.read_cfg()
138144

139145

140146
class TestTomlConfig:

0 commit comments

Comments
 (0)