- Sort Score
- Num 10 results
- Language All
Results 1 - 3 of 3 for isgeneratorfunction (0.09 seconds)
-
fastapi/dependencies/models.py
@cached_property def is_gen_callable(self) -> bool: if self.call is None: return False # pragma: no cover if inspect.isgeneratorfunction( _impartial(self.call) ) or inspect.isgeneratorfunction(_unwrapped_call(self.call)): return True if inspect.isclass(_unwrapped_call(self.call)): return FalseCreated: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Wed Feb 11 18:41:21 GMT 2026 - 7.1K bytes - Click Count (0) -
tests/test_dependency_wrapped.py
def noop_wrap(func): @wraps(func) def wrapper(*args, **kwargs): return func(*args, **kwargs) return wrapper def noop_wrap_async(func): if inspect.isgeneratorfunction(func): @wraps(func) async def gen_wrapper(*args, **kwargs): async for item in iterate_in_threadpool(func(*args, **kwargs)): yield item return gen_wrapper
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Wed Dec 17 21:25:59 GMT 2025 - 11.2K bytes - Click Count (0) -
fastapi/routing.py
lifespan_context: Lifespan[Any] = _DefaultLifespan(self) elif inspect.isasyncgenfunction(lifespan): lifespan_context = asynccontextmanager(lifespan) elif inspect.isgeneratorfunction(lifespan): lifespan_context = _wrap_gen_lifespan_context(lifespan) else: lifespan_context = lifespan self.lifespan_context = lifespan_context
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Mar 15 11:44:39 GMT 2026 - 193K bytes - Click Count (0)