File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -169,16 +169,16 @@ class definition (after the imports at the top) and injecting a comment and then
169169 )
170170
171171 if "AwareDatetime" in file_content or "date" in file_content :
172- newline = "\n "
172+ nl = "\n "
173173 if "\r \n " in file_content :
174- newline = "\r \n "
174+ nl = "\r \n "
175175
176- parts = file_content .partition (f"{ newline } { newline } class " )
176+ parts = file_content .partition (f"{ nl } { nl } class " )
177177 file_content = (
178- f"{ parts [0 ]} { newline } "
179- f"{ comment } { newline } "
180- f"{ import_strict_date_time } { newline } "
181- f"{ import_strict_date } { newline } "
178+ f"{ parts [0 ]} { nl } "
179+ f"{ comment } { nl } "
180+ f"{ import_strict_date_time } { nl } "
181+ f"{ import_strict_date } { nl } "
182182 f"{ parts [1 ]} { parts [2 ]} "
183183 )
184184
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ def strict_datetime_validator(value: Any) -> str:
2929
3030 raise PydanticCustomError (
3131 "datetime_type" ,
32- "Input should be a valid datetime, input is not a string" ,
32+ "Input should be a valid datetime in RFC 3339 format , input is not a string" ,
3333 {"error" : "input not string" },
3434 )
3535
@@ -62,7 +62,7 @@ def strict_date_validator(value: Any) -> str:
6262
6363 raise PydanticCustomError (
6464 "date_type" ,
65- "Input should be a valid date, input is not a string" ,
65+ "Input should be a valid date in RFC3339 'full-date' format , input is not a string" ,
6666 {"error" : "input not string" },
6767 )
6868
You can’t perform that action at this time.
0 commit comments