Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fccb4e6

Browse files
committed
Minor fixes
1 parent 70e7d9c commit fccb4e6

2 files changed

Lines changed: 4 additions & 6 deletions

File tree

pre_commit/main.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -168,10 +168,7 @@ def main(argv=None):
168168
),
169169
)
170170
autoupdate_parser.add_argument(
171-
'--repo', nargs=1, default=None,
172-
help=(
173-
'Repository to update the hooks of.'
174-
),
171+
'--repo', help='Only update this repository.',
175172
)
176173

177174
migrate_config_parser = subparsers.add_parser(

tests/commands/autoupdate_test.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ def test_autoupdate_out_of_date_repo(
123123
assert 'exclude' not in after
124124
assert out_of_date_repo.head_sha in after
125125

126+
126127
def test_autoupdate_out_of_date_repo_with_correct_repo_name(
127128
out_of_date_repo, in_tmpdir, mock_out_store_directory,
128129
):
@@ -139,10 +140,9 @@ def test_autoupdate_out_of_date_repo_with_correct_repo_name(
139140
after = open(C.CONFIG_FILE).read()
140141
assert ret == 0
141142
assert before != after
142-
# Make sure we don't add defaults
143-
assert 'exclude' not in after
144143
assert out_of_date_repo.head_sha in after
145144

145+
146146
def test_autoupdate_out_of_date_repo_with_wrong_repo_name(
147147
out_of_date_repo, in_tmpdir, mock_out_store_directory,
148148
):
@@ -160,6 +160,7 @@ def test_autoupdate_out_of_date_repo_with_wrong_repo_name(
160160
assert ret == 0
161161
assert before == after
162162

163+
163164
def test_does_not_reformat(
164165
out_of_date_repo, mock_out_store_directory, in_tmpdir,
165166
):

0 commit comments

Comments
 (0)