tox.ini 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. [tox]
  2. envlist = flake8,py310,bandit
  3. [testenv]
  4. deps =
  5. coverage
  6. pytest
  7. pytest-cov
  8. pycodestyle>=2.0
  9. commands =
  10. coverage erase
  11. pip install -r {toxinidir}/requirements.txt
  12. pytest --cov=tests --cov=hfapi --cov-report=term-missing --cov-config=setup.cfg
  13. coverage report
  14. coverage html -d htmlcov-{envname}
  15. [testenv:autopep8]
  16. basepython = python3
  17. skip_install = true
  18. deps =
  19. autopep8>=1.5
  20. commands =
  21. autopep8 --in-place --aggressive -r hfapi/
  22. [testenv:flake8]
  23. basepython = python3
  24. skip_install = true
  25. deps =
  26. flake8
  27. flake8-bugbear
  28. flake8-colors
  29. flake8-typing-imports>=1.1
  30. pep8-naming
  31. commands =
  32. flake8 hfapi/ tests/ setup.py
  33. [testenv:bandit]
  34. basepython = python3
  35. deps =
  36. bandit
  37. commands =
  38. bandit -r hfapi/
  39. [flake8]
  40. exclude =
  41. .tox,
  42. .git,
  43. __pycache__,
  44. docs/source/conf.py,
  45. build,
  46. dist,
  47. tests/fixtures/*,
  48. *.pyc,
  49. *.egg-info,
  50. .cache,
  51. .eggs
  52. max-complexity = 10
  53. import-order-style = google
  54. application-import-names = flake8
  55. max-line-length = 120
  56. ignore =
  57. B008,
  58. N803,
  59. N806,
  60. E126