Skip to content

Commit

Permalink
Rename typography module
Browse files Browse the repository at this point in the history
  • Loading branch information
suchow committed Mar 30, 2016
1 parent 6ce0549 commit c312675
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 22 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ You can disable any of the checks by modifying `.proselintrc`.

| ID | Description |
| ----- | --------------- |
| `butterick.symbols` | Using the right symbol |
| `carlin.filth` | Words to avoid |
| `consistency.spacing` | Consistent sentence spacing |
| `consistency.spelling` | Consistent use of British vs. American spelling |
Expand Down Expand Up @@ -154,6 +153,7 @@ You can disable any of the checks by modifying `.proselintrc`.
| `strunk_white.composition` | Avoiding wordy phrases |
| `strunk_white.greylist` | Words to avoid |
| `strunk_white.usage` | Misc. usage recommendations |
| `typography.symbols` | Using the right symbol |
| `twain.damn` | Avoiding the word "very" |
| `wallace.tense_present` | Misc. advice |
| `wallace.uncomparables` | Not comparing uncomparables |
Expand Down
2 changes: 1 addition & 1 deletion plugins/vim/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ certain Proselint rules, add the IDs of the relevant rules to
```vim
let g:syntastic_text_proselint_quiet_messages = {
\ 'regex': [
\ '\m^butterick\.',
\ '\m^typography\.',
\ '\m^twain\.damn\>',
\ ] }
```
Expand Down
2 changes: 1 addition & 1 deletion proselint/.proselintrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"max_errors": 1000,
"checks": {
"butterick.symbols" : true,
"carlin.filth" : true,
"consistency.spacing" : true,
"consistency.spelling" : true,
Expand Down Expand Up @@ -67,6 +66,7 @@
"strunk_white.composition" : true,
"strunk_white.greylist" : true,
"strunk_white.usage" : true,
"typography.symbols" : true,
"wallace.redundancy" : true,
"wallace.tense_present" : true,
"wallace.uncomparables" : true,
Expand Down
1 change: 0 additions & 1 deletion proselint/checks/butterick/__init__.py

This file was deleted.

1 change: 1 addition & 0 deletions proselint/checks/typography/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""Advice on typography."""
Original file line number Diff line number Diff line change
@@ -1,25 +1,17 @@
# -*- coding: utf-8 -*-
"""Use the symbols.
"""Use the right symbols.
---
layout: post
source: Butterick's Practical Typography
source_url: http://practicaltypography.com/
title: Tense present
date: 2014-06-10 12:31:19
categories: writing
---
Use the symbols.
"""

from proselint.tools import memoize, existence_check, preferred_forms_check


@memoize
def check_ellipsis(text):
"""Use an ellipsis instead of three dots."""
err = "butterick.symbols.ellipsis"
err = "typography.symbols.ellipsis"
msg = u"'...' is an approximation, use the ellipsis symbol '…'."
regex = "\.\.\."

Expand All @@ -30,7 +22,7 @@ def check_ellipsis(text):
@memoize
def check_copyright_symbol(text):
"""Use the copyright symbol instead of (c)."""
err = "butterick.symbols.copyright"
err = "typography.symbols.copyright"
msg = u"(c) is a goofy alphabetic approximation, use the symbol ©."
regex = "\([cC]\)"

Expand All @@ -41,7 +33,7 @@ def check_copyright_symbol(text):
@memoize
def check_trademark_symbol(text):
"""Use the trademark symbol instead of (TM)."""
err = "butterick.symbols.trademark"
err = "typography.symbols.trademark"
msg = u"(TM) is a goofy alphabetic approximation, use the symbol ™."
regex = "\(TM\)"

Expand All @@ -52,7 +44,7 @@ def check_trademark_symbol(text):
@memoize
def check_registered_trademark_symbol(text):
"""Use the registered trademark symbol instead of (R)."""
err = "butterick.symbols.trademark"
err = "typography.symbols.trademark"
msg = u"(R) is a goofy alphabetic approximation, use the symbol ®."
regex = "\([rR]\)"

Expand All @@ -63,7 +55,7 @@ def check_registered_trademark_symbol(text):
@memoize
def check_sentence_spacing(text):
"""Use no more than two spaces after a period."""
err = "butterick.symbols.sentence_spacing"
err = "typography.symbols.sentence_spacing"
msg = u"More than two spaces after the period; use 1 or 2."
regex = "\. {3}"

Expand All @@ -74,7 +66,7 @@ def check_sentence_spacing(text):
@memoize
def check_multiplication_symbol(text):
u"""Use the multiplication symbol ×, not the lowercase letter x."""
err = "butterick.symbols.multiplication_symbol"
err = "typography.symbols.multiplication_symbol"
msg = u"Use the multiplication symbol ×, not the letter x."
regex = "[0-9]+ ?x ?[0-9]+"

Expand All @@ -85,7 +77,7 @@ def check_multiplication_symbol(text):
@memoize
def check_curly_quotes(text):
u"""Use curly quotes, not straight quotes."""
err = "butterick.symbols.curly_quotes"
err = "typography.symbols.curly_quotes"
msg = u'Use curly quotes “”, not straight quotes "".'

list = [
Expand Down
2 changes: 1 addition & 1 deletion site/_posts/2014-06-10-checks.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ Here is a list of what <tt>proselint</tt> checks.

| ID | Description |
| ----- | --------------- |
| `butterick.symbols` | Using the right symbol |
| `carlin.filth` | Words to avoid |
| `consistency.spacing` | Consistent sentence spacing |
| `consistency.spelling` | Consistent use of British vs. American spelling |
Expand Down Expand Up @@ -67,6 +66,7 @@ Here is a list of what <tt>proselint</tt> checks.
| `strunk_white.composition` | Avoiding wordy phrases |
| `strunk_white.greylist` | Words to avoid |
| `strunk_white.usage` | Misc. usage recommendations |
| `typography.symbols` | Using the right symbol |
| `wallace.tense_present` | Misc. advice |
| `wallace.uncomparables` | Not comparing uncomparables |
| `white.damn` | Avoiding the word "very" |
Expand Down

0 comments on commit c312675

Please sign in to comment.