Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure pytest to ignore known DeprecationWarnings #233

Merged
merged 2 commits into from
Dec 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,21 @@ reportFunctionMemberAccess = false
reportCircularImports = true
reportInvalidTypeForm = false

[tool.pytest.ini_options]
filterwarnings = [
# Replace the word "all" with "error" after resolving `ResourceWarning`s from anyio.
"all",

# Older starlette syntax is currently supported.
"ignore:The `name` is not the first parameter anymore:DeprecationWarning:starlette.templating",
"ignore:The on_startup and on_shutdown parameters are deprecated:DeprecationWarning:starlette.routing",

# Older pydantic syntax is currently supported.
"ignore:Using extra keyword arguments on `Field` is deprecated:DeprecationWarning:pydantic.fields",
"ignore:Pydantic V1 style `@root_validator` validators are deprecated:pydantic.PydanticDeprecatedSince20",
"ignore:Pydantic V1 style `@validator` validators are deprecated:pydantic.PydanticDeprecatedSince20",
]

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
Loading