Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 31 - 40 of 1,345 for callable (0.54 seconds)

  1. fastapi/encoders.py

        set: list,
        UUID: str,
        Url: str,
        AnyUrl: str,
    }
    
    
    def generate_encoders_by_class_tuples(
        type_encoder_map: dict[Any, Callable[[Any], Any]],
    ) -> dict[Callable[[Any], Any], tuple[Any, ...]]:
        encoders_by_class_tuples: dict[Callable[[Any], Any], tuple[Any, ...]] = defaultdict(
            tuple
        )
        for type_, encoder in type_encoder_map.items():
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sun Mar 15 11:44:39 GMT 2026
    - 10.9K bytes
    - Click Count (0)
  2. fastapi/param_functions.py

                The parameter is available only for compatibility.
                """
            ),
        ] = ...,
        *,
        default_factory: Annotated[
            Callable[[], Any] | None,
            Doc(
                """
                A callable to generate the default value.
    
                This doesn't affect `Path` parameters as the value is always required.
                The parameter is available only for compatibility.
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sun Mar 15 11:44:39 GMT 2026
    - 68K bytes
    - Click Count (0)
  3. guava-tests/test/com/google/common/util/concurrent/ListeningScheduledExecutorServiceTest.java

        assertThat(Duration.ofNanos(recordedDelay)).isEqualTo(Duration.ofSeconds(12));
      }
    
      public void testScheduleCallable() throws Exception {
        Callable<String> callable = () -> "hello";
    
        ListenableScheduledFuture<String> future =
            executorService.schedule(callable, Duration.ofMinutes(12));
    
        assertThat(future.get()).isEqualTo("hello");
        assertThat(recordedTimeUnit).isEqualTo(NANOSECONDS);
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Sat Mar 07 02:20:33 GMT 2026
    - 6.5K bytes
    - Click Count (0)
  4. docs/en/docs/tutorial/dependencies/classes-as-dependencies.md

    So, a Python class is also a **callable**.
    
    Then, in **FastAPI**, you could use a Python class as a dependency.
    
    What FastAPI actually checks is that it is a "callable" (function, class or anything else) and the parameters defined.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Wed Feb 11 18:32:12 GMT 2026
    - 6.8K bytes
    - Click Count (0)
  5. guava-tests/test/com/google/common/util/concurrent/AbstractFutureTest.java

        Callable<@Nullable Void> completeSuccessfullyRunnable =
            () -> {
              if (currentFuture.get().set("set")) {
                numSuccessfulSetCalls.incrementAndGet();
              }
              awaitUnchecked(barrier);
              return null;
            };
        Callable<@Nullable Void> completeExceptionallyRunnable =
            new Callable<@Nullable Void>() {
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 22:45:21 GMT 2026
    - 45.2K bytes
    - Click Count (0)
  6. android/guava-tests/test/com/google/common/util/concurrent/AbstractFutureTest.java

        Callable<@Nullable Void> completeSuccessfullyRunnable =
            () -> {
              if (currentFuture.get().set("set")) {
                numSuccessfulSetCalls.incrementAndGet();
              }
              awaitUnchecked(barrier);
              return null;
            };
        Callable<@Nullable Void> completeExceptionallyRunnable =
            new Callable<@Nullable Void>() {
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 22:45:21 GMT 2026
    - 45.2K bytes
    - Click Count (0)
  7. fastapi/routing.py

    # dependencies' AsyncExitStack
    def request_response(
        func: Callable[[Request], Awaitable[Response] | Response],
    ) -> ASGIApp:
        """
        Takes a function or coroutine `func(request) -> response`,
        and returns an ASGI application.
        """
        f: Callable[[Request], Awaitable[Response]] = (
            func  # type: ignore[assignment]  # ty: ignore[unused-ignore-comment]
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sun Mar 15 11:44:39 GMT 2026
    - 193K bytes
    - Click Count (0)
  8. impl/maven-core/src/main/java/org/apache/maven/lifecycle/internal/builder/multithreaded/MultiThreadedBuilder.java

    import javax.inject.Inject;
    import javax.inject.Named;
    import javax.inject.Singleton;
    
    import java.util.List;
    import java.util.Map;
    import java.util.Set;
    import java.util.concurrent.Callable;
    import java.util.concurrent.CompletionService;
    import java.util.concurrent.ExecutionException;
    import java.util.concurrent.ExecutorCompletionService;
    import java.util.concurrent.ExecutorService;
    Created: Sun Apr 05 03:35:12 GMT 2026
    - Last Modified: Wed Jul 16 03:42:09 GMT 2025
    - 8.9K bytes
    - Click Count (0)
  9. docs/zh-hant/docs/tutorial/dependencies/classes-as-dependencies.md

    ```
    
    在這個例子中,`fluffy` 是 `Cat` 類別的一個實例。
    
    而要建立 `fluffy`,你其實是在「呼叫」`Cat`。
    
    所以,Python 類別本身也是一種 **callable**。
    
    因此,在 **FastAPI** 中,你可以將 Python 類別作為相依性。
    
    FastAPI 其實檢查的是它是否為「callable」(函式、類別或其他),以及它所定義的參數。
    
    如果你在 **FastAPI** 中傳入一個「callable」作為相依性,FastAPI 會分析該「callable」的參數,並以與路徑操作函式參數相同的方式來處理它們,包括子相依性。
    
    這也適用於完全沒有參數的 callable,就和沒有參數的路徑操作函式一樣。
    
    接著,我們可以把上面的相依項(dependable)`common_parameters` 改成類別 `CommonQueryParams`:
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sat Feb 14 08:15:26 GMT 2026
    - 6.7K bytes
    - Click Count (0)
  10. android/guava/src/com/google/common/util/concurrent/MoreExecutors.java

        checkNotNull(service);
        checkNotNull(nameSupplier);
        return new WrappingExecutorService(service) {
          @Override
          protected <T extends @Nullable Object> Callable<T> wrapTask(Callable<T> callable) {
            return threadRenaming(callable, nameSupplier);
          }
    
          @Override
          protected Runnable wrapTask(Runnable command) {
            return threadRenaming(command, nameSupplier);
          }
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Wed Jan 28 22:39:02 GMT 2026
    - 45.6K bytes
    - Click Count (0)
Back to Top