Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

a more clean style code #2

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sanowl
Copy link

@sanowl sanowl commented Aug 14, 2024

No description provided.

paper = relevant_nodes[0]
if paper.score > threshold:
cite_cnt, cite_cnt = process_citation(paper, cited_paper_id_to_cnt, cited_paper_list, cite_cnt)
cite_str = create_cite_string(paper.node.metadata['id'], cite_cnt - 1)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two variables with the same name. If the paper ID is already in the dictionary, the numbering in cite_str will be incorrect.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The rest of the code is fine. Thank you for your suggested improvement!

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hey sure I will fix it dw

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants