patman: Tidy up function comments in the series module

This module is missing some comments, so add them.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2025-05-08 06:35:42 +02:00
parent 2bdb98a282
commit 07dcd1f9b7

View File

@@ -25,13 +25,23 @@ class Series(dict):
"""Holds information about a patch series, including all tags.
Vars:
cc: List of aliases/emails to Cc all patches to
commits: List of Commit objects, one for each patch
cover: List of lines in the cover letter
notes: List of lines in the notes
changes: (dict) List of changes for each version, The key is
the integer version number
allow_overwrite: Allow tags to overwrite an existing tag
cc (list of str): Aliases/emails to Cc all patches to
to (list of str): Aliases/emails to send patches to
commits (list of Commit): Commit objects, one for each patch
cover (list of str): Lines in the cover letter
notes (list of str): Lines in the notes
changes: (dict) List of changes for each version:
key (int): version number
value: tuple:
commit (Commit): Commit this relates to, or None if related to a
cover letter
info (str): change lines for this version (separated by \n)
allow_overwrite (bool): Allow tags to overwrite an existing tag
base_commit (Commit): Commit object at the base of this series
branch (str): Branch name of this series
_generated_cc (dict) written in MakeCcFile()
key: name of patch file
value: list of email addresses
"""
def __init__(self):
self.cc = []
@@ -44,10 +54,6 @@ class Series(dict):
self.allow_overwrite = False
self.base_commit = None
self.branch = None
# Written in MakeCcFile()
# key: name of patch file
# value: list of email addresses
self._generated_cc = {}
# These make us more like a dictionary
@@ -375,8 +381,10 @@ class Series(dict):
This will later appear in the change log.
Args:
version: version number to add change list to
info: change line for this version
version (int): version number to add change list to
commit (Commit): Commit this relates to, or None if related to a
cover letter
info (str): change lines for this version (separated by \n)
"""
if not self.changes.get(version):
self.changes[version] = []