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

Update dependency flake8-pytest-style to v2 #26

Merged
merged 2 commits into from
Apr 3, 2024
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions asyncpg_engine/pytest_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ def pytest_configure(config: typing.Any) -> None:
config.addinivalue_line("markers", "asyncpg_engine: configure asyncpg-engine plugin behaviour.")


@pytest.fixture()
@pytest.fixture
def asyncpg_engine_cls() -> typing.Type[Engine]:
return Engine


@pytest_asyncio.fixture()
@pytest_asyncio.fixture
async def db(
request: pytest.FixtureRequest, asyncpg_engine_cls: typing.Type[Engine], postgres_url: str
) -> typing.AsyncGenerator[Engine, None]:
Expand All @@ -37,7 +37,7 @@ async def db(
await _db.close()


@pytest_asyncio.fixture()
@pytest_asyncio.fixture
async def con(db: Engine) -> typing.AsyncGenerator[Connection, None]:
async with db.acquire() as _con:
yield _con
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ flake8 = "^7.0.0"
flake8-debugger = "^4.1.2"
flake8-isort = "^6.0.0"
flake8-print = "^5.0.0"
flake8-pytest-style = "^1.6.0"
flake8-pytest-style = "^2.0.0"
flake8-quotes = "^3.3.2"
isort = "^5.11.4"
mypy = "^1.0.0"
Expand Down
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
pytest_plugins = ["asyncpg_engine"]


@pytest.fixture()
@pytest.fixture
def postgres_url() -> str:
return "postgres://guest:guest@localhost:5432/guest?sslmode=disable"
2 changes: 1 addition & 1 deletion tests/pytest_plugin/test_custom_engine_cls.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class MyPrettyEngine(Engine):
pass


@pytest.fixture()
@pytest.fixture
def asyncpg_engine_cls() -> typing.Type[MyPrettyEngine]:
return MyPrettyEngine

Expand Down