Skip to content

Commit

Permalink
refactor: move lgbtq, cursing, sexism into social_awareness
Browse files Browse the repository at this point in the history
  • Loading branch information
Nytelife26 committed Jul 19, 2024
1 parent d621527 commit 1d9d3af
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 5 deletions.
13 changes: 13 additions & 0 deletions proselint/checks/social_awareness/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
"""Social awareness."""

from proselint.checks.social_awareness import (
lgbtq,
nword,
sexism,
)

__register__ = (
*lgbtq.__register__,
*nword.__register__,
*sexism.__register__,
)
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"avowed homosexual": "openly gay",
"special rights": "equal rights",
}),
"lgbtq.terms.glaad",
"social_awareness.lgbtq.terms.glaad",
"Possibly offensive term. Consider using '{}' instead of '{}'.",
# TODO: consider impact of setting ignore_case=True
ignore_case=False,
Expand All @@ -67,7 +67,7 @@
# homo may create false positives without additional context
# FIXME: use topic detector to decide whether "homo" is offensive
]),
"lgbtq.terms.offensive",
"social_awareness.lgbtq.terms.offensive",
"Offensive term. Remove it or consider the context.",
# TODO: consider the impact of setting ignore_case=True
ignore_case=False,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

check = CheckSpec(
Existence(["the n-word", "the n word"]),
"cursing.nword",
"social_awareness.nword",
"Take responsibility for the words you want to say.",
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"women scientists": "scientists",
# "heroine": "hero",
}),
"sexism.misc",
"social_awareness.sexism.misc",
"Gender bias. Use '{}' instead of '{}'.",
ignore_case=False,
)
Expand All @@ -88,7 +88,7 @@
"fireperson": "firefighter",
"mailperson": "mail carrier",
}),
"sexism.misc",
"social_awareness.sexism.misc",
"Not a preferred form. Use '{}' instead of '{}'.",
)

Expand Down

0 comments on commit 1d9d3af

Please sign in to comment.