[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[Git][ftp-team/dak][master] 2 commits: dep11: Correctly validate translated keys in YAML files



Title: GitLab

Joerg Jaspert pushed to branch master at Debian FTP Team / dak

Commits:

  • e95c00b5
    by Matthias Klumpp at 2025-11-16T21:51:32+00:00
    dep11: Correctly validate translated keys in YAML files
    
    Not sure why this worked before, but it seems to be failing now...
    According to the voluptuous documentation, this is the correct way to
    declare the expected schema.
    
  • afa0b4da
    by Joerg Jaspert at 2025-11-16T21:52:11+00:00
    Merge branch 'master' into 'master'
    
    dep11: Correctly validate translated keys in YAML files
    
    See merge request ftp-team/dak!297

1 changed file:

Changes:

  • scripts/debian/dep11-basic-validate.py
    ... ... @@ -23,7 +23,7 @@ import sys
    23 23
     from optparse import OptionParser
    
    24 24
     
    
    25 25
     import yaml
    
    26
    -from voluptuous import All, Length, Match, Required, Schema, Url
    
    26
    +from voluptuous import ALLOW_EXTRA, All, Length, Match, Required, Schema, Url
    
    27 27
     
    
    28 28
     schema_header = Schema(
    
    29 29
         {
    
    ... ... @@ -41,9 +41,9 @@ schema_header = Schema(
    41 41
     schema_translated = Schema(
    
    42 42
         {
    
    43 43
             Required("C"): All(str, Length(min=1), msg="Must have an unlocalized 'C' key"),
    
    44
    -        dict: All(str, Length(min=1)),
    
    44
    +        str: All(str, Length(min=1)),
    
    45 45
         },
    
    46
    -    extra=True,
    
    46
    +    extra=ALLOW_EXTRA,
    
    47 47
     )
    
    48 48
     
    
    49 49
     schema_component = Schema(
    
    ... ... @@ -53,7 +53,7 @@ schema_component = Schema(
    53 53
             Required("Name"): All(dict, Length(min=1), schema_translated),
    
    54 54
             Required("Summary"): All(dict, Length(min=1)),
    
    55 55
         },
    
    56
    -    extra=True,
    
    56
    +    extra=ALLOW_EXTRA,
    
    57 57
     )
    
    58 58
     
    
    59 59
     
    


  • Reply to: