Skip to content

Commit

Permalink
fix(parentheticals): Specify regex pattern explicitly in f-string
Browse files Browse the repository at this point in the history
  • Loading branch information
ProbablyFaiz committed Feb 18, 2022
1 parent cb63fb4 commit 885b630
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cl/citations/description_score.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
from cl.search.models import OpinionCluster

_GERUND = re.compile(r"(?:\S+ing)", re.IGNORECASE)
_GERUND_THAT = re.compile(rf"{_GERUND} that", re.IGNORECASE)
_GERUND_THAT = re.compile(rf"{_GERUND.pattern} that", re.IGNORECASE)
_HOLDING = re.compile(
r"(?:holding|deciding|ruling|recognizing|concluding)", re.IGNORECASE
)
_HOLDING_THAT = re.compile(rf"{_HOLDING} that", re.IGNORECASE)
_HOLDING_THAT = re.compile(rf"{_HOLDING.pattern} that", re.IGNORECASE)

# Observation of thousands of parentheticals seems to indicate that the
# most useful ones are in the neighborhood of 20 words long.
Expand Down

0 comments on commit 885b630

Please sign in to comment.