Skip to content

Commit

Permalink
fix merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
provinzkraut committed Jan 15, 2025
1 parent 08ac625 commit f373a3d
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 10 deletions.
12 changes: 6 additions & 6 deletions litestar/handlers/asgi_handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@


if TYPE_CHECKING:
from litestar import Router
from litestar.connection import ASGIConnection
from litestar import Litestar
from litestar import Litestar, Router
from litestar.connection import ASGIConnection
from litestar.routes import BaseRoute
from litestar.types import (
Expand All @@ -28,7 +26,8 @@
class ASGIRouteHandler(BaseRouteHandler):
__slots__ = (
"copy_scope",
"is_mount",)
"is_mount",
)

def __init__(
self,
Expand Down Expand Up @@ -85,8 +84,8 @@ def __init__(
**kwargs,
)

def on_registration(self, app: Litestar, route: BaseRoute) -> None:
super().on_registration(app, route=route)
def on_registration(self, route: BaseRoute, app: Litestar) -> None:
super().on_registration(app=app, route=route)

if self.copy_scope is None:
warnings.warn(
Expand All @@ -101,6 +100,7 @@ def on_registration(self, app: Litestar, route: BaseRoute) -> None:
def _get_merge_opts(self, others: tuple[Router, ...]) -> dict[str, Any]:
merge_opts = super()._get_merge_opts(others)
merge_opts["is_mount"] = self.is_mount
merge_opts["copy_scope"] = self.copy_scope
return merge_opts

def _validate_handler_function(self) -> None:
Expand Down
3 changes: 0 additions & 3 deletions litestar/handlers/http_handlers/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
)
from litestar.handlers.base import BaseRouteHandler
from litestar.handlers.http_handlers._utils import (
cleanup_temporary_files,
create_data_handler,
create_generic_asgi_response_handler,
create_response_handler,
Expand Down Expand Up @@ -55,8 +54,6 @@
from litestar.utils import deprecated as litestar_deprecated
from litestar.utils import ensure_async_callable
from litestar.utils.empty import value_or_default
from litestar.utils.predicates import is_async_callable
from litestar.utils.scope.state import ScopeState
from litestar.utils.predicates import is_async_callable, is_class_and_subclass
from litestar.utils.scope.state import ScopeState
from litestar.utils.warnings import warn_implicit_sync_to_thread, warn_sync_to_thread_with_async_callable
Expand Down
2 changes: 1 addition & 1 deletion litestar/routes/asgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ async def handle(self, scope: Scope, receive: Receive, send: Send) -> None:
copy_scope = self.route_handler.copy_scope

connection = ASGIConnection["ASGIRouteHandler", Any, Any, Any](
scope=handler_scope if copy_scope else scope,
scope=handler_scope if copy_scope is True else scope,
receive=receive,
send=send,
)
Expand Down
Empty file removed litestar/static_files/base.py
Empty file.
Empty file removed litestar/static_files/config.py
Empty file.

0 comments on commit f373a3d

Please sign in to comment.