Skip to content

Commit 4a457a7

Browse files
authored
Merge pull request #210 from pre-commit/use_types
Use 0.15.0 types
2 parents a831757 + abea6d2 commit 4a457a7

File tree

4 files changed

+250
-160
lines changed

4 files changed

+250
-160
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
- id: requirements-txt-fixer
1414
- id: flake8
1515
- repo: https://github.com/pre-commit/pre-commit
16-
sha: v0.12.2
16+
sha: v0.15.0
1717
hooks:
1818
- id: validate_config
1919
- id: validate_manifest

.pre-commit-hooks.yaml

Lines changed: 81 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,109 +3,153 @@
33
description: "Runs autopep8 over python source. If you configure additional arguments you'll want to at least include -i."
44
entry: autopep8-wrapper
55
language: python
6-
files: \.py$
6+
types: [python]
77
args: [-i]
8+
# for backward compatibility
9+
files: ''
10+
minimum_pre_commit_version: 0.15.0
811
- id: check-added-large-files
912
name: Check for added large files
1013
description: Prevent giant files from being committed
1114
entry: check-added-large-files
1215
language: python
13-
# Match all files
16+
# for backward compatibility
1417
files: ''
18+
minimum_pre_commit_version: 0.15.0
1519
- id: check-ast
1620
name: Check python ast
1721
description: Simply check whether the files parse as valid python.
1822
entry: check-ast
1923
language: python
20-
files: '\.py$'
24+
types: [python]
25+
# for backward compatibility
26+
files: ''
27+
minimum_pre_commit_version: 0.15.0
2128
- id: check-byte-order-marker
2229
name: Check for byte-order marker
2330
description: Forbid files which have a UTF-8 byte-order marker
2431
entry: check-byte-order-marker
2532
language: python
26-
files: '\.py$'
33+
types: [python]
34+
# for backward compatibility
35+
files: ''
36+
minimum_pre_commit_version: 0.15.0
2737
- id: check-case-conflict
2838
name: Check for case conflicts
2939
description: Check for files that would conflict in case-insensitive filesystems
3040
entry: check-case-conflict
3141
language: python
32-
# Match all files
42+
# for backward compatibility
3343
files: ''
44+
minimum_pre_commit_version: 0.15.0
3445
- id: check-docstring-first
3546
name: Check docstring is first
3647
description: Checks a common error of defining a docstring after code.
3748
entry: check-docstring-first
3849
language: python
39-
files: \.py$
50+
types: [python]
51+
# for backward compatibility
52+
files: ''
53+
minimum_pre_commit_version: 0.15.0
4054
- id: check-json
4155
name: Check JSON
4256
description: This hook checks json files for parseable syntax.
4357
entry: check-json
4458
language: python
45-
files: \.json$
59+
types: [json]
60+
# for backward compatibility
61+
files: ''
62+
minimum_pre_commit_version: 0.15.0
4663
- id: pretty-format-json
4764
name: Pretty format JSON
4865
description: This hook sets a standard for formatting JSON files.
4966
entry: pretty-format-json
5067
language: python
51-
files: \.json$
68+
types: [json]
69+
# for backward compatibility
70+
files: ''
71+
minimum_pre_commit_version: 0.15.0
5272
- id: check-merge-conflict
5373
name: Check for merge conflicts
5474
description: Check for files that contain merge conflict strings.
5575
entry: check-merge-conflict
5676
language: python
57-
# Match all files
77+
types: [text]
78+
# for backward compatibility
5879
files: ''
80+
minimum_pre_commit_version: 0.15.0
5981
- id: check-symlinks
6082
name: Check for broken symlinks
6183
description: Checks for symlinks which do not point to anything.
6284
entry: check-symlinks
6385
language: python
64-
# Match all files
65-
files: ''
6686
types: [symlink]
87+
# for backward compatibility
88+
files: ''
89+
minimum_pre_commit_version: 0.15.0
6790
- id: check-xml
6891
name: Check Xml
6992
description: This hook checks xml files for parseable syntax.
7093
entry: check-xml
7194
language: python
72-
files: \.xml$
95+
types: [xml]
96+
# for backward compatibility
97+
files: ''
98+
minimum_pre_commit_version: 0.15.0
7399
- id: check-yaml
74100
name: Check Yaml
75101
description: This hook checks yaml files for parseable syntax.
76102
entry: check-yaml
77103
language: python
78-
files: \.(yaml|yml|eyaml)$
104+
types: [yaml]
105+
# for backward compatibility
106+
files: ''
107+
minimum_pre_commit_version: 0.15.0
79108
- id: debug-statements
80109
name: Debug Statements (Python)
81110
description: This hook checks that debug statements (pdb, ipdb, pudb) are not imported on commit.
82111
entry: debug-statement-hook
83112
language: python
84-
files: \.py$
113+
types: [python]
114+
# for backward compatibility
115+
files: ''
116+
minimum_pre_commit_version: 0.15.0
85117
- id: detect-aws-credentials
86118
name: Detect AWS Credentials
87119
description: Detects *your* aws credentials from the aws cli credentials file
88120
entry: detect-aws-credentials
89121
language: python
122+
types: [text]
123+
# for backward compatibility
90124
files: ''
125+
minimum_pre_commit_version: 0.15.0
91126
- id: detect-private-key
92127
name: Detect Private Key
93128
description: Detects the presence of private keys
94129
entry: detect-private-key
95130
language: python
131+
types: [text]
132+
# for backward compatibility
96133
files: ''
134+
minimum_pre_commit_version: 0.15.0
97135
- id: double-quote-string-fixer
98136
name: Fix double quoted strings
99137
description: This hook replaces double quoted strings with single quoted strings
100138
entry: double-quote-string-fixer
101139
language: python
102-
files: \.py$
140+
types: [python]
141+
# for backward compatibility
142+
files: ''
143+
minimum_pre_commit_version: 0.15.0
103144
- id: end-of-file-fixer
104145
name: Fix End of Files
105146
description: Ensures that a file is either empty, or ends with one newline.
106147
entry: end-of-file-fixer
107148
language: python
108-
files: \.(asciidoc|adoc|coffee|cpp|css|c|ejs|erb|groovy|h|haml|hh|hpp|hxx|html|in|j2|jade|json|js|less|markdown|md|ml|mli|pp|py|rb|rs|R|scala|scss|sh|slim|tex|tmpl|ts|txt|yaml|yml)$
149+
types: [text]
150+
# for backward compatibility
151+
files: ''
152+
minimum_pre_commit_version: 0.15.0
109153
- id: file-contents-sorter
110154
name: File Contents Sorter
111155
description: Sort the lines in specified files (defaults to alphabetical). You must provide list of target files as input in your .pre-commit-config.yaml file.
@@ -117,19 +161,27 @@
117161
language: python
118162
entry: fix-encoding-pragma
119163
description: 'Add # -*- coding: utf-8 -*- to the top of python files'
120-
files: \.py$
164+
types: [python]
165+
# for backward compatibility
166+
files: ''
167+
minimum_pre_commit_version: 0.15.0
121168
- id: flake8
122169
name: Flake8
123170
description: This hook runs flake8.
124171
entry: flake8
125172
language: python
126-
files: \.py$
173+
types: [python]
174+
# for backward compatibility
175+
files: ''
176+
minimum_pre_commit_version: 0.15.0
127177
- id: forbid-new-submodules
128178
name: Forbid new submodules
129179
language: python
130180
entry: forbid-new-submodules
131181
description: Prevent addition of new git submodules
182+
# for backward compatibility
132183
files: ''
184+
minimum_pre_commit_version: 0.15.0
133185
- id: name-tests-test
134186
name: Tests should end in _test.py
135187
description: This verifies that test files are named correctly
@@ -140,14 +192,19 @@
140192
name: "Don't commit to branch"
141193
entry: no-commit-to-branch
142194
language: python
143-
files: .*
144195
always_run: true
196+
# for backward compatibility
197+
files: ''
198+
minimum_pre_commit_version: 0.15.0
145199
- id: pyflakes
146200
name: Pyflakes (DEPRECATED, use flake8)
147201
description: This hook runs pyflakes. (This is deprecated, use flake8).
148202
entry: pyflakes
149203
language: python
150-
files: \.py$
204+
types: [python]
205+
# for backward compatibility
206+
files: ''
207+
minimum_pre_commit_version: 0.15.0
151208
- id: requirements-txt-fixer
152209
name: Fix requirements.txt
153210
description: Sorts entries in requirements.txt
@@ -165,4 +222,7 @@
165222
description: This hook trims trailing whitespace.
166223
entry: trailing-whitespace-fixer
167224
language: python
168-
files: \.(asciidoc|adoc|coffee|cpp|css|c|ejs|erb|groovy|h|haml|hh|hpp|hxx|html|in|j2|jade|json|js|less|markdown|md|ml|mli|pp|py|rb|rs|R|scala|scss|sh|slim|tex|tmpl|ts|txt|yaml|yml)$
225+
types: [text]
226+
# for backward compatibility
227+
files: ''
228+
minimum_pre_commit_version: 0.15.0

0 commit comments

Comments
 (0)