diff --git a/.gitignore b/.gitignore index e19d2b45..8667e326 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,5 @@ test/resources/local_mode_lock __pycache__/ .idea/ .DS_Store +**/*.pyc +**.pyc diff --git a/tox.ini b/tox.ini index 0796b484..fe8fc195 100644 --- a/tox.ini +++ b/tox.ini @@ -18,6 +18,8 @@ exclude = lib/ max-complexity = 10 ignore = + C901, + E203, # whitespace before ':': Black disagrees with and explicitly violates this. FI10, FI12, FI13, @@ -25,7 +27,7 @@ ignore = FI15, FI16, FI17, - FI18, + FI18, # __future__ import "annotations" missing -> check only Python 3.7 compatible FI50, FI51, FI52, @@ -33,7 +35,8 @@ ignore = FI54, FI55, FI56, - FI57 + FI57, + W503 require-code = True [testenv] @@ -46,8 +49,8 @@ passenv = AWS_CONTAINER_CREDENTIALS_RELATIVE_URI AWS_DEFAULT_REGION commands = - coverage run --source sagemaker_pytorch_serving_container -m py.test test/unit {posargs} - coverage report + coverage run --source sagemaker_pytorch_serving_container -m pytest {posargs} + {env:IGNORE_COVERAGE:} coverage report --fail-under=90 --include *sagemaker_pytorch_serving_container* deps = coverage pytest @@ -62,6 +65,7 @@ deps = torchvision retrying six + future [testenv:flake8] basepython = python