Skip to content

Commit 5b91acf

Browse files
authored
Merge pull request #3771 from cweider/python-chores
2 parents e2358a9 + d4a4f8a commit 5b91acf

File tree

18 files changed

+29
-28
lines changed

18 files changed

+29
-28
lines changed

.github/dependabot.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ updates:
2525
groups:
2626
core:
2727
patterns:
28-
- 'actions/*' # The core actions offered by Github
28+
- 'actions/*' # The core actions offered by GitHub

.github/workflows/lint.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ jobs:
7070
-p cl.simple_pages
7171
7272
# Add files here as they're ready
73-
- name: mypy Static Type Cheker (files)
73+
- name: mypy Static Type Checker (files)
7474
run: |
7575
mypy \
7676
--follow-imports=skip \

cl/api/templates/bulk-data.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ <h3 id="schedule">Generation Schedule</h3>
156156
</p>
157157

158158
<h3 id="contributing">Adding Features and Fixing Bugs</h3>
159-
<p>Like all Free Law Project initiatives, CourtListener is an open source project. If you are a developer and you notice bugs or missing features, we enthusiastically welcome your contributions <a href="https://github.com/freelawproject/courtlistener">on Github</a>.
159+
<p>Like all Free Law Project initiatives, CourtListener is an open source project. If you are a developer and you notice bugs or missing features, we enthusiastically welcome your contributions <a href="https://github.com/freelawproject/courtlistener">on GitHub</a>.
160160
</p>
161161

162162
<h3 id="old">Release Notes</h3>

cl/api/templates/rest-docs-vlatest.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,12 @@ <h2 id="api-overview">Getting Started &amp; Overview</h2>
4848

4949

5050
<h2 id="support">Support</h2>
51-
<p>Questions about the APIs can be sent <a href="https://github.com/freelawproject/courtlistener/discussions" target="_blank">to our Github Discussions forum</a> or via our <a href="{% url "contact" %}">contact form</a>. In general, we prefer that questions be posted publicly in the forum so they can be searched by others in the future. If you are a private organization posting to that forum, we will work with you to avoid sharing details about your organization.
51+
<p>Questions about the APIs can be sent <a href="https://github.com/freelawproject/courtlistener/discussions" target="_blank">to our GitHub Discussions forum</a> or via our <a href="{% url "contact" %}">contact form</a>. In general, we prefer that questions be posted publicly in the forum so they can be searched by others in the future. If you are a private organization posting to that forum, we will work with you to avoid sharing details about your organization.
5252
</p>
5353
<p>
5454
<a href="https://github.com/freelawproject/courtlistener/discussions"
5555
target="_blank"
56-
class="btn btn-default">Ask in Github Discussions</a>
56+
class="btn btn-default">Ask in GitHub Discussions</a>
5757
<a href="{% url "contact" %}"
5858
target="_blank"
5959
class="btn btn-default">Send us a Private Message</a>

cl/citations/annotate_citations.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def get_and_clean_opinion_text(document: Opinion | RECAPDocument) -> None:
1313
on the Opinion object. This should be done before performing citation
1414
extraction and annotation on an opinion.
1515
16-
:param opinion: The Opinion whose text should be parsed
16+
:param document: The Opinion or RECAPDocument whose text should be parsed
1717
"""
1818
for attr in ["html_anon_2020", "html_columbia", "html_lawbox", "html"]:
1919
text = getattr(document, attr, None)
@@ -39,7 +39,7 @@ def generate_annotations(
3939
) -> List[List]:
4040
"""Generate the string annotations to insert into the opinion text
4141
42-
:param citations: A list of citations in the opinion
42+
:param citation_resolutions: A map of lists of citations in the opinion
4343
:return The new HTML containing citations
4444
"""
4545
annotations: List[List] = []
@@ -69,7 +69,7 @@ def create_cited_html(
6969
the citations into links to the correct citations.
7070
7171
:param opinion: The opinion to enhance
72-
:param citations: A list of citations in the opinion
72+
:param citation_resolutions: A map of lists of citations in the opinion
7373
:return The new HTML containing citations
7474
"""
7575
if opinion.source_is_html: # If opinion was originally HTML...

cl/corpus_importer/import_columbia/columbia_utils.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -540,9 +540,9 @@ def convert_columbia_html(text: str, opinion_index: int) -> str:
540540
# We use opinion index to ensure that all footnotes are linked to the
541541
# corresponding opinion
542542
for ref in foot_references:
543-
if (match := re.search(r"[\*\d]+", ref)) is not None:
543+
if (match := re.search(r"[*\d]+", ref)) is not None:
544544
f_num = match.group()
545-
elif (match := re.search(r"\[fn(.+)\]", ref)) is not None:
545+
elif (match := re.search(r"\[fn(.+)]", ref)) is not None:
546546
f_num = match.group(1)
547547
else:
548548
f_num = None
@@ -552,24 +552,24 @@ def convert_columbia_html(text: str, opinion_index: int) -> str:
552552

553553
# Add footnotes to opinion
554554
footnotes = re.findall(
555-
"<footnote_body>.[\s\S]*?</footnote_body>", text
555+
r"<footnote_body>.[\s\S]*?</footnote_body>", text
556556
)
557557
for fn in footnotes:
558558
content = re.search(
559-
"<footnote_body>(.[\s\S]*?)</footnote_body>", fn
559+
r"<footnote_body>(.[\s\S]*?)</footnote_body>", fn
560560
)
561561
if content:
562562
rep = r'<div class="footnote">%s</div>' % content.group(1)
563563
text = text.replace(fn, rep)
564564

565565
# Replace footnote numbers
566566
foot_numbers = re.findall(
567-
"<footnote_number>.*?</footnote_number>", text
567+
r"<footnote_number>.*?</footnote_number>", text
568568
)
569569
for ref in foot_numbers:
570-
if (match := re.search(r"[\*\d]+", ref)) is not None:
570+
if (match := re.search(r"[*\d]+", ref)) is not None:
571571
f_num = match.group()
572-
elif (match := re.search(r"\[fn(.+)\]", ref)) is not None:
572+
elif (match := re.search(r"\[fn(.+)]", ref)) is not None:
573573
f_num = match.group(1)
574574
else:
575575
f_num = None

cl/corpus_importer/tests.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -2982,7 +2982,7 @@ def test_judge_name_extraction(self):
29822982

29832983
test_pairs = [
29842984
(
2985-
# Test if we are tripped up by mulitple judge names in tag
2985+
# Test if we are tripped up by multiple judge names in tag
29862986
"ARNOLD, Circuit Judge, with whom BRIGHT, Senior Circuit Judge, and McMILLIAN and MAGILL, Circuit Judges, join,:",
29872987
"Arnold",
29882988
),
@@ -3061,7 +3061,7 @@ def test_panel_extraction(self):
30613061

30623062
test_pairs = [
30633063
(
3064-
# Test if we are tripped up by mulitple judge names in tag
3064+
# Test if we are tripped up by multiple judge names in tag
30653065
"ARNOLD, Circuit Judge, with whom BRIGHT, Senior Circuit Judge, and McMILLIAN and MAGILL, Circuit Judges, join,:",
30663066
["ARNOLD", "BRIGHT", "MAGILL", "McMILLIAN"],
30673067
),

cl/lib/auth.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33

44
def group_required(*group_names):
5-
"""Verify user group memebership
5+
"""Verify user group membership
66
77
:param group_names: Array of strings
88
:return: Whether the user is in one of the groups

cl/lib/celery_utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def make_queue_name_for_pri(queue: str, pri: int) -> str:
3737
3838
- batch1\x06\x163 <-- P3 queue named batch1
3939
40-
There's more information about this in Github, but it doesn't look like it
40+
There's more information about this in GitHub, but it doesn't look like it
4141
will change any time soon:
4242
4343
- https://github.com/celery/kombu/issues/422

cl/lib/context_processors.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def inject_settings(request):
4242
'Free Law Project is a member of the <a href="http://www.falm.info/">Free Access to Law Movement</a> and relies heavily on <a href="%s?referrer=tip">your donations</a>. <i class="fa fa-heart red"></i>'
4343
% DONATE_URL,
4444
'Free Law Project, the non-profit behind CourtListener, provides <a href="https://free.law/data-consulting/">data consulting and client services</a> for those that need help with our data.',
45-
'If you have a Github account, you <a href="https://github.com/sponsors/freelawproject/">can sponsor our work</a> so we can do more of it. <i class="fa fa-heart red"></i>',
45+
'If you have a GitHub account, you <a href="https://github.com/sponsors/freelawproject/">can sponsor our work</a> so we can do more of it. <i class="fa fa-heart red"></i>',
4646
# Recognition
4747
'Free Law Project\'s founders were <a href="https://free.law/2014/07/14/free-law-project-co-founders-named-to-fastcase-50-for-2014/">selected as FastCase 50 winners in 2014</a>.',
4848
'Oral Arguments were <a href="https://free.law/2014/12/04/free-law-project-recognized-in-two-of-top-ten-legal-hacks-of-2014-by-dc-legal-hackers/">selected as a Top Ten Legal Hack of 2014</a>.',

cl/lib/neon_utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def get_individual_account_payload(
102102
103103
Returns:
104104
dict[str, dict[str, NeonContact]]:A dictionary containing the
105-
extracted data, ready to be used as a payload for the create/update ç
105+
extracted data, ready to be used as a payload for the create/update
106106
request.
107107
"""
108108
contact_data: NeonContact = {

cl/lib/string_utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def normalize_dashes(text: str) -> str:
110110
:return: the better text
111111
"""
112112
# Simple variables b/c in monospace code, you can't see the difference
113-
# othewise.
113+
# otherwise.
114114
normal_dash = "-"
115115
en_dash = "–"
116116
em_dash = "—"

cl/people_db/import_judges/judge_utils.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ def process_date_string(date_input):
4545

4646

4747
def get_school(schoolname, testing=False):
48-
"Takes the name of a school from judges data and tries to match to a unique School object."
48+
"""Takes the name of a school from judges data and tries to match to a
49+
unique School object."""
4950

5051
if schoolname.isspace():
5152
return None

cl/people_db/models.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1268,7 +1268,7 @@ class Race(models.Model):
12681268
)
12691269

12701270
def __str__(self) -> str:
1271-
# This is used in the API via the StringRelatedField. Do not cthange.
1271+
# This is used in the API via the StringRelatedField. Do not change.
12721272
return f"{self.race}"
12731273

12741274

cl/search/signals.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,7 @@ def handle_recap_doc_change(
555555
# When we get updated text for a doc, we want to parse it for citations.
556556
if update_fields is not None and "plain_text" in update_fields:
557557
# Even though the task itself filters for qualifying ocr_status,
558-
# we don't want to clog the TQ with unncessary items.
558+
# we don't want to clog the TQ with unnecessary items.
559559
if instance.ocr_status in (
560560
RECAPDocument.OCR_COMPLETE,
561561
RECAPDocument.OCR_UNNECESSARY,

cl/simple_pages/templates/contact_form.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ <h1 class="text-center v-offset-below-2">Contact Us</h1>
1212
</p>
1313
<p><strong>If you want something taken off of our website</strong>, please see our <a href="{% url "terms" %}#removal">removal policy</a> for how to proceed. You <em>must</em> provide a link of the item you need reviewed.
1414
</p>
15-
<p><strong>Finally</strong>, <a href="https://github.com/freelawproject/courtlistener/discussions" target="_blank">we use Github Discussions</a>, where you can ask questions and search past ones if you prefer to discuss your message in public.</p>
15+
<p><strong>Finally</strong>, <a href="https://github.com/freelawproject/courtlistener/discussions" target="_blank">we use GitHub Discussions</a>, where you can ask questions and search past ones if you prefer to discuss your message in public.</p>
1616

1717
{% if form.errors %}
1818
<div class="alert alert-danger">

cl/simple_pages/templates/faq.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ <h3 id="orgin-story">What's the History of CourtListener?</h3>
389389
</p>
390390

391391
<h3 id="future">What Plans or Features Are In the Works?</h3>
392-
<p>All of the planning for CourtListener is done on Github and via our Slack room. If you want to get involved, a good way is to send us your résumé by email. In your email, it helps to say what kinds of expertise you have and what kind of help you think you can provide.
392+
<p>All of the planning for CourtListener is done on GitHub and via our Slack room. If you want to get involved, a good way is to send us your résumé by email. In your email, it helps to say what kinds of expertise you have and what kind of help you think you can provide.
393393
</p>
394394

395395

cl/simple_pages/templates/help/coverage_opinions.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ <h1>Data Coverage — What Case Law Do We Have?</h1>
8080
We make our data available in <a href="https://www.courtlistener.com/help/api/">numerous formats</a>. Our hope is that when our work is done, it will never need to be done again — All American jurisprudence will be available to all, forever.</p>
8181

8282
<p><strong>Support —</strong>
83-
Questions about our coverage can be sent to our <a href="https://github.com/freelawproject/courtlistener/discussions" target="_blank">to our Github Discussions forum</a> or via our <a href="{% url "contact" %}">contact form</a>. In general, we prefer that questions be posted publicly in the forum so they can be searched by others in the future. If you are a private organization posting to that forum, we will work with you to avoid sharing details about your organization.</p>
83+
Questions about our coverage can be sent to our <a href="https://github.com/freelawproject/courtlistener/discussions" target="_blank">to our GitHub Discussions forum</a> or via our <a href="{% url "contact" %}">contact form</a>. In general, we prefer that questions be posted publicly in the forum so they can be searched by others in the future. If you are a private organization posting to that forum, we will work with you to avoid sharing details about your organization.</p>
8484

8585
<p><strong>Finally —</strong> Don’t take our word for it, check it out below.</p>
8686
<h1 id="federal">Federal Courts</h1>

0 commit comments

Comments
 (0)