Add flake8, mypy and isort setup
This commit is contained in:
parent
eed2cc4818
commit
b170997cdb
16
.flake8
Normal file
16
.flake8
Normal file
|
@ -0,0 +1,16 @@
|
|||
# vim: ft=dosini
|
||||
# https://flake8.pycqa.org/en/latest/user/configuration.html
|
||||
|
||||
[flake8]
|
||||
# E131: continuation line unaligned for hanging indent
|
||||
# E301: when method is after a commented line + one blank line
|
||||
# E302: expected 2 blank lines, found 1 when using @dataclass
|
||||
# E303: more than one blank line between methods
|
||||
# W504: when line breaks occur after a binary operator
|
||||
# A003: when class attribute name is the same as a builtin
|
||||
# E402: when a module import isn't at the start of the file
|
||||
ignore = E131, E221, E241, E251, E301, E302, E303, W504, A003, E402
|
||||
|
||||
max-complexity = 99
|
||||
inline-quotes = "
|
||||
format = ${cyan}%(path)s${reset}:${yellow_bold}%(row)d${reset}:${green_bold}%(col)d${reset}: ${red_bold}%(code)s${reset} %(text)s
|
5
.isort.cfg
Normal file
5
.isort.cfg
Normal file
|
@ -0,0 +1,5 @@
|
|||
# https://pycqa.github.io/isort/docs/configuration/options/
|
||||
|
||||
[settings]
|
||||
multi_line_output = 5
|
||||
include_trailing_comma = True
|
10
.mypy.ini
Normal file
10
.mypy.ini
Normal file
|
@ -0,0 +1,10 @@
|
|||
# https://mypy.readthedocs.io/en/stable/config_file.html
|
||||
|
||||
[mypy]
|
||||
cache_dir = ~/.cache/mypy
|
||||
ignore_missing_imports = True
|
||||
follow_imports = silent
|
||||
warn_redundant_casts = True
|
||||
warn_unused_ignores = True
|
||||
warn_unreachable = True
|
||||
pretty = True
|
|
@ -2,4 +2,16 @@ remote_pdb >= 2.0.0, < 3
|
|||
pdbpp >= 0.10.2, < 0.11
|
||||
pprintpp >= 0.4.0, < 0.5
|
||||
|
||||
isort >= 5.6.4, < 6
|
||||
mypy >= 0.790, < 0.800
|
||||
flake8 >= 3.8.4, < 4
|
||||
flake8-bugbear >= 20.1.4, < 21
|
||||
flake8-commas >= 2.0.0, < 3
|
||||
flake8-comprehensions >= 3.3.0, < 4
|
||||
flake8-executable >= 2.0.4, < 3
|
||||
flake8-logging-format >= 0.6.0, < 0.7
|
||||
flake8-pie >= 0.6.1, < 0.7
|
||||
flake8-quotes >= 3.2.0, < 4
|
||||
flake8-colors >= 0.1.6, < 0.2
|
||||
|
||||
git+http://github.com/mirukana/matrix-nio#egg=matrix-nio[e2e]
|
||||
|
|
Loading…
Reference in New Issue
Block a user