Skip to content

Commit

Permalink
refactor: tidy up check category indexes
Browse files Browse the repository at this point in the history
  • Loading branch information
Nytelife26 committed Jul 19, 2024
1 parent c96b990 commit 5b6e78a
Show file tree
Hide file tree
Showing 12 changed files with 132 additions and 198 deletions.
8 changes: 5 additions & 3 deletions proselint/checks/cliches/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
"""Avoid cliches."""

from proselint.checks.cliches.hell import __register__ as register_hell
from proselint.checks.cliches.misc import __register__ as register_misc
from proselint.checks.cliches import hell, misc

__register__ = (*register_hell, *register_misc)
__register__ = (
*hell.__register__,
*misc.__register__,
)
7 changes: 3 additions & 4 deletions proselint/checks/dates_times/__init__.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
"""Dates and times."""

from proselint.checks.dates_times.am_pm import __register__ as register_am_pm
from proselint.checks.dates_times.dates import __register__ as register_dates
from proselint.checks.dates_times import am_pm, dates

__register__ = (
*register_am_pm,
*register_dates,
*am_pm.__register__,
*dates.__register__,
)
30 changes: 11 additions & 19 deletions proselint/checks/industrial_language/__init__.py
Original file line number Diff line number Diff line change
@@ -1,25 +1,17 @@
"""Industrial language."""

from proselint.checks.industrial_language.airlinese import (
__register__ as register_airlinese,
)
from proselint.checks.industrial_language.bureaucratese import (
__register__ as register_bureaucratese,
)
from proselint.checks.industrial_language.chatspeak import (
__register__ as register_chatspeak,
)
from proselint.checks.industrial_language.commercialese import (
__register__ as register_commercialese,
)
from proselint.checks.industrial_language.jargon import (
__register__ as register_jargon,
from proselint.checks.industrial_language import (
airlinese,
bureaucratese,
chatspeak,
commercialese,
jargon,
)

__register__ = (
*register_airlinese,
*register_bureaucratese,
*register_chatspeak,
*register_commercialese,
*register_jargon,
*airlinese.__register__,
*bureaucratese.__register__,
*chatspeak.__register__,
*commercialese.__register__,
*jargon.__register__,
)
9 changes: 3 additions & 6 deletions proselint/checks/lgbtq/__init__.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
"""GLAAD."""

from proselint.checks.lgbtq.offensive_terms import (
__register__ as register_offensive_terms,
)
from proselint.checks.lgbtq.terms import __register__ as register_terms
from proselint.checks.lgbtq import offensive_terms, terms

__register__ = (
*register_offensive_terms,
*register_terms,
*offensive_terms.__register__,
*terms.__register__,
)
146 changes: 59 additions & 87 deletions proselint/checks/misc/__init__.py
Original file line number Diff line number Diff line change
@@ -1,94 +1,66 @@
"""Miscellaneous advice not otherwise categorized."""
# TODO: why are these not in _root of check-dir?

from proselint.checks.misc.apologizing import (
__register__ as register_apologizing,
from proselint.checks.misc import (
apologizing,
back_formations,
braces,
but,
capitalization,
composition,
currency,
debased,
greylist,
illogic,
inferior_superior,
institution_name,
latin,
many_a,
metadiscourse,
monotonic,
narcissism,
not_guilty,
numbers,
phrasal_adjectives,
plurals,
preferred_forms,
pretension,
professions,
scare_quotes,
suddenly,
tense_present,
waxed,
whence,
)
from proselint.checks.misc.back_formations import (
__register__ as register_back_formations,
)
from proselint.checks.misc.braces import __register__ as register_braces
from proselint.checks.misc.but import __register__ as register_but
from proselint.checks.misc.capitalization import (
__register__ as register_capitalization,
)
from proselint.checks.misc.composition import (
__register__ as register_composition,
)
from proselint.checks.misc.currency import __register__ as register_currency
from proselint.checks.misc.debased import __register__ as register_debased
from proselint.checks.misc.greylist import __register__ as register_greylist
from proselint.checks.misc.illogic import __register__ as register_illogic
from proselint.checks.misc.inferior_superior import (
__register__ as register_inferior_superior,
)
from proselint.checks.misc.institution_name import (
__register__ as register_institution_name,
)
from proselint.checks.misc.latin import __register__ as register_latin
from proselint.checks.misc.many_a import __register__ as register_many_a
from proselint.checks.misc.metadiscourse import (
__register__ as register_metadiscourse,
)
from proselint.checks.misc.monotonic import __register__ as register_monotonic
from proselint.checks.misc.narcissism import (
__register__ as register_narcissism,
)
from proselint.checks.misc.not_guilty import (
__register__ as register_not_guilty,
)
from proselint.checks.misc.numbers import __register__ as register_numbers
from proselint.checks.misc.phrasal_adjectives import (
__register__ as register_phrasal_adjectives,
)
from proselint.checks.misc.plurals import __register__ as register_plurals
from proselint.checks.misc.preferred_forms import (
__register__ as register_preferred_forms,
)
from proselint.checks.misc.pretension import (
__register__ as register_pretension,
)
from proselint.checks.misc.professions import (
__register__ as register_professions,
)
from proselint.checks.misc.scare_quotes import (
__register__ as register_scare_quotes,
)
from proselint.checks.misc.suddenly import __register__ as register_suddenly
from proselint.checks.misc.tense_present import (
__register__ as register_tense_present,
)
from proselint.checks.misc.waxed import __register__ as register_waxed
from proselint.checks.misc.whence import __register__ as register_whence

__register__ = (
*register_apologizing,
*register_back_formations,
*register_braces,
*register_but,
*register_capitalization,
*register_composition,
*register_currency,
*register_debased,
*register_greylist,
*register_illogic,
*register_inferior_superior,
*register_institution_name,
*register_latin,
*register_many_a,
*register_metadiscourse,
*register_monotonic,
*register_narcissism,
*register_not_guilty,
*register_numbers,
*register_phrasal_adjectives,
*register_plurals,
*register_preferred_forms,
*register_pretension,
*register_professions,
*register_scare_quotes,
*register_suddenly,
*register_tense_present,
*register_waxed,
*register_whence,
*apologizing.__register__,
*back_formations.__register__,
*braces.__register__,
*but.__register__,
*capitalization.__register__,
*composition.__register__,
*currency.__register__,
*debased.__register__,
*greylist.__register__,
*illogic.__register__,
*inferior_superior.__register__,
*institution_name.__register__,
*latin.__register__,
*many_a.__register__,
*metadiscourse.__register__,
*monotonic.__register__,
*narcissism.__register__,
*not_guilty.__register__,
*numbers.__register__,
*phrasal_adjectives.__register__,
*plurals.__register__,
*preferred_forms.__register__,
*pretension.__register__,
*professions.__register__,
*scare_quotes.__register__,
*suddenly.__register__,
*tense_present.__register__,
*waxed.__register__,
*whence.__register__,
)
9 changes: 3 additions & 6 deletions proselint/checks/punctuation/__init__.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
"""Check for puntuation spacing and hyperbole."""

from proselint.checks.punctuation.hyperbole import (
__register__ as register_hyperbole,
)
from proselint.checks.punctuation.misc import __register__ as register_misc
from proselint.checks.punctuation import hyperbole, misc

__register__ = (
*register_hyperbole,
*register_misc,
*hyperbole.__register__,
*misc.__register__,
)
9 changes: 3 additions & 6 deletions proselint/checks/redundancy/__init__.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
"""Redundancy."""

from proselint.checks.redundancy.misc import __register__ as register_misc
from proselint.checks.redundancy.ras_syndrome import (
__register__ as register_ras_syndrome,
)
from proselint.checks.redundancy import misc, ras_syndrome

__register__ = (
*register_misc,
*register_ras_syndrome,
*misc.__register__,
*ras_syndrome.__register__,
)
11 changes: 3 additions & 8 deletions proselint/checks/restricted/__init__.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
"""Restricted word lists."""

from proselint.checks.restricted.elementary import (
__register__ as register_elementary,
)
from proselint.checks.restricted.top1000 import (
__register__ as register_top1000,
)
from proselint.checks.restricted import elementary, top1000

__register__ = (
*register_elementary,
*register_top1000,
*elementary.__register__,
*top1000.__register__,
)
54 changes: 23 additions & 31 deletions proselint/checks/spelling/__init__.py
Original file line number Diff line number Diff line change
@@ -1,37 +1,29 @@
"""Spelling."""

from proselint.checks.spelling.able_atable import (
__register__ as register_able_atable,
from proselint.checks.spelling import (
able_atable,
able_ible,
ally_ly,
ance_ence,
athletes,
ely_ly,
em_im_en_in,
er_or,
in_un,
misc,
ve_of,
)
from proselint.checks.spelling.able_ible import (
__register__ as register_able_ible,
)
from proselint.checks.spelling.ally_ly import __register__ as register_ally_ly
from proselint.checks.spelling.ance_ence import (
__register__ as register_ance_ence,
)
from proselint.checks.spelling.athletes import (
__register__ as register_athletes,
)
from proselint.checks.spelling.ely_ly import __register__ as register_ely_ly
from proselint.checks.spelling.em_im_en_in import (
__register__ as register_em_im_en_in,
)
from proselint.checks.spelling.er_or import __register__ as register_er_or
from proselint.checks.spelling.in_un import __register__ as register_in_un
from proselint.checks.spelling.misc import __register__ as register_misc
from proselint.checks.spelling.ve_of import __register__ as register_ve_of

__register__ = (
*register_able_atable,
*register_able_ible,
*register_ally_ly,
*register_ance_ence,
*register_athletes,
*register_ely_ly,
*register_em_im_en_in,
*register_er_or,
*register_in_un,
*register_misc,
*register_ve_of,
*able_atable.__register__,
*able_ible.__register__,
*ally_ly.__register__,
*ance_ence.__register__,
*athletes.__register__,
*ely_ly.__register__,
*em_im_en_in.__register__,
*er_or.__register__,
*in_un.__register__,
*misc.__register__,
*ve_of.__register__,
)
22 changes: 9 additions & 13 deletions proselint/checks/terms/__init__.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
"""Terms."""

from proselint.checks.terms.animal_adjectives import (
__register__ as register_animal_adjectives,
from proselint.checks.terms import (
animal_adjectives,
denizen_labels,
eponymous_adjectives,
venery,
)
from proselint.checks.terms.denizen_labels import (
__register__ as register_denizen_labels,
)
from proselint.checks.terms.eponymous_adjectives import (
__register__ as register_eponymous_adjectives,
)
from proselint.checks.terms.venery import __register__ as register_venery

__register__ = (
*register_animal_adjectives,
*register_denizen_labels,
*register_eponymous_adjectives,
*register_venery,
*animal_adjectives.__register__,
*denizen_labels.__register__,
*eponymous_adjectives.__register__,
*venery.__register__,
)
18 changes: 7 additions & 11 deletions proselint/checks/typography/__init__.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
"""Advice on typography."""

from proselint.checks.typography.diacritical_marks import (
__register__ as register_diacritical_marks,
)
from proselint.checks.typography.spacing import (
__register__ as register_spacing,
)
from proselint.checks.typography.symbols import (
__register__ as register_symbols,
from proselint.checks.typography import (
diacritical_marks,
spacing,
symbols,
)

__register__ = (
*register_diacritical_marks,
*register_spacing,
*register_symbols,
*diacritical_marks.__register__,
*spacing.__register__,
*symbols.__register__,
)
Loading

0 comments on commit 5b6e78a

Please sign in to comment.