diff --git a/scripts/build_courts_list b/scripts/build_courts_list index 709da5e..0d19583 100755 --- a/scripts/build_courts_list +++ b/scripts/build_courts_list @@ -1,6 +1,7 @@ #!/usr/bin/env python from pathlib import Path + import yaml print("Loading courts...") diff --git a/src/ds_caselaw_utils/__init__.py b/src/ds_caselaw_utils/__init__.py index 8ae00da..f8d9bd7 100644 --- a/src/ds_caselaw_utils/__init__.py +++ b/src/ds_caselaw_utils/__init__.py @@ -1,2 +1,4 @@ from .courts import courts -from .neutral import neutral_url as neutral_url +from .neutral import neutral_url + +__all__ = ["courts", "neutral_url"] diff --git a/src/ds_caselaw_utils/neutral.py b/src/ds_caselaw_utils/neutral.py index 411f653..1899785 100644 --- a/src/ds_caselaw_utils/neutral.py +++ b/src/ds_caselaw_utils/neutral.py @@ -4,6 +4,7 @@ import pathlib import re +from typing import Optional from ruamel.yaml import YAML @@ -13,7 +14,7 @@ citation_data = yaml.load(f) -def neutral_url(citation): +def neutral_url(citation) -> Optional[str]: """Given a neutral citation such as `[2020] EAT 17`, return a public-API URL like `/eat/2020/17`, or None if no match is found.