@@ -21,7 +21,7 @@ use super::{
2121
2222impl < ' a > Input < ' a > for JsonInput {
2323 /// This is required by since JSON object keys are always strings, I don't think it can be called
24- #[ cfg_attr( has_no_coverage , no_coverage ) ]
24+ #[ cfg_attr( has_coverage_attribute , coverage ( off ) ) ]
2525 fn as_loc_item ( & self ) -> LocItem {
2626 match self {
2727 JsonInput :: Int ( i) => ( * i) . into ( ) ,
@@ -102,7 +102,7 @@ impl<'a> Input<'a> for JsonInput {
102102 _ => Err ( ValError :: new ( ErrorTypeDefaults :: BytesType , self ) ) ,
103103 }
104104 }
105- #[ cfg_attr( has_no_coverage , no_coverage ) ]
105+ #[ cfg_attr( has_coverage_attribute , coverage ( off ) ) ]
106106 fn strict_bytes ( & ' a self ) -> ValResult < EitherBytes < ' a > > {
107107 self . validate_bytes ( false )
108108 }
@@ -196,7 +196,7 @@ impl<'a> Input<'a> for JsonInput {
196196 _ => Err ( ValError :: new ( ErrorTypeDefaults :: DictType , self ) ) ,
197197 }
198198 }
199- #[ cfg_attr( has_no_coverage , no_coverage ) ]
199+ #[ cfg_attr( has_coverage_attribute , coverage ( off ) ) ]
200200 fn strict_dict ( & ' a self ) -> ValResult < GenericMapping < ' a > > {
201201 self . validate_dict ( false )
202202 }
@@ -207,7 +207,7 @@ impl<'a> Input<'a> for JsonInput {
207207 _ => Err ( ValError :: new ( ErrorTypeDefaults :: ListType , self ) ) ,
208208 }
209209 }
210- #[ cfg_attr( has_no_coverage , no_coverage ) ]
210+ #[ cfg_attr( has_coverage_attribute , coverage ( off ) ) ]
211211 fn strict_list ( & ' a self ) -> ValResult < GenericIterable < ' a > > {
212212 self . validate_list ( false )
213213 }
@@ -219,7 +219,7 @@ impl<'a> Input<'a> for JsonInput {
219219 _ => Err ( ValError :: new ( ErrorTypeDefaults :: TupleType , self ) ) ,
220220 }
221221 }
222- #[ cfg_attr( has_no_coverage , no_coverage ) ]
222+ #[ cfg_attr( has_coverage_attribute , coverage ( off ) ) ]
223223 fn strict_tuple ( & ' a self ) -> ValResult < GenericIterable < ' a > > {
224224 self . validate_tuple ( false )
225225 }
@@ -231,7 +231,7 @@ impl<'a> Input<'a> for JsonInput {
231231 _ => Err ( ValError :: new ( ErrorTypeDefaults :: SetType , self ) ) ,
232232 }
233233 }
234- #[ cfg_attr( has_no_coverage , no_coverage ) ]
234+ #[ cfg_attr( has_coverage_attribute , coverage ( off ) ) ]
235235 fn strict_set ( & ' a self ) -> ValResult < GenericIterable < ' a > > {
236236 self . validate_set ( false )
237237 }
@@ -243,7 +243,7 @@ impl<'a> Input<'a> for JsonInput {
243243 _ => Err ( ValError :: new ( ErrorTypeDefaults :: FrozenSetType , self ) ) ,
244244 }
245245 }
246- #[ cfg_attr( has_no_coverage , no_coverage ) ]
246+ #[ cfg_attr( has_coverage_attribute , coverage ( off ) ) ]
247247 fn strict_frozenset ( & ' a self ) -> ValResult < GenericIterable < ' a > > {
248248 self . validate_frozenset ( false )
249249 }
@@ -278,7 +278,7 @@ impl<'a> Input<'a> for JsonInput {
278278 }
279279 // NO custom `lax_date` implementation, if strict_date fails, the validator will fallback to lax_datetime
280280 // then check there's no remainder
281- #[ cfg_attr( has_no_coverage , no_coverage ) ]
281+ #[ cfg_attr( has_coverage_attribute , coverage ( off ) ) ]
282282 fn strict_date ( & self ) -> ValResult < EitherDate > {
283283 self . validate_date ( false )
284284 }
@@ -365,7 +365,7 @@ impl<'a> Input<'a> for String {
365365 InputValue :: String ( self )
366366 }
367367
368- #[ cfg_attr( has_no_coverage , no_coverage ) ]
368+ #[ cfg_attr( has_coverage_attribute , coverage ( off ) ) ]
369369 fn is_none ( & self ) -> bool {
370370 false
371371 }
@@ -374,12 +374,12 @@ impl<'a> Input<'a> for String {
374374 None
375375 }
376376
377- #[ cfg_attr( has_no_coverage , no_coverage ) ]
377+ #[ cfg_attr( has_coverage_attribute , coverage ( off ) ) ]
378378 fn validate_args ( & ' a self ) -> ValResult < ' a , GenericArguments < ' a > > {
379379 Err ( ValError :: new ( ErrorTypeDefaults :: ArgumentsType , self ) )
380380 }
381381
382- #[ cfg_attr( has_no_coverage , no_coverage ) ]
382+ #[ cfg_attr( has_coverage_attribute , coverage ( off ) ) ]
383383 fn validate_dataclass_args ( & ' a self , class_name : & str ) -> ValResult < ' a , GenericArguments < ' a > > {
384384 let class_name = class_name. to_string ( ) ;
385385 Err ( ValError :: new (
@@ -405,7 +405,7 @@ impl<'a> Input<'a> for String {
405405 fn validate_bytes ( & ' a self , _strict : bool ) -> ValResult < EitherBytes < ' a > > {
406406 Ok ( self . as_bytes ( ) . into ( ) )
407407 }
408- #[ cfg_attr( has_no_coverage , no_coverage ) ]
408+ #[ cfg_attr( has_coverage_attribute , coverage ( off ) ) ]
409409 fn strict_bytes ( & ' a self ) -> ValResult < EitherBytes < ' a > > {
410410 self . validate_bytes ( false )
411411 }
@@ -427,11 +427,11 @@ impl<'a> Input<'a> for String {
427427 }
428428 }
429429
430- #[ cfg_attr( has_no_coverage , no_coverage ) ]
430+ #[ cfg_attr( has_coverage_attribute , coverage ( off ) ) ]
431431 fn ultra_strict_float ( & ' a self ) -> ValResult < EitherFloat < ' a > > {
432432 self . strict_float ( )
433433 }
434- #[ cfg_attr( has_no_coverage , no_coverage ) ]
434+ #[ cfg_attr( has_coverage_attribute , coverage ( off ) ) ]
435435 fn strict_float ( & ' a self ) -> ValResult < EitherFloat < ' a > > {
436436 Err ( ValError :: new ( ErrorTypeDefaults :: FloatType , self ) )
437437 }
@@ -443,47 +443,47 @@ impl<'a> Input<'a> for String {
443443 create_decimal ( self . to_object ( py) . into_ref ( py) , self , py)
444444 }
445445
446- #[ cfg_attr( has_no_coverage , no_coverage ) ]
446+ #[ cfg_attr( has_coverage_attribute , coverage ( off ) ) ]
447447 fn validate_dict ( & ' a self , _strict : bool ) -> ValResult < GenericMapping < ' a > > {
448448 Err ( ValError :: new ( ErrorTypeDefaults :: DictType , self ) )
449449 }
450- #[ cfg_attr( has_no_coverage , no_coverage ) ]
450+ #[ cfg_attr( has_coverage_attribute , coverage ( off ) ) ]
451451 fn strict_dict ( & ' a self ) -> ValResult < GenericMapping < ' a > > {
452452 self . validate_dict ( false )
453453 }
454454
455- #[ cfg_attr( has_no_coverage , no_coverage ) ]
455+ #[ cfg_attr( has_coverage_attribute , coverage ( off ) ) ]
456456 fn validate_list ( & ' a self , _strict : bool ) -> ValResult < GenericIterable < ' a > > {
457457 Err ( ValError :: new ( ErrorTypeDefaults :: ListType , self ) )
458458 }
459- #[ cfg_attr( has_no_coverage , no_coverage ) ]
459+ #[ cfg_attr( has_coverage_attribute , coverage ( off ) ) ]
460460 fn strict_list ( & ' a self ) -> ValResult < GenericIterable < ' a > > {
461461 self . validate_list ( false )
462462 }
463463
464- #[ cfg_attr( has_no_coverage , no_coverage ) ]
464+ #[ cfg_attr( has_coverage_attribute , coverage ( off ) ) ]
465465 fn validate_tuple ( & ' a self , _strict : bool ) -> ValResult < GenericIterable < ' a > > {
466466 Err ( ValError :: new ( ErrorTypeDefaults :: TupleType , self ) )
467467 }
468- #[ cfg_attr( has_no_coverage , no_coverage ) ]
468+ #[ cfg_attr( has_coverage_attribute , coverage ( off ) ) ]
469469 fn strict_tuple ( & ' a self ) -> ValResult < GenericIterable < ' a > > {
470470 self . validate_tuple ( false )
471471 }
472472
473- #[ cfg_attr( has_no_coverage , no_coverage ) ]
473+ #[ cfg_attr( has_coverage_attribute , coverage ( off ) ) ]
474474 fn validate_set ( & ' a self , _strict : bool ) -> ValResult < GenericIterable < ' a > > {
475475 Err ( ValError :: new ( ErrorTypeDefaults :: SetType , self ) )
476476 }
477- #[ cfg_attr( has_no_coverage , no_coverage ) ]
477+ #[ cfg_attr( has_coverage_attribute , coverage ( off ) ) ]
478478 fn strict_set ( & ' a self ) -> ValResult < GenericIterable < ' a > > {
479479 self . validate_set ( false )
480480 }
481481
482- #[ cfg_attr( has_no_coverage , no_coverage ) ]
482+ #[ cfg_attr( has_coverage_attribute , coverage ( off ) ) ]
483483 fn validate_frozenset ( & ' a self , _strict : bool ) -> ValResult < GenericIterable < ' a > > {
484484 Err ( ValError :: new ( ErrorTypeDefaults :: FrozenSetType , self ) )
485485 }
486- #[ cfg_attr( has_no_coverage , no_coverage ) ]
486+ #[ cfg_attr( has_coverage_attribute , coverage ( off ) ) ]
487487 fn strict_frozenset ( & ' a self ) -> ValResult < GenericIterable < ' a > > {
488488 self . validate_frozenset ( false )
489489 }
@@ -499,7 +499,7 @@ impl<'a> Input<'a> for String {
499499 fn validate_date ( & self , _strict : bool ) -> ValResult < EitherDate > {
500500 bytes_as_date ( self , self . as_bytes ( ) )
501501 }
502- #[ cfg_attr( has_no_coverage , no_coverage ) ]
502+ #[ cfg_attr( has_coverage_attribute , coverage ( off ) ) ]
503503 fn strict_date ( & self ) -> ValResult < EitherDate > {
504504 self . validate_date ( false )
505505 }
@@ -511,7 +511,7 @@ impl<'a> Input<'a> for String {
511511 ) -> ValResult < EitherTime > {
512512 bytes_as_time ( self , self . as_bytes ( ) , microseconds_overflow_behavior)
513513 }
514- #[ cfg_attr( has_no_coverage , no_coverage ) ]
514+ #[ cfg_attr( has_coverage_attribute , coverage ( off ) ) ]
515515 fn strict_time (
516516 & self ,
517517 microseconds_overflow_behavior : speedate:: MicrosecondsPrecisionOverflowBehavior ,
@@ -526,7 +526,7 @@ impl<'a> Input<'a> for String {
526526 ) -> ValResult < EitherDateTime > {
527527 bytes_as_datetime ( self , self . as_bytes ( ) , microseconds_overflow_behavior)
528528 }
529- #[ cfg_attr( has_no_coverage , no_coverage ) ]
529+ #[ cfg_attr( has_coverage_attribute , coverage ( off ) ) ]
530530 fn strict_datetime (
531531 & self ,
532532 microseconds_overflow_behavior : speedate:: MicrosecondsPrecisionOverflowBehavior ,
@@ -541,7 +541,7 @@ impl<'a> Input<'a> for String {
541541 ) -> ValResult < EitherTimedelta > {
542542 bytes_as_timedelta ( self , self . as_bytes ( ) , microseconds_overflow_behavior)
543543 }
544- #[ cfg_attr( has_no_coverage , no_coverage ) ]
544+ #[ cfg_attr( has_coverage_attribute , coverage ( off ) ) ]
545545 fn strict_timedelta (
546546 & self ,
547547 microseconds_overflow_behavior : speedate:: MicrosecondsPrecisionOverflowBehavior ,
0 commit comments