Skip to content

Commit 2a9bc76

Browse files
authored
Merge pull request #1034 from pre-commit/remove-fix-encoding-pragma
Remove `check-byte-order-marker` and `fix-encoding-pragma`
2 parents 5c514f8 + 5920aee commit 2a9bc76

File tree

7 files changed

+7
-372
lines changed

7 files changed

+7
-372
lines changed

.pre-commit-hooks.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
language: python
1313
types: [python]
1414
- id: check-byte-order-marker
15-
name: 'check BOM - deprecated: use fix-byte-order-marker'
16-
description: forbids files which have a utf-8 byte-order marker.
17-
entry: check-byte-order-marker
15+
name: check-byte-order-marker (removed)
16+
description: (removed) use fix-byte-order-marker instead.
17+
entry: pre-commit-hooks-removed check-byte-order-marker fix-byte-order-marker https://github.com/pre-commit/pre-commit-hooks
1818
language: python
1919
types: [text]
2020
- id: check-builtin-literals
@@ -155,10 +155,10 @@
155155
language: python
156156
types: [text]
157157
- id: fix-encoding-pragma
158-
name: fix python encoding pragma (deprecated)
159-
description: 'adds # -*- coding: utf-8 -*- to the top of python files.'
158+
name: fix python encoding pragma (removed)
159+
description: (removed) use pyupgrade instead.
160+
entry: pre-commit-hooks-removed fix-encoding-pragma pyupgrade https://github.com/asottile/pyupgrade
160161
language: python
161-
entry: fix-encoding-pragma
162162
types: [python]
163163
- id: forbid-new-submodules
164164
name: forbid new submodules

README.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -129,13 +129,6 @@ The following arguments are available:
129129
#### `fix-byte-order-marker`
130130
removes UTF-8 byte order marker
131131

132-
#### `fix-encoding-pragma`
133-
134-
_Deprecated since py2 is EOL - use [pyupgrade](https://github.com/asottile/pyupgrade) instead._
135-
136-
Add `# -*- coding: utf-8 -*-` to the top of python files.
137-
- To remove the coding pragma pass `--remove` (useful in a python3-only codebase)
138-
139132
#### `forbid-new-submodules`
140133
Prevent addition of new git submodules.
141134

@@ -213,6 +206,7 @@ Trims trailing whitespace.
213206
### Deprecated / replaced hooks
214207

215208
- `check-byte-order-marker`: instead use fix-byte-order-marker
209+
- `fix-encoding-pragma`: instead use [`pyupgrade`](https://github.com/asottile/pyupgrade)
216210

217211
### As a standalone package
218212

pre_commit_hooks/check_byte_order_marker.py

Lines changed: 0 additions & 24 deletions
This file was deleted.

pre_commit_hooks/fix_encoding_pragma.py

Lines changed: 0 additions & 157 deletions
This file was deleted.

setup.cfg

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ console_scripts =
3232
check-added-large-files = pre_commit_hooks.check_added_large_files:main
3333
check-ast = pre_commit_hooks.check_ast:main
3434
check-builtin-literals = pre_commit_hooks.check_builtin_literals:main
35-
check-byte-order-marker = pre_commit_hooks.check_byte_order_marker:main
3635
check-case-conflict = pre_commit_hooks.check_case_conflict:main
3736
check-docstring-first = pre_commit_hooks.check_docstring_first:main
3837
check-executables-have-shebangs = pre_commit_hooks.check_executables_have_shebangs:main
@@ -52,7 +51,6 @@ console_scripts =
5251
end-of-file-fixer = pre_commit_hooks.end_of_file_fixer:main
5352
file-contents-sorter = pre_commit_hooks.file_contents_sorter:main
5453
fix-byte-order-marker = pre_commit_hooks.fix_byte_order_marker:main
55-
fix-encoding-pragma = pre_commit_hooks.fix_encoding_pragma:main
5654
forbid-new-submodules = pre_commit_hooks.forbid_new_submodules:main
5755
mixed-line-ending = pre_commit_hooks.mixed_line_ending:main
5856
name-tests-test = pre_commit_hooks.tests_should_end_in_test:main

tests/check_byte_order_marker_test.py

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)