Server Test Python

Server Test Python

rev. 000b37a512bd3be1a17b4f3d5bf60e5446dbc2dd (ignoring whitespace)

Files changed:

tmp-codegen-diff/codegen-server-test-python/constraints/rust-server-codegen-python/src/unconstrained.rs

@@ -113,113 +173,175 @@
  133    133   
                        }
  134    134   
                    }
  135    135   
    impl std::convert::TryFrom<ListOfLengthPatternStringUnconstrained> for crate::constrained::list_of_length_pattern_string_constrained::ListOfLengthPatternStringConstrained {
  136    136   
        type Error = crate::model::list_of_length_pattern_string_internal::ConstraintViolation;
  137    137   
        fn try_from(value: ListOfLengthPatternStringUnconstrained) -> Result<Self, Self::Error> {
  138    138   
            let res: Result<::std::vec::Vec<crate::model::LengthPatternString>, (usize, crate::model::length_pattern_string_internal::ConstraintViolation) > = value
  139    139   
                                        .0
  140    140   
                                        .into_iter()
  141    141   
                                        .enumerate()
  142    142   
                                        .map(|(idx, inner)| {
  143         -
                                            inner.try_into().map_err(|inner_violation| (idx, inner_violation))
         143  +
                                            inner.try_into()
         144  +
                                                    
         145  +
                                                    .map_err(|inner_violation| (idx, inner_violation))
  144    146   
                                        })
  145    147   
                                        .collect();
  146    148   
                                    let inner = res
  147    149   
                                        
  148    150   
                                        .map_err(|(idx, inner_violation)| Self::Error::Member(idx, inner_violation))?;
  149    151   
            Ok(Self(inner))
  150    152   
        }
  151    153   
    }
  152    154   
}
  153    155   
pub(crate) mod map_of_length_pattern_string_unconstrained {
@@ -629,631 +689,693 @@
  649    651   
    impl std::convert::TryFrom<RecursiveListUnconstrained>
  650    652   
        for crate::constrained::recursive_list_constrained::RecursiveListConstrained
  651    653   
    {
  652    654   
        type Error = crate::model::recursive_list_internal::ConstraintViolation;
  653    655   
        fn try_from(value: RecursiveListUnconstrained) -> Result<Self, Self::Error> {
  654    656   
            let res: Result<::std::vec::Vec<crate::model::RecursiveShapesInputOutputNested1>, (usize, crate::model::recursive_shapes_input_output_nested1_internal::ConstraintViolation) > = value
  655    657   
                                        .0
  656    658   
                                        .into_iter()
  657    659   
                                        .enumerate()
  658    660   
                                        .map(|(idx, inner)| {
  659         -
                                            inner.try_into().map_err(|inner_violation| (idx, inner_violation))
         661  +
                                            inner.try_into()
         662  +
                                                    
         663  +
                                                    .map_err(|inner_violation| (idx, inner_violation))
  660    664   
                                        })
  661    665   
                                        .collect();
  662    666   
            let inner =
  663    667   
                res.map_err(|(idx, inner_violation)| Self::Error::Member(idx, inner_violation))?;
  664    668   
            Ok(Self(inner))
  665    669   
        }
  666    670   
    }
  667    671   
}
  668    672   
pub(crate) mod length_set_of_pattern_string_unconstrained {
  669    673   

tmp-codegen-diff/codegen-server-test-python/constraints_without_public_constrained_types/rust-server-codegen-python/src/unconstrained.rs

@@ -113,113 +173,175 @@
  133    133   
                        }
  134    134   
                    }
  135    135   
    impl std::convert::TryFrom<ListOfLengthPatternStringUnconstrained> for crate::constrained::list_of_length_pattern_string_constrained::ListOfLengthPatternStringConstrained {
  136    136   
        type Error = crate::model::list_of_length_pattern_string_internal::ConstraintViolation;
  137    137   
        fn try_from(value: ListOfLengthPatternStringUnconstrained) -> Result<Self, Self::Error> {
  138    138   
            let res: Result<::std::vec::Vec<crate::model::LengthPatternString>, (usize, crate::model::length_pattern_string_internal::ConstraintViolation) > = value
  139    139   
                                        .0
  140    140   
                                        .into_iter()
  141    141   
                                        .enumerate()
  142    142   
                                        .map(|(idx, inner)| {
  143         -
                                            inner.try_into().map_err(|inner_violation| (idx, inner_violation))
         143  +
                                            inner.try_into()
         144  +
                                                    
         145  +
                                                    .map_err(|inner_violation| (idx, inner_violation))
  144    146   
                                        })
  145    147   
                                        .collect();
  146    148   
                                    let inner = res
  147    149   
                                        
  148    150   
                                        .map_err(|(idx, inner_violation)| Self::Error::Member(idx, inner_violation))?;
  149    151   
            Ok(Self(inner))
  150    152   
        }
  151    153   
    }
  152    154   
}
  153    155   
pub(crate) mod map_of_length_pattern_string_unconstrained {
@@ -629,631 +689,693 @@
  649    651   
    impl std::convert::TryFrom<RecursiveListUnconstrained>
  650    652   
        for crate::constrained::recursive_list_constrained::RecursiveListConstrained
  651    653   
    {
  652    654   
        type Error = crate::model::recursive_list_internal::ConstraintViolation;
  653    655   
        fn try_from(value: RecursiveListUnconstrained) -> Result<Self, Self::Error> {
  654    656   
            let res: Result<::std::vec::Vec<crate::model::RecursiveShapesInputOutputNested1>, (usize, crate::model::recursive_shapes_input_output_nested1_internal::ConstraintViolation) > = value
  655    657   
                                        .0
  656    658   
                                        .into_iter()
  657    659   
                                        .enumerate()
  658    660   
                                        .map(|(idx, inner)| {
  659         -
                                            inner.try_into().map_err(|inner_violation| (idx, inner_violation))
         661  +
                                            inner.try_into()
         662  +
                                                    
         663  +
                                                    .map_err(|inner_violation| (idx, inner_violation))
  660    664   
                                        })
  661    665   
                                        .collect();
  662    666   
            let inner =
  663    667   
                res.map_err(|(idx, inner_violation)| Self::Error::Member(idx, inner_violation))?;
  664    668   
            Ok(Self(inner))
  665    669   
        }
  666    670   
    }
  667    671   
}
  668    672   
pub(crate) mod length_set_of_pattern_string_unconstrained {
  669    673