File tree Expand file tree Collapse file tree 6 files changed +41
-28
lines changed Expand file tree Collapse file tree 6 files changed +41
-28
lines changed Original file line number Diff line number Diff line change 1
1
- id : autopep8-wrapper
2
2
name : autopep8 wrapper
3
3
description : This is deprecated, use pre-commit/mirrors-autopep8 instead.
4
- entry : autopep8-wrapper
4
+ entry : pre-commit-hooks-removed autopep8-wrapper autopep8 https://github.com/pre-commit/mirrors-autopep8
5
5
language : python
6
- types : [python]
7
- args : [-i]
6
+ always_run : true
7
+ pass_filenames : false
8
8
- id : check-added-large-files
9
9
name : Check for added large files
10
10
description : Prevent giant files from being committed
140
140
- id : flake8
141
141
name : Flake8 (deprecated, use gitlab.com/pycqa/flake8)
142
142
description : This hook runs flake8. (deprecated, use gitlab.com/pycqa/flake8)
143
- entry : flake8
143
+ entry : pre-commit-hooks-removed flake8 flake8 https://gitlab.com/pycqa/ flake8
144
144
language : python
145
- types : [python]
146
- require_serial : true
145
+ always_run : true
146
+ pass_filenames : false
147
147
- id : forbid-new-submodules
148
148
name : Forbid new submodules
149
149
language : python
170
170
- id : pyflakes
171
171
name : Pyflakes (DEPRECATED, use flake8)
172
172
description : This hook runs pyflakes. (This is deprecated, use flake8).
173
- entry : pyflakes
173
+ entry : pre-commit-hooks-removed pyflakes flake8 https://gitlab.com/pycqa/flake8
174
174
language : python
175
- types : [python]
175
+ always_run : true
176
+ pass_filenames : false
176
177
- id : requirements-txt-fixer
177
178
name : Fix requirements.txt
178
179
description : Sorts entries in requirements.txt
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ import sys
2
+ from typing import Optional
3
+ from typing import Sequence
4
+
5
+
6
+ def main (argv : Optional [Sequence [str ]] = None ) -> int :
7
+ argv = argv if argv is not None else sys .argv [1 :]
8
+ hookid , new_hookid , url = argv
9
+ raise SystemExit (
10
+ f'`{ hookid } ` has been removed -- use `{ new_hookid } ` from { url } ' ,
11
+ )
12
+
13
+
14
+ if __name__ == '__main__' :
15
+ exit (main ())
Original file line number Diff line number Diff line change @@ -29,7 +29,6 @@ python_requires = >=3.6.1
29
29
30
30
[options.entry_points]
31
31
console_scripts =
32
- autopep8-wrapper = pre_commit_hooks.autopep8_wrapper:main
33
32
check-added-large-files = pre_commit_hooks.check_added_large_files:main
34
33
check-ast = pre_commit_hooks.check_ast:main
35
34
check-builtin-literals = pre_commit_hooks.check_builtin_literals:main
@@ -55,6 +54,7 @@ console_scripts =
55
54
mixed-line-ending = pre_commit_hooks.mixed_line_ending:main
56
55
name-tests-test = pre_commit_hooks.tests_should_end_in_test:main
57
56
no-commit-to-branch = pre_commit_hooks.no_commit_to_branch:main
57
+ pre-commit-hooks-removed = pre_commit_hooks.removed:main
58
58
pretty-format-json = pre_commit_hooks.pretty_format_json:main
59
59
requirements-txt-fixer = pre_commit_hooks.requirements_txt_fixer:main
60
60
sort-simple-yaml = pre_commit_hooks.sort_simple_yaml:main
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ import pytest
2
+
3
+ from pre_commit_hooks .removed import main
4
+
5
+
6
+ def test_always_fails ():
7
+ with pytest .raises (SystemExit ) as excinfo :
8
+ main ((
9
+ 'autopep8-wrapper' , 'autopep8' ,
10
+ 'https://github.com/pre-commit/mirrors-autopep8' ,
11
+ ))
12
+ msg , = excinfo .value .args
13
+ assert msg == (
14
+ '`autopep8-wrapper` has been removed -- '
15
+ 'use `autopep8` from https://github.com/pre-commit/mirrors-autopep8'
16
+ )
You can’t perform that action at this time.
0 commit comments