Skip to content

Commit f07c203

Browse files
Add linting config files
1 parent 98312be commit f07c203

File tree

6 files changed

+77
-0
lines changed

6 files changed

+77
-0
lines changed

.editorconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# editorconfig.org
2+
root = true
3+
4+
[*]
5+
indent_style = space
6+
indent_size = 4
7+
end_of_line = lf
8+
charset = utf-8
9+
trim_trailing_whitespace = true
10+
insert_final_newline = true

.flake8

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
[flake8]
2+
max-line-length = 88
3+
max-complexity = 8
4+
exclude =
5+
.git,
6+
.venv,
7+
.tox,
8+
tests
9+
# http://flake8.pycqa.org/en/2.5.5/warnings.html#warning-error-codes
10+
ignore =
11+
# pydocstyle - docstring conventions (PEP257)
12+
D1 # [pydocstyle] missing docstring
13+
D203 # [pydocstyle] 1 blank line required before class docstring
14+
D212 # [pydocstyle] Multi-line docstring summary should start at the first line
15+
D406 # [pydocstyle] Section name should end with a newline
16+
D407 # [pydocstyle] Missing dashed underline after section
17+
D412 # [pydocstyle] No blank lines allowed between a section header and its content
18+
# pycodestyle - style checker (PEP8)
19+
W503 # [pycodestyle] line break before binary operator
20+
W504 # [pycodestyle] line break after binary operator
21+
# bandit - security warnings
22+
S308 # [bandit] Use of mark_safe
23+
S311 # [bandit] Use of random
24+
S703 # [bandit] Use of django_mark_safe

.isort.cfg

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[settings]
2+
default_section=THIRDPARTY
3+
indent=' '
4+
sections=FUTURE,STDLIB,THIRDPARTY,FIRSTPARTY,LOCALFOLDER
5+
multi_line_output=3
6+
line_length=88
7+
include_trailing_comma=True
8+
use_parentheses=True

.prettierrc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"printWidth": 100,
3+
"tabWidth": 4,
4+
"useTabs": false,
5+
"semi": true,
6+
"singleQuote": false,
7+
"trailingComma": "none",
8+
"bracketSpacing": true,
9+
"jsxBracketSameLine": false,
10+
"proseWrap": "always",
11+
"endOfLine": "auto"
12+
}

mypy.ini

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
[mypy]
2+
strict_optional=True
3+
ignore_missing_imports=True
4+
follow_imports=silent
5+
warn_redundant_casts=True
6+
warn_unused_ignores = true
7+
warn_unreachable = true
8+
disallow_untyped_defs = true
9+
disallow_incomplete_defs = true
10+
11+
# Disable mypy for migrations
12+
[mypy-*.migrations.*]
13+
ignore_errors=True
14+
15+
# Disable mypy for settings
16+
[mypy-settings.*]
17+
ignore_errors=True
18+
19+
# Disable mypy for tests
20+
[mypy-package_monitor.tests.*]
21+
ignore_errors=True

pytest.ini

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[pytest]
2+
DJANGO_SETTINGS_MODULE = settings

0 commit comments

Comments
 (0)