|
| 1 | +# Tox (http://tox.testrun.org/) is a tool for running tests |
| 2 | +# in multiple virtualenvs. This configuration file will run the |
| 3 | +# test suite on all supported python versions. To use it, "pip install tox" |
| 4 | +# and then run "tox" from this directory. |
| 5 | + |
| 6 | +[tox] |
| 7 | +isolated_build = true |
| 8 | +envlist = |
| 9 | + lint |
| 10 | + flake8 |
| 11 | + |
| 12 | +[testenv:lint] |
| 13 | +deps = |
| 14 | + black |
| 15 | + isort |
| 16 | +skip_install = true |
| 17 | +commands = |
| 18 | + black . |
| 19 | + isort . |
| 20 | +description = Run linters. |
| 21 | + |
| 22 | +[testenv:flake8] |
| 23 | +skip_install = true |
| 24 | +deps = |
| 25 | + flake8<5.0.0 |
| 26 | + flake8-bandit |
| 27 | + flake8-black |
| 28 | + flake8-bugbear |
| 29 | + flake8-colors |
| 30 | + flake8-isort |
| 31 | + pep8-naming |
| 32 | +commands = |
| 33 | + flake8 src/ tests/ |
| 34 | +description = Run the flake8 tool with several plugins (bandit, docstrings, import order, pep8 naming). |
| 35 | + |
| 36 | +######################### |
| 37 | +# Flake8 Configuration # |
| 38 | +# (.flake8) # |
| 39 | +######################### |
| 40 | +[flake8] |
| 41 | +ignore = |
| 42 | + E203 |
| 43 | + W503 |
| 44 | + C901 # needs code change so ignoring for now. |
| 45 | + E731 # needs code change so ignoring for now. |
| 46 | + S101 # asserts are fine |
| 47 | + S106 # flags false positives with test_table_filler |
| 48 | + N801 # mixed case is bad but there's a lot of auto-generated code |
| 49 | + N815 # same ^ |
| 50 | + S404 # Consider possible security implications associated with the subprocess module. |
| 51 | + S108 # Probable insecure usage of temp file/directory. |
| 52 | + S307 # Use of possibly insecure function - consider using safer ast.literal_eval. |
| 53 | + S603 # subprocess call - check for execution of untrusted input. |
| 54 | + S607 # Starting a process with a partial executable path ["open" in both cases] |
| 55 | + S608 # Possible SQL injection vector through string-based query construction. |
| 56 | + B024 # StreamingWriter is an abstract base class, but it has no abstract methods. |
| 57 | + # Remember to use @abstractmethod, @abstractclassmethod and/or @abstractproperty decorators. |
| 58 | +max-line-length = 120 |
| 59 | +max-complexity = 13 |
| 60 | +import-order-style = pycharm |
| 61 | +application-import-names = |
| 62 | + oaklib |
| 63 | + tests |
| 64 | +exclude = |
| 65 | + datamodels ## datamodels are auto-generated |
| 66 | + sqla |
0 commit comments