- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 92 for issubclass (0.07 seconds)
-
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) -
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) -
tests/test_generate_unique_id_function.py
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Feb 08 10:18:38 GMT 2026 - 75K bytes - Click Count (0) -
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) -
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) -
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; }
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Tue Mar 17 16:11:48 GMT 2026 - 6.1K bytes - Click Count (0) -
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:Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 05 18:13:19 GMT 2026 - 15.5K bytes - Click Count (0) -
src/test/java/org/codelibs/fess/exception/UserRoleLoginExceptionTest.java
public class UserRoleLoginExceptionTest extends UnitFessTestCase { // Mock subclass of RootAction for testing generic type safety private static class TestAction extends RootAction { // Test subclass } // Another mock subclass for testing private static class AdminAction extends RootAction { // Test admin subclass } @Test public void test_constructor() {Created: Tue Mar 31 13:07:34 GMT 2026 - Last Modified: Fri Mar 13 23:01:26 GMT 2026 - 11K bytes - Click Count (0) -
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 } /// tipCreated: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 05 18:13:19 GMT 2026 - 4.4K bytes - Click Count (0) -
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; }
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Tue Mar 17 16:11:48 GMT 2026 - 6.1K bytes - Click Count (0)