Skip to content

Commit

Permalink
Revert "Remove ambiguous/question from assault 3 (#1582)" (#1585)
Browse files Browse the repository at this point in the history
This reverts commit 1358605.
  • Loading branch information
KentShikama authored Jan 8, 2022
1 parent cf4b03a commit 8bb70c5
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 13 deletions.
9 changes: 6 additions & 3 deletions src/backend/expungeservice/charge_classifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
MarijuanaEligible,
MarijuanaUnder21,
MarijuanaViolation,
MarijuanaManufactureDelivery,
MarijuanaManufactureDelivery
)
from expungeservice.models.charge_types.misdemeanor_class_a import MisdemeanorClassA
from expungeservice.models.charge_types.misdemeanor_class_bc import MisdemeanorClassBC
Expand Down Expand Up @@ -269,7 +269,7 @@ def _subsection_6(section, level, statute):
negligent_homicide = (
"163145" # (Criminally negligent homicide), when that offense was punishable as a Class C felony.
)
assault_three = "163165" # ineligible
assault_three = "163165" # ( ineligible if under subection(1)(h) ; Assault in the third degree of a minor 10 years or younger)
if section == mistreatment_one:
charge_type_by_level = ChargeClassifier._classification_by_level(level, statute).ambiguous_charge_type[0]
question_string = "Was the victim between the ages of 18 and 65?"
Expand All @@ -286,7 +286,10 @@ def _subsection_6(section, level, statute):
options = {"Yes": Subsection6(), "No": charge_type_by_level}
return ChargeClassifier._build_ambiguous_charge_type_with_question(question_string, options)
elif section == assault_three:
return AmbiguousChargeTypeWithQuestion([Subsection6()])
charge_type_by_level = ChargeClassifier._classification_by_level(level, statute).ambiguous_charge_type[0]
question_string = "Was the victim more than ten years old?"
options = {"Yes": charge_type_by_level, "No": Subsection6()}
return ChargeClassifier._build_ambiguous_charge_type_with_question(question_string, options)
elif section == negligent_homicide and level == "felony class c":
return AmbiguousChargeTypeWithQuestion([Subsection6()])

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@
@dataclass(frozen=True)
class PersonFelonyClassB(ChargeType):
type_name: str = "Person Felony Class B"
expungement_rules: str = """If a Class B Felony is also defined as a person felony under Oregon law, it is type-ineligible.
expungement_rules: str = (
"""If a Class B Felony is also defined as a person felony under Oregon law, it is type-ineligible.
A person felony is defined in section 14 of this page: https://secure.sos.state.or.us/oard/displayDivisionRules.action?selectedDivision=712
Dismissal of a person felony is eligible as usual under 137.225(1)(b).
A person felony that is below a class B felony is not considered under this subsection and lower levels of charge may still be eligible, with the exceptions named elsewhere such as in the Subsection 6 type.
"""
)
"""
Some statutes listed in the definition for person crime only apply to a particular subsection.
"""
Expand Down Expand Up @@ -45,7 +47,7 @@ class PersonFelonyClassB(ChargeType):
"163145", # [Subsection 6] Negligent Homicide;
"163149", # Aggravated Vehicular Homicide;
# "1631603", # [contains subsection] # Felony Assault;
# "163165", # [Subsection 6] Assault III;
"163165", # [Subsection 6] Assault III;
"163175", # Assault II;
"163185", # Assault I;
# "1631874", # [contains subsection] # Felony Strangulation;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class Subsection6(ChargeType):

expungement_rules: Any = (
"""Subsection (6) names five felony statutes that have specific circumstances of the case under which they are ineligible.
It also lists 163.165(1)(h) (Assault in the third degree) as ineligible.
It lists 163.165(1)(h) (Assault in the third degree) as ineligible. However, subsection 137.225(12) expressly names Assault 3 as eligible, and Subsection 12 is interpreted to supercede this subsection. Thus, Assault 3 is unaffected by this subsection.
This subsection also specifies conditions under which Sex Crimes are eligible or ineligible.
The remaining specifications in the statute are:""",
(
Expand All @@ -30,7 +30,4 @@ def type_eligibility(self, disposition):
if ChargeUtil.dismissed(disposition):
raise ValueError("Dismissed criminal charges should have been caught by another class.")
elif ChargeUtil.convicted(disposition):
return TypeEligibility(
EligibilityStatus.INELIGIBLE,
reason="Ineligible under 137.225(6)",
)
return TypeEligibility(EligibilityStatus.INELIGIBLE, reason="Ineligible under 137.225(6)",)
10 changes: 7 additions & 3 deletions src/backend/tests/models/charge_types/test_subsection_6.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,13 @@ def test_subsection_6_163165():
)
type_eligibility = RecordMerger.merge_type_eligibilities(charges)

assert isinstance(charges[0].charge_type, Subsection6)
assert type_eligibility.status is EligibilityStatus.INELIGIBLE
assert type_eligibility.reason == "Subsection 6 – Ineligible under 137.225(6)"
assert isinstance(charges[0].charge_type, FelonyClassC)
assert isinstance(charges[1].charge_type, Subsection6)
assert type_eligibility.status is EligibilityStatus.NEEDS_MORE_ANALYSIS
assert (
type_eligibility.reason
== "Felony Class C – Eligible under 137.225(1)(b) OR Subsection 6 – Ineligible under 137.225(6)"
)


def test_subsection_6_163200():
Expand Down

0 comments on commit 8bb70c5

Please sign in to comment.