Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 185 for issubclass (0.06 seconds)

  1. fastapi/_compat/shared.py

    def lenient_issubclass(
        cls: Any, class_or_tuple: type[_T] | tuple[type[_T], ...] | None
    ) -> TypeGuard[type[_T]]:
        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
    
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Wed Feb 11 18:32:12 GMT 2026
    - 6.9K bytes
    - Click Count (0)
  2. 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]
    
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sun Mar 15 11:44:39 GMT 2026
    - 16.7K bytes
    - Click Count (0)
  3. 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
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sun Feb 08 10:18:38 GMT 2026
    - 75K bytes
    - Click Count (0)
  4. tests/test_include_router_defaults_overrides.py

    
    def test_openapi():
        client = TestClient(app)
        with warnings.catch_warnings(record=True) as w:
            warnings.simplefilter("always")
            response = client.get("/openapi.json")
            assert issubclass(w[-1].category, UserWarning)
            assert "Duplicate Operation ID" in str(w[-1].message)
        assert response.json() == snapshot(
            {
                "openapi": "3.1.0",
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sun Feb 08 10:18:38 GMT 2026
    - 385.6K bytes
    - Click Count (0)
  5. guava-tests/test/com/google/common/eventbus/outside/AnnotatedAndAbstractInSuperclassTest.java

    import com.google.common.eventbus.Subscribe;
    import com.google.common.eventbus.outside.AnnotatedAndAbstractInSuperclassTest.SubClass;
    import java.util.ArrayList;
    import java.util.List;
    
    public class AnnotatedAndAbstractInSuperclassTest extends AbstractEventBusTest<SubClass> {
      abstract static class SuperClass {
        @Subscribe
        public abstract void overriddenAndAnnotatedInSubclass(Object o);
    
        @Subscribe
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Tue May 13 17:27:14 GMT 2025
    - 2K bytes
    - Click Count (0)
  6. guava-tests/test/com/google/common/eventbus/outside/NeitherAbstractNorAnnotatedInSuperclassTest.java

    import com.google.common.eventbus.Subscribe;
    import com.google.common.eventbus.outside.NeitherAbstractNorAnnotatedInSuperclassTest.SubClass;
    import java.util.ArrayList;
    import java.util.List;
    
    public class NeitherAbstractNorAnnotatedInSuperclassTest extends AbstractEventBusTest<SubClass> {
      static class SuperClass {
        final List<Object> neitherOverriddenNorAnnotatedEvents = new ArrayList<>();
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Tue May 13 17:27:14 GMT 2025
    - 2.6K bytes
    - Click Count (0)
  7. android/guava-tests/test/com/google/common/eventbus/outside/AnnotatedNotAbstractInSuperclassTest.java

    import com.google.common.eventbus.Subscribe;
    import com.google.common.eventbus.outside.AnnotatedNotAbstractInSuperclassTest.SubClass;
    import java.util.ArrayList;
    import java.util.List;
    
    public class AnnotatedNotAbstractInSuperclassTest extends AbstractEventBusTest<SubClass> {
      static class SuperClass {
        final List<Object> notOverriddenInSubclassEvents = new ArrayList<>();
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Tue May 13 17:27:14 GMT 2025
    - 4.2K bytes
    - Click Count (0)
  8. android/guava-tests/test/com/google/common/eventbus/outside/NeitherAbstractNorAnnotatedInSuperclassTest.java

    import com.google.common.eventbus.Subscribe;
    import com.google.common.eventbus.outside.NeitherAbstractNorAnnotatedInSuperclassTest.SubClass;
    import java.util.ArrayList;
    import java.util.List;
    
    public class NeitherAbstractNorAnnotatedInSuperclassTest extends AbstractEventBusTest<SubClass> {
      static class SuperClass {
        final List<Object> neitherOverriddenNorAnnotatedEvents = new ArrayList<>();
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Tue May 13 17:27:14 GMT 2025
    - 2.6K bytes
    - Click Count (0)
  9. android/guava/src/com/google/common/reflect/TypeToken.java

      }
    
      private Type resolveTypeArgsForSubclass(Class<?> subclass) {
        // If both runtimeType and subclass are not parameterized, return subclass
        // If runtimeType is not parameterized but subclass is, process subclass as a parameterized type
        // If runtimeType is a raw type (i.e. is a parameterized type specified as a Class<?>), we
        // return subclass as a raw type
        if (runtimeType instanceof Class
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Jan 29 22:14:05 GMT 2026
    - 53.8K bytes
    - Click Count (0)
  10. 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);
    
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Tue May 13 17:27:14 GMT 2025
    - 2K bytes
    - Click Count (0)
Back to Top