Skip to content

Commit 56bf3b4

Browse files
committed
remove warning on --no-allow-missing-config
1 parent 4df40b0 commit 56bf3b4

2 files changed

Lines changed: 2 additions & 11 deletions

File tree

pre_commit/commands/init_templatedir.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,6 @@ def init_templatedir(
1717
hook_types: Sequence[str],
1818
skip_on_missing_config: bool = True,
1919
) -> int:
20-
if not skip_on_missing_config:
21-
logger.warning(
22-
'Missing pre-commit configs will NOT be allowed in newly cloned '
23-
'repositories by default',
24-
)
25-
2620
install(
2721
config_file,
2822
store,

tests/commands/init_templatedir_test.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,8 @@ def test_init_templatedir_skip_on_missing_config(
123123
)
124124

125125
lines = cap_out.get().splitlines()
126-
printed_no_skip_warning = any(
127-
'Missing pre-commit configs will NOT be allowed' in line
128-
for line in lines
129-
)
130-
assert printed_no_skip_warning == (not skip)
126+
assert len(lines) == 1
127+
assert lines[0].startswith('pre-commit installed at')
131128

132129
with envcontext((('GIT_TEMPLATE_DIR', target),)):
133130
verify_git_dir = git_dir(tempdir_factory)

0 commit comments

Comments
 (0)