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

Move configuration of tools to pyproject.toml #2686

Merged
merged 2 commits into from
May 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
26 changes: 26 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,29 @@ line-length = 120

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

[tool.mypy]
ignore_missing_imports = true
strict = true

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

[tool.pytest.ini_options]
addopts = "-rxXs"
filterwarnings = [
"error",
"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",
# See: https://github.com/agronholm/anyio/issues/508
"ignore: trio.MultiError is deprecated since Trio 0.22.0:trio.TrioDeprecationWarning"
]
markers = [
"copied_from(source, changes=None): mark test as copied from somewhere else, along with a description of changes made to accodomate e.g. our test setup",
"network: marks tests which require network connection. Used in 3rd-party build environments that have network disabled."
]

[tool.coverage.run]
omit = ["venv/*", "httpx/_compat.py"]
include = ["httpx/*", "tests/*"]
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ twine==4.0.2

# Tests & Linting
black==23.3.0
coverage==7.2.2
coverage[toml]==7.2.2
Copy link
Sponsor Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you add this?

Copy link
Sponsor Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it to be able to read from the pyproject?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exactly. from what I have seen, coverage requires toml extra to work with pyproject.toml configs.

cryptography==40.0.2
mypy==1.0.1
types-certifi==2021.10.8.2
Expand Down
22 changes: 0 additions & 22 deletions setup.cfg

This file was deleted.