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

[Git][ftp-team/dak][master] Write some docstrings



Title: GitLab

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

Commits:

1 changed file:

Changes:

  • daklib/announce.py
    ... ... @@ -27,31 +27,41 @@ from daklib.utils import mail_addresses_for_upload, TemplateSubst, send_mail
    27 27
     
    
    28 28
     
    
    29 29
     class ProcessedUpload(object):
    
    30
    +    """Contains data of a processed upload.
    
    31
    +    """
    
    30 32
         # people
    
    31
    -    maintainer = None
    
    32
    -    changed_by = None
    
    33
    -    fingerprint = None
    
    33
    +    maintainer = None #: Maintainer: field contents
    
    34
    +    changed_by = None #: Changed-By: field contents
    
    35
    +    fingerprint = None #: Fingerprint of upload signer
    
    34 36
     
    
    35 37
         # suites
    
    36
    -    suites = []
    
    37
    -    from_policy_suites = []
    
    38
    +    suites = [] #: Destination suites
    
    39
    +    from_policy_suites = [] #: Policy suites
    
    38 40
     
    
    39 41
         # package
    
    40
    -    changes = None
    
    41
    -    changes_filename = None
    
    42
    -    sourceful = None
    
    43
    -    source = None
    
    44
    -    architecture = None
    
    45
    -    version = None
    
    46
    -    bugs = None
    
    42
    +    changes = None #: Contents of .changes file from upload
    
    43
    +    changes_filename = None #: Changes Filename
    
    44
    +    sourceful = None #: Did upload contain source
    
    45
    +    source = None #: Source value from changes
    
    46
    +    architecture = None #: Architectures from changes
    
    47
    +    version = None #: Version from changes
    
    48
    +    bugs = None #: Bugs closed in upload
    
    47 49
     
    
    48 50
         # program
    
    49
    -    program = "unknown-program"
    
    51
    +    program = "unknown-program" #: Which dak program was in use
    
    50 52
     
    
    51
    -    warnings = []
    
    53
    +    warnings = [] #: Eventual warnings for upload
    
    52 54
     
    
    53 55
     
    
    54 56
     def _subst_for_upload(upload):
    
    57
    +    """ Prepare substitutions used for announce mails.
    
    58
    +
    
    59
    +    @type  upload: L{daklib.upload.Source} or L{daklib.upload.Binary}
    
    60
    +    @param upload: upload to handle
    
    61
    +
    
    62
    +    @rtype: dict
    
    63
    +    @returns: A dict of substition values for use by L{daklib.utils.TemplateSubst}
    
    64
    +    """
    
    55 65
         cnf = Config()
    
    56 66
     
    
    57 67
         maintainer = upload.maintainer or cnf['Dinstall::MyEmailAddress']
    
    ... ... @@ -98,6 +108,17 @@ def _whitelists(upload):
    98 108
     
    
    99 109
     
    
    100 110
     def announce_reject(upload, reason, rejected_by=None):
    
    111
    +    """ Announce a reject.
    
    112
    +
    
    113
    +    @type  upload: L{daklib.upload.Source} or L{daklib.upload.Binary}
    
    114
    +    @param upload: upload to handle
    
    115
    +
    
    116
    +    @type  reason: string
    
    117
    +    @param reason: Reject reason
    
    118
    +
    
    119
    +    @type  rejected_by: string
    
    120
    +    @param rejected_by: Who is doing the reject.
    
    121
    +    """
    
    101 122
         cnf = Config()
    
    102 123
         subst = _subst_for_upload(upload)
    
    103 124
         whitelists = _whitelists(upload)
    
    ... ... @@ -118,6 +139,12 @@ def announce_reject(upload, reason, rejected_by=None):
    118 139
     
    
    119 140
     
    
    120 141
     def announce_accept(upload):
    
    142
    +    """ Announce an upload.
    
    143
    +
    
    144
    +    @type  upload: L{daklib.upload.Source} or L{daklib.upload.Binary}
    
    145
    +    @param upload: upload to handle
    
    146
    +    """
    
    147
    +
    
    121 148
         cnf = Config()
    
    122 149
         subst = _subst_for_upload(upload)
    
    123 150
         whitelists = _whitelists(upload)
    
    ... ... @@ -171,6 +198,12 @@ def announce_accept(upload):
    171 198
     
    
    172 199
     
    
    173 200
     def announce_new(upload):
    
    201
    +    """ Announce an upload going to NEW.
    
    202
    +
    
    203
    +    @type  upload: L{daklib.upload.Source} or L{daklib.upload.Binary}
    
    204
    +    @param upload: upload to handle
    
    205
    +    """
    
    206
    +
    
    174 207
         cnf = Config()
    
    175 208
         subst = _subst_for_upload(upload)
    
    176 209
         whitelists = _whitelists(upload)
    


  • Reply to: