Skip to content

Commit

Permalink
refactor: create industrial_language category
Browse files Browse the repository at this point in the history
  • Loading branch information
Nytelife26 committed Jul 17, 2024
1 parent bc1a7c2 commit 3cadd03
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 20 deletions.
25 changes: 25 additions & 0 deletions proselint/checks/industrial_language/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
"""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,
)

__register__ = (
*register_airlinese,
*register_bureaucratese,
*register_chatspeak,
*register_commercialese,
*register_jargon,
)
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,13 @@

examples_pass = [
"Smoke phrase with nothing flagged.",
"Have I menplaned that?",
"Did that car just hydroplane?",
"I know how to operate a planing mill.",
]

examples_fail = [
"We getting all deplaned.",
"This is your captain speaking. We will be taking off momentarily.",
"We deplaned promptly after.",
]

check = CheckSpec(
Expand All @@ -33,7 +35,7 @@
"deplan(?:e|ed|ing|ement)",
"taking off momentarily",
]),
"airlinese.misc",
"industrial_language.airlinese",
"'{}' is airlinese.",
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"meet with your approval",
"meets with your approval",
]),
"misc.bureaucratese",
"industrial_language.bureaucratese",
"'{}' is bureaucratese.",
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@
"LUV",
"OMG",
"rofl",
"roftl",
"rotfl",
"sum1",
"SWAK",
"THNX",
"THX",
"TTYL",
"XOXO",
]),
"misc.chatspeak",
"industrial_language.chatspeak",
"'{}' is chatspeak. Write it out.",
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"your favor has come to hand",
"yours of even date",
]),
"misc.commercialese",
"industrial_language.commercialese",
"'{}' is commercialese.",
)

Expand All @@ -74,7 +74,7 @@
},
padding=Pd.sep_in_txt,
),
"misc.commercialese.abbreviations",
"industrial_language.commercialese.abbreviations",
"'{}' is commercialese. Depending on audience switch to {}.",
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"elephant in the room",
"on my plate",
]),
"corporate_speak.misc",
"industrial_language.corporate_speak",
"Minimize your use of corporate catchphrases like this one.",
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"per your request",
"disincentivize",
]),
"jargon.misc",
"industrial_language.jargon",
"'{}' is jargon. Can you replace it with something more standard?",
)

Expand Down
10 changes: 0 additions & 10 deletions proselint/checks/misc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,10 @@
__register__ as register_back_formations,
)
from proselint.checks.misc.braces import __register__ as register_braces
from proselint.checks.misc.bureaucratese import (
__register__ as register_bureaucratese,
)
from proselint.checks.misc.but import __register__ as register_but
from proselint.checks.misc.capitalization import (
__register__ as register_capitalization,
)
from proselint.checks.misc.chatspeak import __register__ as register_chatspeak
from proselint.checks.misc.commercialese import (
__register__ as register_commercialese,
)
from proselint.checks.misc.composition import (
__register__ as register_composition,
)
Expand Down Expand Up @@ -72,11 +65,8 @@
*register_apologizing,
*register_back_formations,
*register_braces,
*register_bureaucratese,
*register_but,
*register_capitalization,
*register_chatspeak,
*register_commercialese,
*register_composition,
*register_currency,
*register_debased,
Expand Down

0 comments on commit 3cadd03

Please sign in to comment.