Skip to content

Commit 3b54c62

Browse files
committed
[CI] Add three pre-commit pygrep hooks
https://github.com/pre-commit/pygrep-hooks Official hooks from pre-commit some more basic checks or tests we can run
1 parent 7eea9ed commit 3b54c62

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

.pre-commit-config.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,19 @@ repos:
165165
files: ^(LICENSE|NOTICE)$|\.(bat|cfg|cs|css|gitignore|header|in|install|java|md|properties|py|rb|rc|sh|sql|te|template|txt|ucls|vue|xml|xsl|yaml|yml)$|^cloud-cli/bindir/cloud-tool$|^debian/changelog$
166166
args: [--markdown-linebreak-ext=md]
167167
exclude: ^services/console-proxy/rdpconsole/src/test/doc/freerdp-debug-log\.txt$
168+
- repo: https://github.com/pre-commit/pygrep-hooks
169+
rev: v1.10.0
170+
hooks:
171+
- id: python-check-mock-methods
172+
name: run check for not-real mock methods
173+
description: Prevent common mistakes of assert mck.not_called(), assert mck.called_once_with(...) and mck.assert_called
174+
- id: python-use-type-annotations
175+
name: run check for type annotations not comments
176+
description: Enforce that python3.6+ type annotations are used instead of type comments
177+
exclude: ^scripts/vm/hypervisor/xenserver/xenserver56/InterfaceReconfigure\.py$
178+
- id: text-unicode-replacement-char
179+
name: run check for no unicode replacement char
180+
description: Forbid files which have a UTF-8 Unicode replacement character
168181
- repo: https://github.com/codespell-project/codespell
169182
rev: v2.4.1
170183
hooks:

0 commit comments

Comments
 (0)