diff --git a/pyproject.toml b/pyproject.toml index 850d9a28d4b..b5ebce1b620 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -134,3 +134,63 @@ include = [ exclude = [ "doc/_build", ] + +[tool.isort] +line_length = 95 + +[tool.mypy] +check_untyped_defs = true +disallow_incomplete_defs = true +follow_imports = "skip" +ignore_missing_imports = true +no_implicit_optional = true +python_version = "3.6" +show_column_numbers = true +show_error_codes = true +show_error_context = true +strict_optional = true +warn_redundant_casts = true +warn_unused_ignores = true + +[[tool.mypy.overrides]] +module = [ + "sphinx.application", + "sphinx.builders", + "sphinx.builders.html", + "sphinx.builders.latex", + "sphinx.builders.linkcheck", + "sphinx.directives.code", + "sphinx.domains.*", + "sphinx.environment", + "sphinx.environment.adapters.toctree", + "sphinx.environment.adapters.indexentries", + "sphinx.ext.*", + "sphinx.pycode.parser", + "sphinx.registry", + "sphinx.setup_command", + "sphinx.testing.util", + "sphinx.transforms.i18n", + "sphinx.transforms.post_transforms.images", + "sphinx.util.cfamily", + "sphinx.util.docfields", + "sphinx.util.docutils", + "sphinx.util.nodes", + "sphinx.util.typing", + "sphinx.writers.latex", + "sphinx.writers.text", + "sphinx.writers.xml" +] +strict_optional = false + +[tool.pytest.ini_options] +filterwarnings = [ + "all", + "ignore::DeprecationWarning:docutils.io", + "ignore::DeprecationWarning:pyximport.pyximport", + "ignore::ImportWarning:importlib._bootstrap", +] +markers = [ + "apidoc", + "setup_command", +] +testpaths = ["tests"] diff --git a/setup.cfg b/setup.cfg index 4a285c1d3a6..8c2224b22c7 100644 --- a/setup.cfg +++ b/setup.cfg @@ -7,109 +7,6 @@ import-order-style = smarkets per-file-ignores = tests/*: E501 -[isort] -line_length = 95 - -[mypy] -python_version = 3.6 -disallow_incomplete_defs = True -show_column_numbers = True -show_error_context = True -show_error_codes = true -ignore_missing_imports = True -follow_imports = skip -check_untyped_defs = True -warn_unused_ignores = True -strict_optional = True -no_implicit_optional = True -warn_redundant_casts = True - -[mypy-sphinx.application] -strict_optional = False - -[mypy-sphinx.builders] -strict_optional = False - -[mypy-sphinx.builders.html] -strict_optional = False - -[mypy-sphinx.builders.latex] -strict_optional = False - -[mypy-sphinx.builders.linkcheck] -strict_optional = False - -[mypy-sphinx.directives.code] -strict_optional = False - -[mypy-sphinx.domains.*] -strict_optional = False - -[mypy-sphinx.environment] -strict_optional = False - -[mypy-sphinx.environment.adapters.toctree] -strict_optional = False - -[mypy-sphinx.environment.adapters.indexentries] -strict_optional = False - -[mypy-sphinx.ext.*] -strict_optional = False - -[mypy-sphinx.pycode.parser] -strict_optional = False - -[mypy-sphinx.registry] -strict_optional = False - -[mypy-sphinx.setup_command] -strict_optional = False - -[mypy-sphinx.testing.util] -strict_optional = False - -[mypy-sphinx.transforms.i18n] -strict_optional = False - -[mypy-sphinx.transforms.post_transforms.images] -strict_optional = False - -[mypy-sphinx.util.cfamily] -strict_optional = False - -[mypy-sphinx.util.docfields] -strict_optional = False - -[mypy-sphinx.util.docutils] -strict_optional = False - -[mypy-sphinx.util.nodes] -strict_optional = False - -[mypy-sphinx.util.typing] -strict_optional = False - -[mypy-sphinx.writers.latex] -strict_optional = False - -[mypy-sphinx.writers.text] -strict_optional = False - -[mypy-sphinx.writers.xml] -strict_optional = False - -[tool:pytest] -filterwarnings = - all - ignore::DeprecationWarning:docutils.io - ignore::DeprecationWarning:pyximport.pyximport - ignore::ImportWarning:importlib._bootstrap -markers = - apidoc - setup_command -testpaths = tests - [coverage:run] branch = True parallel = True