From: Simon Glass <sjg@chromium.org>
Rename _query_series() to query_series() and _get_patch_comments() to
get_patch_comments() so that review.py can call them without accessing
protected members. Update all internal callers.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
tools/patman/patchwork.py | 10 +++++-----
tools/patman/status.py | 2 +-
2 files changed, 6 insertions(+), 6 deletions(-)
@@ -270,7 +270,7 @@ class Patchwork:
async with aiohttp.ClientSession() as client:
return await self._request(client, 'projects/')
- async def _query_series(self, client, desc):
+ async def query_series(self, client, desc):
"""Query series by name
Args:
@@ -306,7 +306,7 @@ class Patchwork:
name_found = []
# Do a series query on the description
- res = await self._query_series(client, desc)
+ res = await self.query_series(client, desc)
for pws in res:
if pws['name'] == desc:
if int(pws['version']) == version:
@@ -317,7 +317,7 @@ class Patchwork:
# series name
cmt = ser.commits[0]
- res = await self._query_series(client, cmt.subject)
+ res = await self.query_series(client, cmt.subject)
for pws in res:
patch = Patch(0)
patch.parse_subject(pws['name'])
@@ -523,7 +523,7 @@ class Patchwork:
"""
return await self._request(client, f'patches/{patch_id}/')
- async def _get_patch_comments(self, client, patch_id):
+ async def get_patch_comments(self, client, patch_id):
"""Read comments about a patch
Args:
@@ -783,7 +783,7 @@ On Tue, 4 Mar 2025 at 06:09, Simon Glass <sjg@chromium.org> wrote:
"""
data = await self.get_patch(client, patch_id)
state = data['state']
- comment_data = await self._get_patch_comments(client, patch_id)
+ comment_data = await self.get_patch_comments(client, patch_id)
return Patch(patch_id, state, data, comment_data)
@@ -28,7 +28,7 @@ def process_reviews(content, comment_data, base_rtags):
Args:
content (str): Content text of the patch itself - see pwork.get_patch()
comment_data (list of dict): Comments for the patch - see
- pwork._get_patch_comments()
+ pwork.get_patch_comments()
base_rtags (dict): base review tags (before any comments)
key: Response tag (e.g. 'Reviewed-by')
value: Set of people who gave that response, each a name/email