Merge "mypy: Add boilerplate configuration"
This commit is contained in:
commit
13f16e23ae
1
.gitignore
vendored
1
.gitignore
vendored
@ -35,6 +35,7 @@ pip-log.txt
|
|||||||
|
|
||||||
# Unit test / coverage reports
|
# Unit test / coverage reports
|
||||||
cover/
|
cover/
|
||||||
|
.mypy_cache/
|
||||||
.coverage*
|
.coverage*
|
||||||
!.coveragerc
|
!.coveragerc
|
||||||
.tox
|
.tox
|
||||||
|
@ -21,6 +21,7 @@ MarkupSafe==1.0
|
|||||||
mccabe==0.2.1
|
mccabe==0.2.1
|
||||||
mock==3.0.0
|
mock==3.0.0
|
||||||
mox3==0.20.0
|
mox3==0.20.0
|
||||||
|
mypy==0.720
|
||||||
netaddr==0.7.18
|
netaddr==0.7.18
|
||||||
openstackdocstheme==1.20.0
|
openstackdocstheme==1.20.0
|
||||||
os-client-config==1.28.0
|
os-client-config==1.28.0
|
||||||
|
11
setup.cfg
11
setup.cfg
@ -34,3 +34,14 @@ oslo.config.opts =
|
|||||||
oslo.config.driver =
|
oslo.config.driver =
|
||||||
remote_file = oslo_config.sources._uri:URIConfigurationSourceDriver
|
remote_file = oslo_config.sources._uri:URIConfigurationSourceDriver
|
||||||
|
|
||||||
|
[mypy]
|
||||||
|
show_column_numbers = true
|
||||||
|
show_error_context = true
|
||||||
|
ignore_missing_imports = true
|
||||||
|
follow_imports = skip
|
||||||
|
incremental = true
|
||||||
|
check_untyped_defs = true
|
||||||
|
warn_unused_ignores = true
|
||||||
|
|
||||||
|
[mypy-oslo_config.tests.*]
|
||||||
|
ignore_errors = true
|
||||||
|
@ -9,6 +9,7 @@ testscenarios>=0.4 # Apache-2.0/BSD
|
|||||||
stestr>=2.1.0 # Apache-2.0
|
stestr>=2.1.0 # Apache-2.0
|
||||||
testtools>=2.2.0 # MIT
|
testtools>=2.2.0 # MIT
|
||||||
oslotest>=3.2.0 # Apache-2.0
|
oslotest>=3.2.0 # Apache-2.0
|
||||||
|
mypy>=0.720 # MIT
|
||||||
|
|
||||||
# oslo.log can't be a runtime dep because it would cause a circular dependency,
|
# oslo.log can't be a runtime dep because it would cause a circular dependency,
|
||||||
# but we can optionally make use of it so we want to have it installed in our
|
# but we can optionally make use of it so we want to have it installed in our
|
||||||
|
21
tox.ini
21
tox.ini
@ -32,8 +32,8 @@ deps =
|
|||||||
[testenv:pep8]
|
[testenv:pep8]
|
||||||
commands =
|
commands =
|
||||||
flake8
|
flake8
|
||||||
# Run security linter
|
# TODO(stephenfin): Add mypy here once it's passing
|
||||||
bandit -r oslo_config -x tests -n5
|
{[testenv:bandit]commands}
|
||||||
|
|
||||||
[testenv:cover]
|
[testenv:cover]
|
||||||
setenv =
|
setenv =
|
||||||
@ -58,13 +58,13 @@ commands =
|
|||||||
rm -fr doc/build
|
rm -fr doc/build
|
||||||
sphinx-build -W --keep-going -b html doc/source doc/build/html {posargs}
|
sphinx-build -W --keep-going -b html doc/source doc/build/html {posargs}
|
||||||
|
|
||||||
[testenv:bandit]
|
[testenv:mypy]
|
||||||
commands = bandit -r oslo_config -x tests -n5
|
commands =
|
||||||
|
mypy oslo_config
|
||||||
|
|
||||||
[flake8]
|
[testenv:bandit]
|
||||||
show-source = True
|
commands =
|
||||||
enable-extensions = H203,H106
|
bandit -r oslo_config -x tests -n5
|
||||||
exclude = .tox,dist,doc,*.egg,build
|
|
||||||
|
|
||||||
[testenv:releasenotes]
|
[testenv:releasenotes]
|
||||||
whitelist_externals =
|
whitelist_externals =
|
||||||
@ -76,3 +76,8 @@ commands =
|
|||||||
|
|
||||||
[hacking]
|
[hacking]
|
||||||
import_exceptions = oslo_config._i18n
|
import_exceptions = oslo_config._i18n
|
||||||
|
|
||||||
|
[flake8]
|
||||||
|
show-source = True
|
||||||
|
enable-extensions = H203,H106
|
||||||
|
exclude = .tox,dist,doc,*.egg,build
|
||||||
|
Loading…
Reference in New Issue
Block a user