File tree Expand file tree Collapse file tree 3 files changed +74
-1
lines changed Expand file tree Collapse file tree 3 files changed +74
-1
lines changed Original file line number Diff line number Diff line change
1
+ name : Code Style Check
2
+
3
+ on :
4
+ pull_request :
5
+ push :
6
+ branches : ['main', 'release/*']
7
+
8
+ jobs :
9
+ check-code-style :
10
+ runs-on : ubuntu-latest
11
+ steps :
12
+ - uses : actions/checkout@v4
13
+ with :
14
+ ref : ${{ github.ref }}
15
+ - uses : actions/setup-python@v5
16
+ with :
17
+ python-version : ' 3.10'
18
+ # Install Dependencies for Python
19
+ - name : Install Dependencies for Python
20
+ run : |
21
+ python -m pip install --upgrade pip
22
+ pip install "clang-format==13.0.0"
23
+ -
uses :
pre-commit/[email protected]
Original file line number Diff line number Diff line change
1
+ repos :
2
+ - repo : https://github.com/pre-commit/pre-commit-hooks
3
+ rev : a11d9314b22d8f8c7556443875b731ef05965464
4
+ hooks :
5
+ - id : check-merge-conflict
6
+ - id : check-symlinks
7
+ - id : detect-private-key
8
+ files : (?!.*paddle)^.*$
9
+ - id : end-of-file-fixer
10
+ files : \.md$
11
+ - id : trailing-whitespace
12
+ files : \.md$
13
+ - repo : https://github.com/Lucas-C/pre-commit-hooks
14
+ rev : v1.0.1
15
+ hooks :
16
+ - id : forbid-crlf
17
+ files : \.md$
18
+ - id : remove-crlf
19
+ files : \.md$
20
+ - id : forbid-tabs
21
+ files : \.md$
22
+ - id : remove-tabs
23
+ files : \.md$
24
+ - repo : local
25
+ hooks :
26
+ - id : clang-format
27
+ name : clang-format
28
+ description : Format files with ClangFormat
29
+ entry : bash .clang_format.hook -i
30
+ language : system
31
+ files : \.(c|cc|cxx|cpp|cu|h|hpp|hxx|cuh|proto)$
32
+ # For Python files
33
+ - repo : https://github.com/psf/black.git
34
+ rev : 23.3.0
35
+ hooks :
36
+ - id : black
37
+ files : (.*\.(py|pyi|bzl)|BUILD|.*\.BUILD|WORKSPACE)$
38
+
39
+ # Flake8
40
+ - repo : https://github.com/pycqa/flake8
41
+ rev : 7.0.0
42
+ hooks :
43
+ - id : flake8
44
+ args :
45
+ - --count
46
+ - --select=E9,F63,F7,F82
47
+ - --show-source
48
+ - --statistics
49
+ exclude : ^benchmark/|^test_tipc/
50
+
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ def ustr(x):
25
25
if type (x ) == QString :
26
26
# https://blog.csdn.net/friendan/article/details/51088476
27
27
# https://blog.csdn.net/xxm524/article/details/74937308
28
- return unicode (x .toUtf8 (), DEFAULT_ENCODING , "ignore" )
28
+ return unicode (x .toUtf8 (), DEFAULT_ENCODING , "ignore" ) # noqa
29
29
return x
30
30
else :
31
31
return x
You can’t perform that action at this time.
0 commit comments