From 8ad39e70d0c5e0189040c02135b3e5eda36b4ece Mon Sep 17 00:00:00 2001 From: lvmingfu Date: Mon, 11 Oct 2021 10:52:35 +0800 Subject: [PATCH] change darglint rules --- tox.ini | 95 ++------------------------------------------------------- 1 file changed, 3 insertions(+), 92 deletions(-) diff --git a/tox.ini b/tox.ini index 7bb0b1a..e8bee40 100644 --- a/tox.ini +++ b/tox.ini @@ -1,92 +1,3 @@ -[tox] -envlist = py36,py37,py38,py39 -[pytest] -addopts = --ignore bin --ignore integration_tests/repos --ignore _data/ - -[testenv] -deps=pytest -commands= - pytest --ignore=integration_tests/ --ignore=_data/ - -# Use docker environments to test all python versions. -# (This is just slightly more convenient for running tests -# without having to install a bunch of python version ahead -# of time.) -[testenv:docker] -deps = - pytest -allowlist_externals = - docker -commands = - docker run -it -v {toxinidir}:/code/ darglint-35 pytest - docker run -it -v {toxinidir}:/code/ darglint-36 pytest - docker run -it -v {toxinidir}:/code/ darglint-37 pytest - docker run -it -v {toxinidir}:/code/ darglint-38 pytest - docker run -it -v {toxinidir}:/code/ darglint-39 pytest - - -# Pre-commit tests. -# -# To run, -# -# tox -e pre-commit -# -# These tests expect certain test fixtures to be present. They're not -# included here because they could substantially increase the size of -# the repository, and I don't want to worry about licenses, etc. -# -# The following is a list of files and where they should be sourced: -# -# - _integration_tests/goldens.json_: A set of goldens which should be -# generated by hand, or using the utility in bin/doc_extract. Alternatively, -# they could be generated from darglint and touched up by hand to be -# made more correct. -# - _integration_tests/max_golden.json_: Should contain a very large golden, -# crafted to be difficult to parse. -# - _.performance_testrun_: Automatically generated, contains the history of -# of the performance test runs. Also used as a cache of previous runs -# to prevent pre-commit tests from taking too long. -# - _.performance_module_testrun_: Automatically generated, contains the history -# of the module performance test runs. (Which are run against the repostitories -# described below.) -# - _.performance_history_: Automatially generated, records performance history -# in an easy to view fashion. -# - _integration_tests/repos/_: Cloned whole repos to test against. -# Ideally, these will be quite large, so it doesn't make sense to include them -# in the repository. -# -# TODO: Add flake8 output. -[testenv:pre-commit] -deps= - pytest - flake8 - flake8-docstrings - flake8-rst-docstrings -commands = - # E2E tests - pytest integration_tests/end_to_end.py - - # Analysis tests - pytest integration_tests/analysis_tests.py - - # Test against how we expect docstrings to be parsed. - pytest integration_tests/goldens.py - - # Test the performance to make sure we don't introduce - # a severe regression. - pytest integration_tests/performance.py - - # Test different source file encodings. - pytest integration_tests/sources.py - - # Display the size of the grammar. - python integration_tests/grammar_size.py - - # Display the performance statistics. - python integration_tests/performance.py - - # Make sure darglint stays compatible with other common plugins. - pytest integration_tests/compatibility.py - - # Test that the flake8 plugin gets config from flake8. - pytest integration_tests/test_flake8.py +[darglint] +ignore=DAR001,DAR002,DAR004,DAR005,DAR101,DAR102,DAR103,DAR105,DAR201,DAR202,DAR203,DAR301,DAR302,DAR401,DAR402,DAR501,DAR502 +ignore_regex=^_(.*) \ No newline at end of file -- Gitee