Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 104 for issubclass (0.04 sec)

  1. fastapi/_compat/shared.py

    
    # Copy of Pydantic v2, compatible with v1
    def lenient_issubclass(
        cls: Any, class_or_tuple: Union[type[Any], tuple[type[Any], ...], None]
    ) -> bool:
        try:
            return isinstance(cls, type) and issubclass(cls, class_or_tuple)  # type: ignore[arg-type]
        except TypeError:  # pragma: no cover
            if isinstance(cls, WithArgsTypes):
                return False
            raise  # pragma: no cover
    
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 6.7K bytes
    - Viewed (0)
  2. tests/test_generate_unique_id_function.py

            warnings.simplefilter("always")
            client.get("/openapi.json")
            assert len(w) >= 2
            duplicate_warnings = [
                warning for warning in w if issubclass(warning.category, UserWarning)
            ]
            assert len(duplicate_warnings) > 0
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 21:25:59 UTC 2025
    - 66.7K bytes
    - Viewed (0)
  3. fastapi/_compat/v2.py

            for union_arg in union_args:
                if union_arg is type(None):
                    continue
                origin_type = get_origin(union_arg) or union_arg
                break
        assert issubclass(origin_type, shared.sequence_types)  # type: ignore[arg-type]
        return shared.sequence_annotation_to_type[origin_type](value)  # type: ignore[no-any-return,index]
    
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 19.1K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/eventbus/outside/AbstractNotAnnotatedInSuperclassTest.java

    import com.google.common.eventbus.Subscribe;
    import com.google.common.eventbus.outside.AbstractNotAnnotatedInSuperclassTest.SubClass;
    import java.util.ArrayList;
    import java.util.List;
    
    public class AbstractNotAnnotatedInSuperclassTest extends AbstractEventBusTest<SubClass> {
      abstract static class SuperClass {
        public abstract void overriddenInSubclassNowhereAnnotated(Object o);
    
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Tue May 13 17:27:14 UTC 2025
    - 2K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/eventbus/outside/AbstractNotAnnotatedInSuperclassTest.java

    import com.google.common.eventbus.Subscribe;
    import com.google.common.eventbus.outside.AbstractNotAnnotatedInSuperclassTest.SubClass;
    import java.util.ArrayList;
    import java.util.List;
    
    public class AbstractNotAnnotatedInSuperclassTest extends AbstractEventBusTest<SubClass> {
      abstract static class SuperClass {
        public abstract void overriddenInSubclassNowhereAnnotated(Object o);
    
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Tue May 13 17:27:14 UTC 2025
    - 2K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/reflect/SubtypeTester.java

            // The raw class isn't even a subclass.
          }
        }
        if (!spec.suppressGetSupertype()) {
          try {
            assertThat(getSupertype(paramType, TypeToken.of(returnType).getRawType()))
                .isNotEqualTo(returnType);
          } catch (IllegalArgumentException notSubtype2) {
            // The raw class isn't even a subclass.
          }
        }
        return null;
      }
    
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Tue Nov 25 23:29:58 UTC 2025
    - 6.2K bytes
    - Viewed (0)
  7. docs/en/docs/tutorial/response-model.md

    And tools will also be happy because both `RedirectResponse` and `JSONResponse` are subclasses of `Response`, so the type annotation is correct.
    
    ### Annotate a Response Subclass { #annotate-a-response-subclass }
    
    You can also use a subclass of `Response` in the type annotation:
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 20 15:55:38 UTC 2025
    - 15.5K bytes
    - Viewed (0)
  8. docs/en/docs/tutorial/body-fields.md

    /// note | Technical Details
    
    Actually, `Query`, `Path` and others you'll see next create objects of subclasses of a common `Param` class, which is itself a subclass of Pydantic's `FieldInfo` class.
    
    And Pydantic's `Field` returns an instance of `FieldInfo` as well.
    
    `Body` also returns objects of a subclass of `FieldInfo` directly. And there are others you will see later that are subclasses of the `Body` class.
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sun Aug 31 09:15:41 UTC 2025
    - 2.3K bytes
    - Viewed (0)
  9. docs/en/docs/how-to/custom-request-and-route.md

    * Automatically logging all request bodies.
    
    ## Handling custom request body encodings { #handling-custom-request-body-encodings }
    
    Let's see how to make use of a custom `Request` subclass to decompress gzip requests.
    
    And an `APIRoute` subclass to use that custom request class.
    
    ### Create a custom `GzipRequest` class { #create-a-custom-gziprequest-class }
    
    /// tip
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 10 08:55:32 UTC 2025
    - 4.6K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/reflect/SubtypeTester.java

            // The raw class isn't even a subclass.
          }
        }
        if (!spec.suppressGetSupertype()) {
          try {
            assertThat(getSupertype(paramType, TypeToken.of(returnType).getRawType()))
                .isNotEqualTo(returnType);
          } catch (IllegalArgumentException notSubtype2) {
            // The raw class isn't even a subclass.
          }
        }
        return null;
      }
    
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Tue Nov 25 23:29:58 UTC 2025
    - 6.2K bytes
    - Viewed (0)
Back to top