Skip to content

Commit

Permalink
Update dev deps
Browse files Browse the repository at this point in the history
  • Loading branch information
Tinche committed Nov 28, 2023
1 parent be3575a commit c047512
Show file tree
Hide file tree
Showing 6 changed files with 183 additions and 234 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ test: ## run tests quickly with the default Python
pdm run pytest -x --ff -l tests

lint:
pdm run ruff src tests && pdm run black --check --quiet src tests && pdm run isort --check --quiet src tests && pdm run mypy src tests
pdm run ruff src tests && pdm run black --check --quiet src tests && pdm run mypy src tests
393 changes: 174 additions & 219 deletions pdm.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ test = [
lint = [
"black",
"mypy>=0.991",
"isort>=5.12.0",
"ruff>=0.0.272",
]

Expand Down Expand Up @@ -62,6 +61,7 @@ select = [
"PLC", # Pylint
"PIE", # flake8-pie
"RUF", # ruff
"I", # isort
]
ignore = [
"S101", # assert
Expand Down
2 changes: 0 additions & 2 deletions src/quattro/cancelscope.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import sys

from asyncio import (
CancelledError,
Handle,
Expand All @@ -14,7 +13,6 @@

from attr import define, field


_is_311_or_later: Final = sys.version_info >= (3, 11)


Expand Down
2 changes: 0 additions & 2 deletions src/quattro/taskgroup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

import builtins


if "ExceptionGroup" not in dir(builtins):
from exceptiongroup import ExceptionGroup
else:
Expand All @@ -30,7 +29,6 @@
import asyncio
import types
import weakref

from asyncio import AbstractEventLoop, Future, Task
from collections.abc import Coroutine
from contextvars import Context
Expand Down
16 changes: 7 additions & 9 deletions tests/test_taskgroup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import asyncio
import re

from asyncio import CancelledError, create_task, get_running_loop
from contextvars import ContextVar, copy_context
from gc import collect
Expand Down Expand Up @@ -333,15 +332,14 @@ async def foo():
1 / 0 # This will blow up the test, should not get here. # noqa: B018

async def runner():
async with taskgroup.TaskGroup():
async with taskgroup.TaskGroup() as g2:
for _ in range(5):
g2.create_task(foo())
async with taskgroup.TaskGroup(), taskgroup.TaskGroup() as g2:
for _ in range(5):
g2.create_task(foo())

try:
await asyncio.sleep(10)
except asyncio.CancelledError:
raise
try:
await asyncio.sleep(10)
except asyncio.CancelledError:
raise

r = create_task(runner())
await asyncio.sleep(0.1)
Expand Down

0 comments on commit c047512

Please sign in to comment.