Skip to content

Commit

Permalink
fix(pasuperct): ensure extract_from_text returns a dictionary
Browse files Browse the repository at this point in the history
  • Loading branch information
grossir committed Jan 8, 2025
1 parent ea57762 commit 6479282
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions juriscraper/opinions/united_states/state/pasuperct.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

import re
from datetime import datetime
from typing import Dict, Optional
from typing import Dict
from urllib.parse import urlencode

from juriscraper.opinions.united_states.state import pa
Expand Down Expand Up @@ -61,7 +61,7 @@ def clean_judge(self, author_str: str) -> str:
)
return author_str

def extract_from_text(self, scraped_text: str) -> Optional[Dict]:
def extract_from_text(self, scraped_text: str) -> Dict:
"""Get neutral citation from the first lines in the first page
Not all scraped opinions have them
Expand All @@ -73,3 +73,5 @@ def extract_from_text(self, scraped_text: str) -> Optional[Dict]:
cite_data = cite_match.groupdict()
cite_data["type"] = 8 # Neutral citation
return {"Citation": cite_data}

return {}

0 comments on commit 6479282

Please sign in to comment.