-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue #241 - Add linters and checks to match Core
Add devel dependencies, linters, and check pipeline to match Core. This currently includes black, mypy, flake8, and other pre-commit pipelines.
- Loading branch information
Showing
3 changed files
with
123 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
[build_sphinx] | ||
source-dir = doc/source | ||
build-dir = doc/build | ||
all_files = 1 | ||
|
||
|
||
[tool:pytest] | ||
junit_family=xunit1 | ||
addopts = --cov=ait | ||
filterwarnings = | ||
ignore::DeprecationWarning:ait.core.*: | ||
|
||
[coverage:run] | ||
omit = */_version.py,*/__init__.py,*/bin/*,*/test/* | ||
|
||
[flake8] | ||
extend-exclude = versioneer.py,_version.py,docs,doc,tests,test,setup.py | ||
|
||
# Ignoring: | ||
# E203 prevents flake8 from complaining about whitespace around slice | ||
# components. Black formats per PEP8 and flake8 doesn't like some of | ||
# this. | ||
# | ||
# E501 prevents flake8 from complaining line lengths > 79. We will use | ||
# flake8-bugbear's B950 to handle line length lint errors. This trips | ||
# when a line is > max-line-length + 10%. | ||
# | ||
# E402 prevents flake8 complaining about module level imports not appearing | ||
# at the top of a file. We need to run gevent monkeypatching which triggers | ||
# this on every import where that's the case. | ||
extend-ignore = E203, E501, E402 | ||
|
||
# Selects following test categories: | ||
# D: Docstring errors and warnings | ||
# E, W: PEP8 errors and warnings | ||
# F: PyFlakes codes | ||
# N: PEP8 Naming plugin codes | ||
# B: flake8-bugbear codes | ||
# B***: Specific flake8-bugbear opinionated warnings to trigger | ||
# B902: Invalid first argument used for method. Use self for instance | ||
# methods, and cls for class methods | ||
# B903: Use collections.namedtuple (or typing.NamedTuple) for data classes | ||
# that only set attributes in an __init__ method, and do nothing else. | ||
# B950: Line too long. This is a pragmatic equivalent of pycodestyle's | ||
# E501: it considers "max-line-length" but only triggers when the value | ||
# has been exceeded by more than 10%. | ||
select = E,F,N,W,B,B902,B903,B950 | ||
|
||
|
||
[mypy] | ||
|
||
[mypy-gevent.*] | ||
ignore_missing_imports = True | ||
|
||
[mypy-zmq.*] | ||
ignore_missing_imports = True | ||
|
||
[mypy-bottle.*] | ||
ignore_missing_imports = True | ||
|
||
[mypy-jsonschema.*] | ||
ignore_missing_imports = True | ||
|
||
[mypy-geventwebsocket.*] | ||
ignore_missing_imports = True |