* add pyre
This commit is contained in:
Michel Oosterhof 2021-04-13 21:55:23 +08:00 committed by GitHub
parent 43f1279178
commit 2b818ec1ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 51 additions and 1 deletions

View File

@ -47,6 +47,16 @@ jobs:
command: |
. cowrie-env/bin/activate
twistedchecker src || true
- run:
name: PyType
command: |
. cowrie-env/bin/activate
pytype src || true
- run:
name: PyType
command: |
. cowrie-env/bin/activate
pyre analyze || true
- run:
name: Build Python library
command: |

2
.gitignore vendored
View File

@ -14,6 +14,8 @@ log/
.eggs/
.envrc
.direnv/
.pyre/
.pytype/
__pycache__/
*.py[cod]
*env/

View File

@ -26,3 +26,8 @@ repos:
- id: check-merge-conflict
- id: check-yaml
- id: mixed-line-ending
- repo: https://github.com/mattseymour/pre-commit-pytype
rev: '2021.4.9'
hooks:
- id: pytype

5
.pyre_configuration Normal file
View File

@ -0,0 +1,5 @@
{
"source_directories": [
"src"
]
}

View File

@ -22,6 +22,8 @@ before_script:
- flake8 --ignore E203,E501,W503 --count --application-import-names cowrie --statistics .
- mypy src
- twistedchecker src || true
- pytype || true
- pyre analyze || true
- python setup.py build sdist bdist
- make -C docs html
script:

View File

@ -8,6 +8,8 @@ mypy==0.812
pipdeptree==2.0.0
pre-commit==2.12.0
pur==5.4.0
pyre-check==0.9.0
pytype==2021.4.9
pyupgrade==2.12.0
setuptools==56.0.0
sphinx_rtd_theme==0.5.2

4
setup.cfg Normal file
View File

@ -0,0 +1,4 @@
[pytype]
inputs = src/cowrie
keep_going = True

22
tox.ini
View File

@ -1,6 +1,6 @@
[tox]
skipsdist = True
envlist = lint,docs,py36,py37,py38,py39,py310,mypy
envlist = lint,docs,py36,py37,py38,py39,py310,mypy,pytype,pyre
deps = -r{toxinidir}/requirements.txt
skip_missing_interpreters=True
@ -57,3 +57,23 @@ commands =
--config-file="{toxinidir}/mypy.ini" \
{tty:--pretty:} \
{posargs:src}
[testenv:pytype]
description = run Pytype (static type checker)
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/requirements-dev.txt
commands =
pytype
[testenv:pyre]
description = run Pyre (static type checker)
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/requirements-dev.txt
commands =
pyre analyze