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

Link citations cannot be disambiguated #5016

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

quevon24
Copy link
Member

This PR addresses the issue of linking citations that cannot be disambiguated to /c/reporter/volume/page/ (e.g. "114 F.3d 1182" will be linked to/c/f3d/114/1182/) so the user can figure it out which open.

It uses a similar approach that is being used for NO_MATCH_RESOURCE but setting an impossible citation for the FullCaseCitation object (999999 U.S. 999999) to have a different hash than NO_MATCH_RESOURCE because the object is being used as key for citation resolution dictionary.

…ter page and add class for those linked citations
…ter page and add class for those linked citations
…hats-ok-we-can-send-it-to-a-c-page-which-will-list-multiple-options
Comment on lines +72 to +73
'<span class="citation multiple-matches">'
f'<a href="{reverse("citation_redirector", args=[citations[0].groups["reporter"], citations[0].groups["volume"], citations[0].groups["page"]])}">',
Copy link

Choose a reason for hiding this comment

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

Semgrep identified an issue in your code:

Detected strings that are implicitly concatenated inside a list. Python will implicitly concatenate strings when not explicitly delimited. Was this supposed to be individual elements of the list?

To resolve this comment:

🔧 No guidance has been designated for this issue. Fix according to your organization's approved methods.

💬 Ignore this finding

Leave a nosemgrep comment directly above or at the end of line 72 like so // nosemgrep: python.lang.correctness.common-mistakes.string-concat-in-list.string-concat-in-list

Take care to validate that this is not a true positive finding before ignoring it.
Learn more about ignoring code, files and folders here.

You can view more details about this finding in the Semgrep AppSec Platform.

@quevon24 quevon24 marked this pull request as ready for review February 3, 2025 22:44
@quevon24 quevon24 requested a review from flooie February 4, 2025 18:05
…hats-ok-we-can-send-it-to-a-c-page-which-will-list-multiple-options
…hats-ok-we-can-send-it-to-a-c-page-which-will-list-multiple-options
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: PRs to Review
2 participants