Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for dt_field (0.12 sec)

  1. tests/test_jsonable_encoder.py

            class Config:
                pass
    
        model = ModelWithCustomEncoder(dt_field=datetime(2019, 1, 1, 8))
        assert jsonable_encoder(model) == {"dt_field": "2019-01-01T08:00:00+00:00"}
        subclass_model = ModelWithCustomEncoderSubclass(dt_field=datetime(2019, 1, 1, 8))
        assert jsonable_encoder(subclass_model) == {"dt_field": "2019-01-01T08:00:00+00:00"}
    
    
    def test_encode_model_with_config():
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Apr 18 21:56:59 UTC 2024
    - 9K bytes
    - Viewed (0)
  2. tests/test_datetime_custom_encoder.py

        class ModelWithDatetimeField(BaseModel):
            dt_field: datetime
    
            @field_serializer("dt_field")
            def serialize_datetime(self, dt_field: datetime):
                return dt_field.replace(microsecond=0, tzinfo=timezone.utc).isoformat()
    
        app = FastAPI()
        model = ModelWithDatetimeField(dt_field=datetime(2019, 1, 1, 8))
    
        @app.get("/model", response_model=ModelWithDatetimeField)
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 1.6K bytes
    - Viewed (0)
  3. build-logic/binary-compatibility/src/main/groovy/gradlebuild/binarycompatibility/filters/KotlinInternalFilter.groovy

    import javassist.CtClass
    import javassist.CtField
    
    /**
     * Matches Kotlin <code>internal</code> members.
     */
    class KotlinInternalFilter implements ClassFilter, FieldFilter, BehaviorFilter {
    
        @Override
        boolean matches(CtClass ctClass) {
            return KotlinMetadataQueries.INSTANCE.isKotlinInternal(ctClass)
        }
    
        @Override
        boolean matches(CtField ctField) {
    Registered: Wed Nov 06 11:36:14 UTC 2024
    - Last Modified: Wed Dec 09 08:14:05 UTC 2020
    - 1.4K bytes
    - Viewed (0)
  4. build-logic/binary-compatibility/src/main/groovy/gradlebuild/binarycompatibility/rules/NullabilityBreakingChangesRule.groovy

                    }
                }
            }
    
            if (member instanceof JApiField) {
    
                JApiField field = (JApiField) member
                CtField oldField = field.oldFieldOptional.get()
                CtField newField = field.newFieldOptional.get()
    
                def oldNullability = hasNullableAnnotation(oldField)
                def newNullability = hasNullableAnnotation(newField)
    
    Registered: Wed Nov 06 11:36:14 UTC 2024
    - Last Modified: Sat Apr 13 10:04:28 UTC 2024
    - 5.4K bytes
    - Viewed (0)
  5. build-logic/binary-compatibility/src/main/kotlin/gradlebuild/binarycompatibility/metadata/KotlinMetadataQueries.kt

    import gradlebuild.binarycompatibility.intValue
    import gradlebuild.binarycompatibility.stringArrayValue
    import gradlebuild.binarycompatibility.stringValue
    import javassist.CtClass
    import javassist.CtConstructor
    import javassist.CtField
    import javassist.CtMember
    import javassist.CtMethod
    import javassist.Modifier
    import javassist.bytecode.annotation.Annotation
    import javassist.bytecode.annotation.AnnotationImpl
    import kotlinx.metadata.KmFunction
    Registered: Wed Nov 06 11:36:14 UTC 2024
    - Last Modified: Wed Aug 21 12:41:59 UTC 2024
    - 4.8K bytes
    - Viewed (0)
Back to top