Skip to content

Commit

Permalink
Move configuration of tools to pyproject.toml (encode#2148)
Browse files Browse the repository at this point in the history
  • Loading branch information
aminalaee authored May 16, 2023
1 parent 0c4b68a commit d3a1120
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 41 deletions.
45 changes: 45 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,48 @@ select = ["E", "F", "I"]

[tool.ruff.isort]
combine-as-imports = true

[tool.mypy]
disallow_untyped_defs = true
ignore_missing_imports = true
no_implicit_optional = true
show_error_codes = true

[[tool.mypy.overrides]]
module = "starlette.testclient.*"
no_implicit_optional = false

[[tool.mypy.overrides]]
module = "tests.*"
disallow_untyped_defs = false
check_untyped_defs = true

[tool.pytest.ini_options]
addopts = "-rxXs --strict-config --strict-markers"
xfail_strict = true
filterwarnings = [
# Turn warnings that aren't filtered into exceptions
"error",
"ignore: run_until_first_complete is deprecated and will be removed in a future version.:DeprecationWarning",
"ignore: starlette.middleware.wsgi is deprecated and will be removed in a future release.*:DeprecationWarning",
"ignore: Async generator 'starlette.requests.Request.stream' was garbage collected before it had been exhausted.*:ResourceWarning",
"ignore: path is deprecated.*:DeprecationWarning:certifi",
"ignore: Use 'content=<...>' to upload raw bytes/text content.:DeprecationWarning",
"ignore: The `allow_redirects` argument is deprecated. Use `follow_redirects` instead.:DeprecationWarning",
"ignore: 'cgi' is deprecated and slated for removal in Python 3.13:DeprecationWarning",
"ignore: You seem to already have a custom sys.excepthook handler installed. I'll skip installing Trio's custom handler, but this means MultiErrors will not show full tracebacks.:RuntimeWarning",
]

[tool.coverage.run]
source_pkgs = [
"starlette",
"tests",
]

[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"pragma: nocover",
"if typing.TYPE_CHECKING:",
"@typing.overload",
]
41 changes: 0 additions & 41 deletions setup.cfg

This file was deleted.

0 comments on commit d3a1120

Please sign in to comment.