Dead code and tuple bug in from_github()
- Dominant language
- Python
- Stars
- 13
- Forks
- 17
- Avg merge
- 6h 59m
- Merged PRs (30d)
- 1
Description
> [!NOTE]
> Migrated from [augurlabs/augur#3596](https://github.com/augurlabs/augur/issues/3596)
> Originally opened by `@iGufrankhan` on 2026-01-16
---
**Description:**
While reviewing PR ingestion, I found that from_github() assigns many fields with a trailing comma, which makes them 1-element tuples instead of scalar values.
for example :
pr_obj.pr_src_id = int(str(pr['id']).encode(encoding='UTF-8').decode(encoding='UTF-8')),
pr_obj.pr_src_node_id = pr['node_id'],
pr_obj.pr_html_url = pr['html_url'],
pr_obj.pr_diff_url = pr['diff_url'],
pr_obj.pr_patch_url = pr['patch_url'],
pr_obj.pr_issue_url = pr['issue_url'],
file location :
https://github.com/chaoss/augur/blob/main/augur/application/db/models/augur_data.py
line : 1805
This syntax creates tuples like (value,) instead of value,
This is almost certainly unintended.
However, after tracing ingestion flow, it seems that PR ingestion now uses:
extract_data_from_pr_list(...)
So this buggy function may currently be dead / unused code, which is why the tuple bug has not caused visible failures.
#question is if it is dead why this matter:
1.railing commas silently create tuples → dangerous hidden bug
2.Function appears unused → dead code increases confusion and maintenance cost
3.Future refactors might accidentally re-enable this broken path
One of the following should happen:
Option A: Fix tuple bug by removing trailing commas
Option B: Remove or deprecate from_github() if it is fully unused
Before opening a PR, I want to confirm:
Is PullRequest.from_github() completely deprecated in the current ingestion pipeline?
If yes ,then remove the bug and add a simple comment that this complety dead
if no ,then only remove the trailing comma bug
Contributor guide
Assessment
This issue has not been assessed yet.