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

[pre-commit.ci] pre-commit autoupdate #843

Merged
merged 2 commits into from
Jul 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ ci:
exclude: '^tests/examples/.*\.html$'
repos:
- repo: https://github.com/asottile/pyupgrade
rev: v3.14.0
rev: v3.16.0
hooks:
- id: pyupgrade
args: [--py37-plus]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.6.0
hooks:
- id: check-added-large-files
- id: check-ast
Expand All @@ -32,13 +32,13 @@ repos:
args: [--line-length=79, --transform-concats]

- repo: https://github.com/psf/black
rev: 23.9.1
rev: 24.4.2
hooks:
- id: black
additional_dependencies: ['click==8.0.4']

- repo: https://github.com/PyCQA/isort
rev: 5.12.0
rev: 5.13.2
hooks:
- id: isort
name: isort (python)
1 change: 0 additions & 1 deletion juriscraper/opinions/opinion_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
YYYY-MM-DD: Created by XXX
"""


from lxml import html

from juriscraper.lib.string_utils import convert_date_string, titlecase
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
Date created: 1 Sep 2014
Type: Precedential
"""

import json

from juriscraper.OpinionSiteLinear import OpinionSiteLinear
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
History:
2022-01-14: Created by William E. Palin
"""

from datetime import date, datetime
from typing import Tuple
from urllib.parse import urlencode
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
[email protected]
"""


import time
from datetime import date, timedelta

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
[email protected]
"""


from juriscraper.opinions.united_states.federal_appellate import ca2_p


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
2021-12-18: Created by flooie
2023-01-12: Fixed requests.exceptions.InvalidURL error by grossir
"""

from urllib.parse import urljoin

from juriscraper.OpinionSiteLinear import OpinionSiteLinear
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
Court Contact: https://www.supremecourt.gov/contact/contact_webmaster.aspx
"""


from datetime import date

from juriscraper.OpinionSiteLinear import OpinionSiteLinear
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
History:
- 2023-12-28, grossir: created
"""

import calendar
import re
from typing import Any, Dict, Optional
Expand Down
1 change: 1 addition & 0 deletions juriscraper/opinions/united_states/federal_special/ag.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
CourtID: ag
Court Short Name: United States Attorney General
"""

from juriscraper.OpinionSiteLinear import OpinionSiteLinear


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
2021-12-17: Updated by flooie for OpinionSiteLinear
"""


import re
from typing import List

Expand Down
1 change: 1 addition & 0 deletions juriscraper/opinions/united_states/state/colo.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
- 2023-11-19: Drop Selenium by WEP
- 2023-12-20: Updated with citations, judges and summaries, Palin
"""

import datetime
import re
from datetime import date, timedelta
Expand Down
1 change: 1 addition & 0 deletions juriscraper/opinions/united_states/state/idaho_civil.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
- 2015-10-23, mlr: Updated to handle annoying situation.
- 2016-02-25 arderyp: Updated to catch "ORDER" (in addition to "Order") in download url text
"""

from lxml import html

from juriscraper.lib.string_utils import clean_if_py3, convert_date_string
Expand Down
1 change: 1 addition & 0 deletions juriscraper/opinions/united_states/state/ind.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
History:
2014-09-03: Created by Jon Andersen
"""

from juriscraper.OpinionSiteLinear import OpinionSiteLinear


Expand Down
1 change: 1 addition & 0 deletions juriscraper/opinions/united_states/state/indctapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
History:
2014-09-03: Created by Jon Andersen
"""

from juriscraper.opinions.united_states.state import ind


Expand Down
1 change: 1 addition & 0 deletions juriscraper/opinions/united_states/state/indtc.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
History:
2014-09-03: Created by Jon Andersen
"""

from juriscraper.opinions.united_states.state import ind


Expand Down
6 changes: 3 additions & 3 deletions juriscraper/opinions/united_states/state/kyctapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ class Site(ky.Site):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.court_id = self.__module__
self.parameters[
"index"
] = "*{aaa711b4d9721269574a3d848abb439b} Court of Appeals Opinions (1996+)"
self.parameters["index"] = (
"*{aaa711b4d9721269574a3d848abb439b} Court of Appeals Opinions (1996+)"
)
self.docket_number_regex = re.compile(
r"(?P<year>\d{4})-(?P<court>[CA]{2})-(?P<number>\d+)"
)
1 change: 0 additions & 1 deletion juriscraper/opinions/united_states/state/mdctspecapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
Date created: 06/27/2014
"""


from datetime import date

from juriscraper.opinions.united_states.state import md
Expand Down
1 change: 1 addition & 0 deletions juriscraper/opinions/united_states/state/mich.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
- 2014-08-05: Updated to have a dynamic URL, an oversight during check in.
- 2022-01-28: Updated for new web site, @satsuki-chan.
"""

import re
from typing import List
from urllib.parse import urlencode
Expand Down
1 change: 1 addition & 0 deletions juriscraper/opinions/united_states/state/michctapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
- 2014-09-19: Created by Jon Andersen
- 2022-01-28: Updated for new web site, @satsuki-chan.
"""

from typing import List
from urllib.parse import urlencode

Expand Down
1 change: 1 addition & 0 deletions juriscraper/opinions/united_states/state/mo.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
Author: Ben Cassedy
Date created: 04/27/2014
"""

from datetime import date

from juriscraper.OpinionSiteLinear import OpinionSiteLinear
Expand Down
8 changes: 5 additions & 3 deletions juriscraper/opinions/united_states/state/mont.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@ def _get_case_dates(self):

def _get_precedential_statuses(self):
return [
"Published"
if "Published" in row["documentDescription"]
else "Unpublished"
(
"Published"
if "Published" in row["documentDescription"]
else "Unpublished"
)
for row in self.html
]

Expand Down
1 change: 0 additions & 1 deletion juriscraper/opinions/united_states/state/nev.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
- 2023-12-13: Updated by William E. Palin
"""


import json

from lxml.html import fromstring
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
History:
- 2024-01-05, grossir: modified to use nytrial template
"""

from datetime import date

from juriscraper.opinions.united_states.state import nytrial
Expand Down
1 change: 1 addition & 0 deletions juriscraper/opinions/united_states/state/nytrial.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
History:
- 2024-01-05, grossir: created
"""

import re
from datetime import date
from itertools import chain
Expand Down
1 change: 1 addition & 0 deletions juriscraper/opinions/united_states/state/ohio.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
great, but now it's terribly frustrating.
- 2021-12-28: Remove selenium by flooie
"""

from datetime import date

from juriscraper.OpinionSiteLinear import OpinionSiteLinear
Expand Down
1 change: 0 additions & 1 deletion juriscraper/opinions/united_states/state/orctapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
- 2023-11-18: Created
"""


from juriscraper.DeferringList import DeferringList
from juriscraper.OpinionSiteLinear import OpinionSiteLinear

Expand Down
1 change: 1 addition & 0 deletions juriscraper/opinions/united_states/state/pa.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
CourtID: pa
Court Short Name: pa
"""

import re

from juriscraper.lib.html_utils import get_xml_parsed_text
Expand Down
1 change: 1 addition & 0 deletions juriscraper/opinions/united_states/state/ri_p.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
Date created: 2013-08-10 by Brian W. Carver
2022-05-02: Updated by William E. Palin, to use JSON responses
"""

from datetime import datetime

from lxml import html
Expand Down
1 change: 0 additions & 1 deletion juriscraper/opinions/united_states/state/tenn.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
Court Short Name: Tenn.
"""


from juriscraper.OpinionSiteLinear import OpinionSiteLinear


Expand Down
1 change: 1 addition & 0 deletions juriscraper/opinions/united_states/state/tenncrimapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
CourtID: tennctcrimapp
Court Short Name: Tenn. Ct. Crim. App.
"""

from juriscraper.opinions.united_states.state import tenn


Expand Down
1 change: 1 addition & 0 deletions juriscraper/opinions/united_states/state/tennctapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
CourtID: tennctapp
Court Short Name: Tenn. Ct. App.
"""

from juriscraper.opinions.united_states.state import tenn


Expand Down
1 change: 1 addition & 0 deletions juriscraper/opinions/united_states/territories/nmariana.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
History:
2023-01-21: Created by William Palin
"""

import re
from datetime import date
from typing import Any, Dict
Expand Down
1 change: 1 addition & 0 deletions juriscraper/opinions/united_states/territories/prapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
CourtID: prapp
Court Short Name: Puerto Rico Court of Apelaciones
"""

from dateparser import parse

from juriscraper.lib.string_utils import titlecase
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
History:
2023-01-21: Created by William Palin
"""

import urllib.parse
from datetime import date, datetime, timedelta

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,11 @@ def _process_html(self) -> None:
"name": row.xpath(".//td[4]")[0].text_content(),
"url": row.xpath(".//td[2]/a")[0].attrib["href"],
"docket": row.xpath(".//td[2]/a")[0].attrib["title"],
"status": "Published"
if row.xpath(".//td[5]")[0].text_content() == "pub"
else "Unpublished",
"status": (
"Published"
if row.xpath(".//td[5]")[0].text_content() == "pub"
else "Unpublished"
),
}
)

Expand Down Expand Up @@ -105,9 +107,11 @@ def _process_html(self) -> None:
"name": row.xpath(".//td[4]")[0].text_content(),
"url": row.xpath(".//td[2]/a")[0].attrib["href"],
"docket": row.xpath(".//td[2]/a")[0].attrib["title"],
"status": "Published"
if row.xpath(".//td[5]")[0].text_content() == "pub"
else "Unpublished",
"status": (
"Published"
if row.xpath(".//td[5]")[0].text_content() == "pub"
else "Unpublished"
),
}
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
2014-09-02: Bug fix by Jon Andersen - recognize "(NFP)" in case name
2014-09-03: Moved to backscrapers
"""

import time
from datetime import date

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
History:
2014-09-03: Renamed to ind_2005.py by janderse
"""

import time
from datetime import date

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
History:
2014-09-02: Created by Jon Andersen
"""

from juriscraper.opinions.united_states_backscrapers.state import ind


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
History:
2014-09-03: Created by Jon Andersen
"""

from juriscraper.opinions.united_states_backscrapers.state import ind


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
History:
2021-12-16 Created by William Palin
"""

from datetime import date

from juriscraper.opinions.united_states.state import utahctapp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
- 2022-09-20: Updated by flooie
"""


import feedparser

from juriscraper.OralArgumentSiteLinear import OralArgumentSiteLinear
Expand Down
Loading
Loading