Skip to content

Commit 8c08796

Browse files
committed
update pre-commit versions, fix linting errors
1 parent 0f49c0c commit 8c08796

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

.pre-commit-config.yaml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/PyCQA/flake8
3-
rev: 5.0.4
3+
rev: 7.1.1
44
hooks:
55
- id: flake8
66
- repo: https://github.com/PyCQA/isort
@@ -12,7 +12,7 @@ repos:
1212
hooks:
1313
- id: yapf
1414
- repo: https://github.com/pre-commit/pre-commit-hooks
15-
rev: v4.3.0
15+
rev: v5.0.0
1616
hooks:
1717
- id: trailing-whitespace
1818
- id: check-yaml
@@ -25,9 +25,10 @@ repos:
2525
- id: mixed-line-ending
2626
args: ["--fix=lf"]
2727
- repo: https://github.com/codespell-project/codespell
28-
rev: v2.2.1
28+
rev: v2.4.1
2929
hooks:
3030
- id: codespell
31+
args: ["--ignore-words-list=THIRDPARTY"]
3132
- repo: https://github.com/executablebooks/mdformat
3233
rev: 0.7.9
3334
hooks:
@@ -38,12 +39,12 @@ repos:
3839
- mdformat_frontmatter
3940
- linkify-it-py
4041
- repo: https://github.com/myint/docformatter
41-
rev: v1.3.1
42+
rev: v1.7.7
4243
hooks:
4344
- id: docformatter
4445
args: ["--in-place", "--wrap-descriptions", "79"]
4546
- repo: https://github.com/asottile/pyupgrade
46-
rev: v2.32.1
47+
rev: v3.0.0
4748
hooks:
4849
- id: pyupgrade
4950
args: ["--py36-plus"]

.pre-commit-hooks.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
entry: say-hello
1010
require_serial: true
1111
pass_filenames: false
12-
args: ['OpenMMLab']
12+
args: ['VBTI']
1313

1414
- id: check-algo-readme
1515
name: check algorithm readme

pre_commit_hooks/remove_eol_characters.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ def remove_eol() -> Tuple[str, str]:
1111
characters = r'\u4e00-\u9fff'
1212
# Unicode halfwidth and fullwidth forms, refer to
1313
# https://en.wikipedia.org/wiki/Halfwidth_and_Fullwidth_Forms_(Unicode_block)
14-
punctuations = r'\uff01-\uff9f'
14+
punctuation = r'\uff01-\uff9f'
1515
# Find natural Chinese paragraphs that are split by end_of_line characters.
16-
# The pattern is: Chinese characters/punctuations with one and only one
16+
# The pattern is: Chinese characters/punctuation with one and only one
1717
# end_of_line in between.
18-
pattern = fr'([{characters}{punctuations}]){eol_character}([{characters}])'
18+
pattern = fr'([{characters}{punctuation}]){eol_character}([{characters}])'
1919
# This replacement will remove the end_of_line character in between
2020
repl = r'\1\2'
2121
return pattern, repl

0 commit comments

Comments
 (0)