[aliases] # Define this so we don't resolve to the wrong setuptools 'test' entrypoint when # invoking brazil-build test. test = brazil_test # Shorter, easier command to run the static type checker mypy = brazilpython_mypy # This is needed so the setting below has effect build_sphinx = amazon_doc_utils_build_sphinx # Configuration for pytest; enable coverage for qs_ds_refresh_optimizer, emit # XML, HTML, and terminal reports. [tool:pytest] xfail_strict = true addopts = --verbose --ignore=build/private --cov qs_ds_refresh_optimizer --cov-report term-missing --cov-report html:build/brazil-documentation/coverage --cov-report xml:build/brazil-documentation/coverage/coverage.xml # show the slowest 5 tests at the end --durations=5 # Default to colorful output --color=yes # Uncomment to enforce a minimum code coverage threshold. # --cov-fail-under 50 testpaths = test looponfailroots = src test # Additional coverage.py settings. The parallel flag and source values are # necessary so that pytest-cov knows to alias the brazil build artifact absolute # paths to the relative ones from your package source. [coverage:run] branch = true parallel = true [coverage:paths] source = src/ build/lib/*/site-packages/ [coverage:html] directory = build/brazil-documentation/coverage [coverage:xml] output = build/brazil-documentation/coverage/coverage.xml # Code formatting configuration. [brazilpython_formatters] include = test formatters = black,isort autopep8_opts = --max-line-length=100 [brazilpython_flake8] include = test [flake8] ignore = # Not pep8, black adds whitespace before ':' E203, # Not pep8, black adds line break before binary operator W503, # Once `bb format` is done with things, the only remaining long lines do not # matter; we can ignore them. E501, max_line_length = 100 # Uncomment to enforce a maximum cyclomatic complexity - more info https://en.wikipedia.org/wiki/Cyclomatic_complexity # max_complexity=10 [mypy] # See https://mypy.readthedocs.io/en/latest/config_file.html for more mypy options. # Enables the type-checker on the interior of functions without type annotations. check_untyped_defs = True # Displaying specific error codes makes it easier to silence specific errors # See also https://mypy.readthedocs.io/en/latest/error_codes.html show_error_codes = True # Show source code snippets and location markers in error messages pretty = True # Suppresses errors about packages which do not implement type-hint sharing. # See also https://mypy.readthedocs.io/en/latest/running_mypy.html#missing-imports. ignore_missing_imports = True [build_sphinx] warning-is-error = 1