Skip to content

Commit

Permalink
bump dev requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
chirizxc committed Jan 10, 2025
1 parent e74b5b6 commit 859b5e0
Show file tree
Hide file tree
Showing 22 changed files with 65 additions and 56 deletions.
40 changes: 20 additions & 20 deletions .ruff.toml
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
line-length = 79
target-version="py310"
target-version = "py310"
src = ["src"]

include = ["src/**.py", "tests/**.py"]
exclude = ["src/dishka/_adaptix/**"]

lint.select = [
"ALL"
"ALL"
]
lint.ignore = [
"ARG",
"ANN",
"D",
"EM101",
"EM102",
"PT001",
"PT023",
"SIM108",
"SIM114",
"TRY003",
"TCH003",
"PLW2901",
"RET505",
"PLR0913",
"UP038",
"TCH001",
"SIM103",
"ISC003",
"ARG",
"ANN",
"D",
"EM101",
"EM102",
"PT001",
"PT023",
"SIM108",
"SIM114",
"TRY003",
"TC003",
"PLW2901",
"RET505",
"PLR0913",
"UP038",
"TC001",
"SIM103",
"ISC003",
]

[lint.per-file-ignores]
Expand Down
4 changes: 2 additions & 2 deletions requirements_dev.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ruff==0.6.*
ruff==0.9.*
nox==2024.10.*
uv==0.5.*
mypy==1.12.*
mypy==1.14.*
8 changes: 4 additions & 4 deletions src/dishka/__init__.py
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
__all__ = [
"DEFAULT_COMPONENT",
"STRICT_VALIDATION",
"AnyOf",
"AsyncContainer",
"BaseScope",
"Component",
"Container",
"DEFAULT_COMPONENT",
"DependencyKey",
"FromComponent",
"FromDishka",
"Provider",
"Scope",
"ValidationSettings",
"WithParents",
"alias",
"decorate",
"from_context",
"make_async_container",
"make_container",
"new_scope",
"provide",
"provide_all",
"new_scope",
"ValidationSettings",
"STRICT_VALIDATION",
]

from .async_container import AsyncContainer, make_async_container
Expand Down
6 changes: 3 additions & 3 deletions src/dishka/async_container.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@

class AsyncContainer:
__slots__ = (
"_cache",
"_context",
"_exits",
"child_registries",
"close_parent",
"lock",
"parent_container",
"registry",
"_cache",
"_context",
"_exits",
)

def __init__(
Expand Down
6 changes: 3 additions & 3 deletions src/dishka/container.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@

class Container:
__slots__ = (
"_cache",
"_context",
"_exits",
"child_registries",
"close_parent",
"lock",
"parent_container",
"registry",
"_cache",
"_context",
"_exits",
)

def __init__(
Expand Down
13 changes: 9 additions & 4 deletions src/dishka/dependency_source/__init__.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
__all__ = [
"Alias",
"ContextVariable",
"Decorator",
"DependencySource",
"alias", "Alias",
"context_var", "ContextVariable", "from_context",
"decorate", "Decorator",
"provide", "provide_all",
"Factory",
"alias",
"context_var",
"decorate",
"from_context",
"provide",
"provide_all",
]

from .alias import Alias
Expand Down
2 changes: 1 addition & 1 deletion src/dishka/dependency_source/alias.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def _identity(x: Any) -> Any:


class Alias:
__slots__ = ("source", "provides", "cache", "component", "override")
__slots__ = ("cache", "component", "override", "provides", "source")

def __init__(
self, *,
Expand Down
2 changes: 1 addition & 1 deletion src/dishka/dependency_source/context_var.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def context_stub() -> NoReturn:


class ContextVariable:
__slots__ = ("provides", "scope", "override")
__slots__ = ("override", "provides", "scope")

def __init__(
self, *,
Expand Down
2 changes: 1 addition & 1 deletion src/dishka/dependency_source/decorator.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@


class Decorator:
__slots__ = ("provides", "factory")
__slots__ = ("factory", "provides")

def __init__(
self,
Expand Down
4 changes: 2 additions & 2 deletions src/dishka/dependency_source/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@

class Factory(FactoryData):
__slots__ = (
"cache",
"dependencies",
"kw_dependencies",
"is_to_bind",
"cache",
"kw_dependencies",
"override",
)

Expand Down
2 changes: 1 addition & 1 deletion src/dishka/entities/factory_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class FactoryType(Enum):


class FactoryData:
__slots__ = ("source", "provides", "scope", "type")
__slots__ = ("provides", "scope", "source", "type")

def __init__(
self,
Expand Down
2 changes: 1 addition & 1 deletion src/dishka/entities/with_parents.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
)
from dishka.entities.provides_marker import ProvideMultiple

__all__ = ["WithParents", "ParentsResolver"]
__all__ = ["ParentsResolver", "WithParents"]

IGNORE_TYPES: Final = (
type,
Expand Down
4 changes: 2 additions & 2 deletions src/dishka/integrations/aiogram.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
__all__ = [
"AutoInjectMiddleware",
"AiogramProvider",
"CONTAINER_NAME",
"AiogramProvider",
"AutoInjectMiddleware",
"FromDishka",
"inject",
"setup_dishka",
Expand Down
2 changes: 1 addition & 1 deletion src/dishka/integrations/aiohttp.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
__all__ = [
"DISHKA_CONTAINER_KEY",
"AiohttpProvider",
"FromDishka",
"inject",
"setup_dishka",
"AiohttpProvider",
]

from collections.abc import Callable, Coroutine
Expand Down
2 changes: 1 addition & 1 deletion src/dishka/integrations/faststream.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
__all__ = (
"FastStreamProvider",
"FromDishka",
"inject",
"FastStreamProvider",
"setup_dishka",
)

Expand Down
2 changes: 1 addition & 1 deletion src/dishka/integrations/flask.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
__all__ = [
"FlaskProvider",
"FromDishka",
"inject",
"setup_dishka",
"FlaskProvider",
]

from collections.abc import Callable
Expand Down
6 changes: 3 additions & 3 deletions src/dishka/integrations/grpcio.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
__all__ = [
"FromDishka",
"inject",
"DishkaInterceptor",
"DishkaAioInterceptor",
"DishkaInterceptor",
"FromDishka",
"GrpcioProvider",
"inject",
]

from collections.abc import Awaitable, Callable, Iterator
Expand Down
2 changes: 1 addition & 1 deletion src/dishka/integrations/litestar.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
__all__ = [
"FromDishka",
"LitestarProvider",
"inject",
"inject_websocket",
"setup_dishka",
"LitestarProvider",
]

from collections.abc import Callable
Expand Down
2 changes: 1 addition & 1 deletion src/dishka/integrations/sanic.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
__all__ = [
"FromDishka",
"SanicProvider",
"inject",
"setup_dishka",
"SanicProvider",
]

from collections.abc import Iterable
Expand Down
2 changes: 1 addition & 1 deletion src/dishka/integrations/starlette.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
__all__ = [
"FromDishka",
"StarletteProvider",
"inject",
"setup_dishka",
"StarletteProvider",
]

from collections.abc import Callable
Expand Down
2 changes: 1 addition & 1 deletion src/dishka/integrations/telebot.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
__all__ = [
"FromDishka",
"TelebotProvider",
"inject",
"setup_dishka",
"TelebotProvider",
]

from collections.abc import Callable
Expand Down
6 changes: 5 additions & 1 deletion src/dishka/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@

class Registry:
__slots__ = (
"scope", "factories", "compiled", "compiled_async", "has_fallback",
"compiled",
"compiled_async",
"factories",
"has_fallback",
"scope",
)

def __init__(self, scope: BaseScope, *, has_fallback: bool) -> None:
Expand Down

0 comments on commit 859b5e0

Please sign in to comment.