Skip to content

Commit 1d83409

Browse files
Merge branch 'main' into pre-commit-ci-update-config
2 parents d8549b0 + e40623d commit 1d83409

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+298
-154
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ jobs:
6262
strategy:
6363
matrix:
6464
os: [ubuntu, windows]
65-
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', 3.13.0-beta.3]
65+
python-version: ['3.9', '3.10', '3.11', '3.12', 3.13.0-beta.3]
6666

6767
steps:
6868
- uses: actions/checkout@v4

.pre-commit-config.yaml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ repos:
55
hooks:
66
- id: check-merge-conflict
77
exclude: rst$
8+
- repo: https://github.com/astral-sh/ruff-pre-commit
9+
rev: v0.7.0
10+
hooks:
11+
- id: ruff
12+
args: [--fix]
813
- repo: https://github.com/asottile/yesqa
914
rev: v1.5.0
1015
hooks:
@@ -43,11 +48,6 @@ repos:
4348
exclude: ^(docs|tests)/.*
4449
additional_dependencies:
4550
- pytest
46-
- repo: https://github.com/pycqa/flake8
47-
rev: 7.1.1
48-
hooks:
49-
- id: flake8
50-
language_version: python3
5151
- repo: https://github.com/pre-commit/pygrep-hooks
5252
rev: v1.10.0
5353
hooks:
@@ -68,6 +68,12 @@ repos:
6868
rev: 0.29.4
6969
hooks:
7070
- id: check-github-actions
71+
- repo: https://github.com/tox-dev/pyproject-fmt
72+
rev: 2.3.1
73+
hooks:
74+
- id: pyproject-fmt
75+
# https://pyproject-fmt.readthedocs.io/en/latest/#calculating-max-supported-python-version
76+
additional_dependencies: [tox>=4.9]
7177
ci:
7278
skip:
7379
- actionlint-docker

dependencies/default/constraints.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
attrs==24.2.0
2-
coverage==7.6.1
2+
coverage==7.6.4
33
exceptiongroup==1.2.2
4-
hypothesis==6.112.4
4+
hypothesis==6.115.5
55
iniconfig==2.0.0
66
packaging==24.1
77
pluggy==1.5.0

pyproject.toml

Lines changed: 134 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,141 @@
11
[build-system]
2+
build-backend = "setuptools.build_meta"
3+
24
requires = [
3-
"setuptools>=51.0",
5+
"setuptools>=51",
6+
"setuptools-scm[toml]>=6.2",
47
"wheel>=0.36",
5-
"setuptools_scm[toml]>=6.2"
68
]
7-
build-backend = "setuptools.build_meta"
9+
10+
[project]
11+
name = "pytest-asyncio"
12+
description = "Pytest support for asyncio"
13+
readme.content-type = "text/x-rst"
14+
readme.file = "README.rst"
15+
license.text = "Apache 2.0"
16+
authors = [
17+
{ name = "Tin Tvrtković <[email protected]>", email = "[email protected]" },
18+
]
19+
requires-python = ">=3.9"
20+
classifiers = [
21+
"Development Status :: 4 - Beta",
22+
"Framework :: AsyncIO",
23+
"Framework :: Pytest",
24+
"Intended Audience :: Developers",
25+
"License :: OSI Approved :: Apache Software License",
26+
"Programming Language :: Python :: 3 :: Only",
27+
"Programming Language :: Python :: 3.9",
28+
"Programming Language :: Python :: 3.10",
29+
"Programming Language :: Python :: 3.11",
30+
"Programming Language :: Python :: 3.12",
31+
"Programming Language :: Python :: 3.13",
32+
"Topic :: Software Development :: Testing",
33+
"Typing :: Typed",
34+
]
35+
dynamic = [
36+
"version",
37+
]
38+
39+
dependencies = [
40+
"pytest>=8.2,<9",
41+
]
42+
optional-dependencies.docs = [
43+
"sphinx>=5.3",
44+
"sphinx-rtd-theme>=1",
45+
]
46+
optional-dependencies.testing = [
47+
"coverage>=6.2",
48+
"hypothesis>=5.7.1",
49+
]
50+
urls."Bug Tracker" = "https://github.com/pytest-dev/pytest-asyncio/issues"
51+
urls.Changelog = "https://pytest-asyncio.readthedocs.io/en/latest/reference/changelog.html"
52+
urls.Documentation = "https://pytest-asyncio.readthedocs.io"
53+
urls.Homepage = "https://github.com/pytest-dev/pytest-asyncio"
54+
urls."Source Code" = "https://github.com/pytest-dev/pytest-asyncio"
55+
entry-points.pytest11.asyncio = "pytest_asyncio.plugin"
56+
57+
[tool.setuptools]
58+
packages = [
59+
"pytest_asyncio",
60+
]
61+
include-package-data = true
62+
license-files = [
63+
"LICENSE",
64+
]
865

966
[tool.setuptools_scm]
1067
write_to = "pytest_asyncio/_version.py"
68+
69+
[tool.ruff]
70+
line-length = 88
71+
format.docstring-code-format = true
72+
lint.select = [
73+
"B", # bugbear
74+
"D", # pydocstyle
75+
"E", # pycodestyle
76+
"F", # pyflakes
77+
"FA100", # add future annotations
78+
"PGH004", # pygrep-hooks - Use specific rule codes when using noqa
79+
"PIE", # flake8-pie
80+
"PLE", # pylint error
81+
"PYI", # flake8-pyi
82+
"RUF", # ruff
83+
"T100", # flake8-debugger
84+
"UP", # pyupgrade
85+
"W", # pycodestyle
86+
]
87+
88+
lint.ignore = [
89+
# bugbear ignore
90+
"B028", # No explicit `stacklevel` keyword argument found
91+
# pydocstyle ignore
92+
"D100", # Missing docstring in public module
93+
"D101", # Missing docstring in public class
94+
"D102", # Missing docstring in public method
95+
"D103", # Missing docstring in public function
96+
"D104", # Missing docstring in public package
97+
"D105", # Missing docstring in magic method
98+
"D106", # Missing docstring in public nested class
99+
"D107", # Missing docstring in `__init__`
100+
"D203", # `one-blank-line-before-class` (D203) and `no-blank-line-before-class` (D211) are incompatible
101+
"D205", # 1 blank line required between summary line and description
102+
"D209", # [*] Multi-line docstring closing quotes should be on a separate line
103+
"D212", # `multi-line-summary-first-line` (D212) and `multi-line-summary-second-line` (D213) are incompatible.
104+
"D400", # First line should end with a period
105+
"D401", # First line of docstring should be in imperative mood
106+
"D402", # First line should not be the function's signature
107+
"D404", # First word of the docstring should not be "This"
108+
"D415", # First line should end with a period, question mark, or exclamation point
109+
]
110+
111+
[tool.pytest.ini_options]
112+
python_files = [
113+
"test_*.py",
114+
"*_example.py",
115+
]
116+
addopts = "-rsx --tb=short"
117+
testpaths = [
118+
"docs",
119+
"tests",
120+
]
121+
asyncio_mode = "auto"
122+
asyncio_default_fixture_loop_scope = "function"
123+
junit_family = "xunit2"
124+
filterwarnings = [
125+
"error",
126+
"ignore:The event_loop fixture provided by pytest-asyncio has been redefined.*:DeprecationWarning",
127+
]
128+
129+
[tool.coverage.run]
130+
source = [
131+
"pytest_asyncio",
132+
]
133+
branch = true
134+
data_file = "coverage/coverage"
135+
omit = [
136+
"*/_version.py",
137+
]
138+
parallel = true
139+
140+
[tool.coverage.report]
141+
show_missing = true

pytest_asyncio/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
"""The main point for importing pytest-asyncio items."""
22

3-
from ._version import version as __version__ # noqa
3+
from __future__ import annotations
4+
5+
from ._version import version as __version__ # noqa: F401
46
from .plugin import fixture, is_async_test
57

68
__all__ = ("fixture", "is_async_test")

0 commit comments

Comments
 (0)