Skip to content

Commit

Permalink
Clean up old Python versions and unused imports (#126)
Browse files Browse the repository at this point in the history
  • Loading branch information
dkang-quora committed Aug 10, 2023
1 parent c21d2aa commit 831302b
Show file tree
Hide file tree
Showing 9 changed files with 4 additions and 18 deletions.
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ of these are in the ``asynq.tools`` module. These tools include:
Compatibility
-------------

``asynq`` runs on Python 3.6 and newer.
``asynq`` runs on Python 3.8 and newer.

Previous versions of ``asynq`` used the name ``async`` for the ``@asynq()`` decorator and the
``.asynq`` attribute. Because ``async`` is a keyword in recent versions of Python 3, we now use
Expand Down
2 changes: 0 additions & 2 deletions asynq/async_task.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ from typing import Any, Callable, Iterable, List, Mapping, TypeVar

from . import futures

import asynq

_T = TypeVar("_T")

class AsyncTaskCancelledError(GeneratorExit): ...
Expand Down
1 change: 0 additions & 1 deletion asynq/contexts.pyi
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from abc import abstractmethod
from typing import Type, Optional, TypeVar
from types import TracebackType
import asynq

_T = TypeVar("_T", bound=AsyncContext)

Expand Down
8 changes: 0 additions & 8 deletions asynq/futures.pyi
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
import traceback
from typing import Callable, Generic, NoReturn, Optional, TypeVar

import qcore.helpers as core_helpers
import qcore.events as core_events
import qcore.errors as core_errors

from . import debug
from . import _debug

_T = TypeVar("_T")

class FutureIsAlreadyComputed(Exception): ...
Expand Down
2 changes: 0 additions & 2 deletions asynq/generator.pyi
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import qcore
import functools
from typing import Any, Callable, Generic, List, TypeVar

from .decorators import asynq, async_proxy
from .futures import FutureBase
from .utils import result

END_OF_GENERATOR: qcore.MarkerObject

Expand Down
1 change: 0 additions & 1 deletion asynq/scheduler.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import threading
from typing import Any, Optional

from . import futures
from .async_task import AsyncTask

class AsyncTaskError(Exception): ...

Expand Down
1 change: 0 additions & 1 deletion asynq/scoped_value.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import qcore
from typing import Any, Generic, TypeVar

from . import contexts
Expand Down
3 changes: 2 additions & 1 deletion asynq/tools.pyi
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from .contexts import AsyncContext
from asynq import asynq, async_proxy
from asynq import asynq

from qcore import Utime
from qcore.events import EventHook
Expand Down Expand Up @@ -52,6 +52,7 @@ def asift(
) -> Tuple[List[_T], List[_T]]: ...

# Used to implement decorators that just wrap a function without changing the signature.

class _AsyncWrapper:
def __call__(self, fn: _T) -> _T: ...

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tool.black]
target_version = ['py37', 'py38', 'py39', 'py310', 'py311']
target_version = ['py38', 'py39', 'py310', 'py311']
include = '\.pyi?$'
skip-magic-trailing-comma = true
preview = true
Expand Down

0 comments on commit 831302b

Please sign in to comment.