muffin 0.102.0__py3-none-any.whl → 0.102.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
muffin/app.py CHANGED
@@ -5,7 +5,7 @@ import logging
5
5
  from contextvars import ContextVar
6
6
  from inspect import isawaitable, stack
7
7
  from logging.config import dictConfig
8
- from typing import TYPE_CHECKING, Any, Dict, Final, Mapping, Union
8
+ from typing import TYPE_CHECKING, Any, Final, Mapping, Union
9
9
 
10
10
  from asgi_tools import App as BaseApp
11
11
  from asgi_tools._compat import aio_wait
@@ -57,7 +57,7 @@ class Application(BaseApp):
57
57
  :param **options: Configuration options
58
58
 
59
59
  """
60
- self.plugins: Dict[str, BasePlugin] = {}
60
+ self.plugins: dict[str, BasePlugin] = {}
61
61
 
62
62
  # Setup the configuration
63
63
  self.cfg = Config(**self.defaults, config_config={"update_from_env": False})
muffin/handler.py CHANGED
@@ -3,7 +3,7 @@
3
3
  from __future__ import annotations
4
4
 
5
5
  import inspect
6
- from typing import TYPE_CHECKING, Any, Awaitable, Callable, Dict, Optional, Tuple, Type, cast
6
+ from typing import TYPE_CHECKING, Any, Awaitable, Callable, Optional, cast
7
7
 
8
8
  from asgi_tools.utils import is_awaitable
9
9
  from asgi_tools.view import HTTP_METHODS, HTTPView
@@ -20,9 +20,9 @@ if TYPE_CHECKING:
20
20
  class HandlerMeta(type):
21
21
  """Prepare handlers."""
22
22
 
23
- def __new__(mcs: Type[HandlerMeta], name: str, bases: Tuple[type], params: Dict[str, Any]):
23
+ def __new__(mcs: type[HandlerMeta], name: str, bases: tuple[type], params: dict[str, Any]):
24
24
  """Prepare a Handler Class."""
25
- cls = cast(Type["Handler"], super().__new__(mcs, name, bases, params))
25
+ cls = cast(type["Handler"], super().__new__(mcs, name, bases, params))
26
26
 
27
27
  # Ensure that the class methods are exist and iterable
28
28
  if not cls.methods:
muffin/manage.py CHANGED
@@ -9,7 +9,7 @@ import sys
9
9
  from contextlib import AsyncExitStack, suppress
10
10
  from importlib import metadata
11
11
  from pathlib import Path
12
- from typing import TYPE_CHECKING, AsyncContextManager, Callable, Dict, Optional, overload
12
+ from typing import TYPE_CHECKING, AsyncContextManager, Callable, Optional, overload
13
13
 
14
14
  from muffin.constants import CONFIG_ENV_VARIABLE
15
15
  from muffin.errors import AsyncRequiredError
@@ -70,7 +70,7 @@ class Manager:
70
70
  )
71
71
 
72
72
  self.subparsers = self.parser.add_subparsers(dest="subparser")
73
- self.commands: Dict[str, Callable] = {}
73
+ self.commands: dict[str, Callable] = {}
74
74
 
75
75
  self.shell(
76
76
  getattr(
muffin/utils.py CHANGED
@@ -11,7 +11,7 @@ import threading
11
11
  from collections import OrderedDict
12
12
  from contextlib import suppress
13
13
  from logging import getLogger
14
- from typing import TYPE_CHECKING, Callable, Coroutine, Dict, Iterable, TypeVar
14
+ from typing import TYPE_CHECKING, Callable, Coroutine, Iterable, TypeVar
15
15
 
16
16
  from asgi_tools.utils import is_awaitable, to_awaitable
17
17
  from sniffio import current_async_library
@@ -35,7 +35,7 @@ __all__ = (
35
35
 
36
36
  AIOLIB = threading.local()
37
37
  AIOLIB.current = None
38
- AIOLIBS: Dict[str, ModuleType] = OrderedDict()
38
+ AIOLIBS: dict[str, ModuleType] = OrderedDict()
39
39
 
40
40
  with suppress(ImportError):
41
41
  import curio
@@ -78,7 +78,7 @@ def aio_run(corofn: Callable[..., Coroutine[None, None, TV]], *args, **kwargs) -
78
78
 
79
79
  def import_submodules(
80
80
  package_name: str, *module_names: str, silent: bool = False, exclude: Iterable[str] = ()
81
- ) -> Dict[str, ModuleType]:
81
+ ) -> dict[str, ModuleType]:
82
82
  """Import all submodules by the given package name."""
83
83
  package = sys.modules[package_name]
84
84
  res = {}
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: muffin
3
- Version: 0.102.0
3
+ Version: 0.102.1
4
4
  Summary: Muffin is a fast, simple and asyncronous web-framework for Python 3 (asyncio, trio, curio)
5
5
  Home-page: https://github.com/klen/muffin
6
6
  License: MIT
@@ -1,15 +1,15 @@
1
1
  muffin/__init__.py,sha256=8ldUFl0xhKQ7efnpU-TlB0BjXwkJ8lCOip0Uqcn-G4k,1016
2
- muffin/app.py,sha256=m3m98XOVwgt44iClqXuVROqYn91-UU81Jf147UPmnc8,5213
2
+ muffin/app.py,sha256=Xh3jDRKFG55hRReQJpdVeOF42ktVciJYP4O-bpOgVvo,5207
3
3
  muffin/constants.py,sha256=Ga1UJiEdXUk6dIEH_IEVYkFSZxQFPhxie7fCJwQY8V0,71
4
4
  muffin/errors.py,sha256=I-vKbMMBiMU07zPdKvoJKqA7s4xYAUA-4oZXrRMRzcM,701
5
- muffin/handler.py,sha256=cbEt5hKSGBTHSI5IEZ9T8RNiKcvcliYVsY_1PPnvpZE,3755
6
- muffin/manage.py,sha256=03yWa1phPeq1vR_rMbwuWPtoCgbAEFDVDSni0LnGKKc,8835
5
+ muffin/handler.py,sha256=GtIyn-SfWDXsMgJ3GyiJJiWUIezesrFoNVzSHyFI_yA,3736
6
+ muffin/manage.py,sha256=Lx3WTWVXiSuGnTR8CfNZKyGXxJBM-rHnagVEPxUSxMs,8829
7
7
  muffin/plugins.py,sha256=V2tyKR371mxYsCdAq7MIxA-vLIsBWB3bzJFZwGw2OvY,3190
8
8
  muffin/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
9
  muffin/pytest.py,sha256=51pJ-JJ2vwqiPhR9TPqXvT78X35l3v3oEkN5LBnfY8E,2679
10
10
  muffin/types.py,sha256=wsUj5oAfqSZMoEf-wyFJLBlWa8Mc-eJGqKLr02HxuXE,153
11
- muffin/utils.py,sha256=6Domw0vOVj9hv9NYadaRgfBUgPYhJTMc7sG8VgqszRQ,2905
12
- muffin-0.102.0.dist-info/METADATA,sha256=yOjKg--McBTfGhK5l9ho5HhnrST4f22Ap4qOA3YtMuQ,11331
13
- muffin-0.102.0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
14
- muffin-0.102.0.dist-info/entry_points.txt,sha256=GvPS3M-tNVPzhUS5jnUpOmWw2NAqedY34VRCYgPYzlM,84
15
- muffin-0.102.0.dist-info/RECORD,,
11
+ muffin/utils.py,sha256=zK_pGeYzWoTsv-4-Rlu6MjOhTEmS46NpprH4MsNRcVw,2899
12
+ muffin-0.102.1.dist-info/METADATA,sha256=iu_V_xdUyh80b5WrfaseHskU35Pz0417tTUCJUtfdRQ,11331
13
+ muffin-0.102.1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
14
+ muffin-0.102.1.dist-info/entry_points.txt,sha256=GvPS3M-tNVPzhUS5jnUpOmWw2NAqedY34VRCYgPYzlM,84
15
+ muffin-0.102.1.dist-info/RECORD,,