You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
BPO "GH-5195" MouseOver ToolTip text References "GH-15194" #129
However, the appearance of that link is suspect for two reasons:
When I mouse over, the tooltip text reads GitHub PR 5194: [open] bpo-21161: pdb: default: handle list comprehensions, as if to link to bpo-21161: pdb: default: handle list comprehensions cpython#15194. Note the difference of a leading 1: 15194 instead of 5194.
There is no strikethrough on that link, even though that pull request is merged.
This is not a major issue, but it's just a little confusing that the link is correct when the CSS implies otherwise.
def_linkify_pull_request(self, match):
"""Turn a pullrequest (e.g. 'PR 123') to an HTML link"""template= ('<a href="%(base_url)s%(pr_no)s" %(cls)s''title="GitHub PR %(pr_no)s%(info)s">%(text)s</a>')
pr_no=match.group('pr_no')
text=match.group('text')
# find title and statuscl=self._db.pull_request# find all the pull_request that refer to GitHub PR pr_no,# with the most recently updated firstpr_ids=cl.filter(None, dict(number=pr_no), sort=[('-', 'activity')])
title=status=info=cls=''forpr_idinpr_ids:
ifnottitle:
title=cl.get(pr_id, 'title', '')
ifnotstatus:
status=cl.get(pr_id, 'status', '')
iftitleandstatus:
# once we get both, escape and add to infostatus=cgi.escape(status).replace('"', "'")
title=cgi.escape(title).replace('"', "'")
info=': [%s] %s'% (status, title)
breakifstatus:
cls='class="%s" '% ('open'ifstatus=='open'else'closed')
base_url='https://github.com/python/cpython/pull/'returntemplate%dict(base_url=base_url, pr_no=pr_no, cls=cls,
info=info, text=text)
There is nothing identifiably wrong with that HTML snippet, it's just that the wrong PR metadata was pulled.
I think there could be a rule to prioritize exact matches of number=pr_no rather than treating all substring-matches as equally valid.
This isn't a huge problem as it only occurs when referencing pull requests old enough to be four digits long.
Activity
sweeneyde commentedon Sep 26, 2021
Relevant code is here.
In my case, this must have returned
There is nothing identifiably wrong with that HTML snippet, it's just that the wrong PR metadata was pulled.
I think there could be a rule to prioritize exact matches of
number=pr_norather than treating all substring-matches as equally valid.This isn't a huge problem as it only occurs when referencing pull requests old enough to be four digits long.