Skip to content

Commit a7a9619

Browse files
committed
(SIO-2399) Update static analysis config files
Adds new configs for black and isort and updates configs for pep8 and pylint. Adds .git-blame-ignore-revs file that containts ref numbers of commits that should be ignored by git blame. It may be necessary to run git config blame.ignoreRevsFile .git-blame-ignore-revs for git to always respect this config when running blame. Change-Id: I9645a2d9a8772e92bf99ce9fbaa6a98a0c94b422
1 parent 66a495e commit a7a9619

File tree

4 files changed

+35
-3
lines changed

4 files changed

+35
-3
lines changed

.git-blame-ignore-revs

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Black & isort bulk reformat
2+
66a495ecfe1d90bc75745101d883742df64711ec

.pep8rc

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@
1010
# E226 - missing whitespace around arithmetic operator
1111
# E501 - line too long (checked by pylint)
1212
# E731 - do not assign a lambda expression, use a def
13+
# E203 whitespace before ':'
1314

1415
# W503 - line break before binary operator
1516

16-
ignore=E121,E122,E123,E126,E127,E128,E131,E133,E226,E501,E731,W503
17+
ignore=E121,E122,E123,E126,E127,E128,E131,E133,E226,E501,E731,W503,E203
1718
exclude=migrations,oioioi/default_settings.py

.pylintrc

+3-2
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,14 @@ ignore=migrations
4343
# C0111 = Missing docstring
4444
# C0302 = Too many lines in module
4545
# C0330 = Wrong continued indentation
46+
# C0326 = Exactly one space required before | No space allowed before
4647

4748
# I0011 = Local disables
4849
# I0013 = Ignoring entire file
4950

5051
# similarities = similar code fragments
5152

52-
disable=F0401, E1002,E1101,E1120,E1121,E1123, W0142,W0212,W0232,W0613,W0622,W0614, R0201,R0901,R0902,R0903,R0904,R0911,R0912,R0913,R0915,R0921,R0922,R1705,C0103,C0111,C0302,C0330, I0011,I0013, similarities
53+
disable=F0401, E1002,E1101,E1120,E1121,E1123, W0142,W0212,W0232,W0613,W0622,W0614, R0201,R0901,R0902,R0903,R0904,R0911,R0912,R0913,R0915,R0921,R0922,R1705,C0103,C0111,C0302,C0330,C0326, I0011,I0013, similarities
5354

5455
[REPORTS]
5556

@@ -85,7 +86,7 @@ notes=FIXME,TODO
8586

8687
[FORMAT]
8788

88-
max-line-length=120
89+
max-line-length=88
8990
max-module-lines=1000
9091
indent-string=' '
9192

pyproject.toml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
[tool.isort]
2+
profile = 'black'
3+
skip_glob = '*/migrations/*.py'
4+
skip = 'default_settings.py'
5+
6+
[tool.black]
7+
line-length = 88
8+
skip-string-normalization = true
9+
verbose = false
10+
diff = false
11+
target-version = ['py27']
12+
include = '\.pyi?$'
13+
exclude = '''
14+
/(
15+
\.git
16+
| \.hg
17+
| \.eggs
18+
| \.mypy_cache
19+
| \.tox
20+
| \.venv
21+
| _build
22+
| buck-out
23+
| build
24+
| dist
25+
| migrations
26+
)/
27+
'''
28+
force-exclude = '(.*)?default_settings.py'

0 commit comments

Comments
 (0)