Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions gel/_internal/_integration/_fastapi/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,8 +309,8 @@ def with_client_options(

def with_global(
self, name: str
) -> Callable[[Callable[P, T]], params.Depends]:
def decorator(func: Callable[P, T]) -> params.Depends:
) -> Callable[[Callable[P, object]], params.Depends]:
def decorator(func: Callable[P, object]) -> params.Depends:
def wrapper(
request: fastapi.Request, *args: P.args, **kwargs: P.kwargs
) -> Iterator[None]:
Expand Down
8 changes: 5 additions & 3 deletions gel/_internal/_integration/_fastapi/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@ def __get__(
return self
return self._get(instance)

def __set__(self, instance: S, value: Callable[..., Any]) -> None:
def __set__(
self, instance: ConfigSubject, value: Callable[..., Any]
) -> None:
self._get(instance)(value)

def _get(self, instance: S) -> HookInstance[S, Unpack[Ts]]:
Expand Down Expand Up @@ -405,7 +407,7 @@ def __get__(
return self
return self._get(instance)

def __set__(self, instance: S, value: T) -> None:
def __set__(self, instance: ConfigSubject, value: T) -> None:
self._get(instance)(value)

def _get(self, instance: S) -> ConfigInstance[T, S]:
Expand Down Expand Up @@ -494,7 +496,7 @@ def __get__(
return self
return self._get(instance)

def __set__(self, instance: S, value: T) -> None:
def __set__(self, instance: ConfigSubject, value: T) -> None:
self._get(instance)(value)

def _get(self, instance: S) -> DecoratorInstance[T, S]:
Expand Down
6 changes: 3 additions & 3 deletions tests/test_sourcecode.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@ def test_cqa_pyright(self):
stderr=subprocess.PIPE,
cwd=project_root,
env=os.environ | {
# Prevent pyright from checking and
# warning about upgrades.
"PYRIGHT_PYTHON_FORCE_VERSION": "latest",
# Suppress pyright-python's complaints about new
# pyright versions being available.
"PYRIGHT_PYTHON_IGNORE_WARNINGS": "1",
}
)
except subprocess.CalledProcessError as ex:
Expand Down