Skip to content

Commit

Permalink
Migrate configs for isort, mypy, and pytest into pyproject.toml (#10844)
Browse files Browse the repository at this point in the history
  • Loading branch information
cclauss authored Sep 21, 2022
1 parent ac8cb6b commit cb77162
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 103 deletions.
60 changes: 60 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
103 changes: 0 additions & 103 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -7,109 +7,6 @@ import-order-style = smarkets
per-file-ignores =
tests/*: E501

[isort]

This comment has been minimized.

Copy link
@tony

tony Sep 23, 2022

Contributor

It'll be like a dream when [flake8] can go into pyproject.toml

PyCQA/flake8#234 (comment)

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
Expand Down

0 comments on commit cb77162

Please sign in to comment.