[Python-modules-commits] [python3-proselint] 01/07: Import python3-proselint_0.7.0.orig.tar.gz
Víctor Cuadrado Juan
viccuad-guest at moszumanska.debian.org
Sun Nov 6 17:52:06 UTC 2016
This is an automated email from the git hooks/post-receive script.
viccuad-guest pushed a commit to branch master
in repository python3-proselint.
commit 9431fd0ca51f1b07831deb1b450eac806989cc1a
Author: Víctor Cuadrado Juan <me at viccuad.me>
Date: Sun Nov 6 11:24:51 2016 +0100
Import python3-proselint_0.7.0.orig.tar.gz
---
PKG-INFO | 4 +-
README.md | 70 ++--
proselint.egg-info/PKG-INFO | 4 +-
proselint.egg-info/SOURCES.txt | 28 +-
proselint.egg-info/pbr.json | 2 +-
proselint/.proselintrc | 2 +-
proselint/__init__.py | 3 +
proselint/checks/archaism/misc.py | 2 +-
proselint/checks/consistency/spelling.py | 1 +
proselint/checks/corporate_speak/misc.py | 2 +-
proselint/checks/cursing/filth.py | 2 +-
proselint/checks/cursing/nfl.py | 2 +-
proselint/checks/cursing/nword.py | 2 +-
proselint/checks/hedging/misc.py | 4 +-
proselint/checks/lexical_illusions/misc.py | 2 +-
proselint/checks/lgbtq/__init__.py | 1 +
proselint/checks/lgbtq/offensive_terms.py | 41 +++
proselint/checks/lgbtq/terms.py | 39 +++
proselint/checks/links/broken.py | 4 +-
proselint/checks/misc/apologizing.py | 4 +-
proselint/checks/misc/composition.py | 7 +-
proselint/checks/misc/greylist.py | 8 +-
proselint/checks/misc/metaconcepts.py | 4 +-
.../checks/misc/{narcisissm.py => narcissism.py} | 14 +-
proselint/checks/misc/phrasal_adjectives.py | 2 +
proselint/checks/misc/scare_quotes.py | 4 +-
proselint/checks/misc/tense_present.py | 7 +-
proselint/checks/misc/usage.py | 6 +-
proselint/checks/redundancy/misc.py | 358 +++++++++++++++++++++
proselint/checks/redundancy/ras_syndrome.py | 3 +
proselint/checks/sexism/misc.py | 2 +-
proselint/checks/terms/venery.py | 1 +
proselint/checks/typography/diacritical_marks.py | 2 +-
proselint/checks/typography/exclamation.py | 4 +-
proselint/checks/uncomparables/misc.py | 7 +-
proselint/command_line.py | 161 ++-------
proselint/score.py | 5 +-
proselint/tools.py | 172 ++++++++--
proselint/version.py | 2 +-
setup.cfg | 4 +-
tests/_test_version.py | 2 +-
tests/test_annotations.py | 23 ++
tests/test_archaism.py | 23 ++
tests/test_cliches.py | 46 +++
tests/test_consistency_check.py | 32 ++
tests/test_consistency_spacing.py | 24 ++
tests/test_consistency_spelling.py | 24 ++
tests/test_corporate_speak.py | 23 ++
tests/test_cursing_filth.py | 22 ++
tests/test_cursing_nfl.py | 22 ++
tests/test_cursing_nword.py | 22 ++
tests/test_dates_times_am_pm.py | 73 +++++
tests/test_dates_times_dates.py | 87 +++++
tests/test_demo.py | 2 +-
tests/test_existence_check.py | 52 +++
tests/test_exit_codes.py | 4 +-
tests/test_garner_dates.py | 2 +-
tests/test_hedging.py | 22 ++
tests/test_hyperbole.py | 22 ++
tests/test_illegal_chars.py | 29 ++
tests/test_jargon.py | 22 ++
tests/test_junge_but.py | 2 +-
tests/test_leonard.py | 27 ++
tests/test_lexical_illusions.py | 22 ++
tests/test_lgbtq_offensive_terms.py | 23 ++
tests/test_lgbtq_terms.py | 31 ++
tests/test_preferred_forms_check.py | 40 +++
tests/test_tools.py | 35 ++
68 files changed, 1518 insertions(+), 232 deletions(-)
diff --git a/PKG-INFO b/PKG-INFO
index d76873c..8f19161 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,11 +1,11 @@
Metadata-Version: 1.1
Name: proselint
-Version: 0.5.3
+Version: 0.7.0
Summary: A linter for prose
Home-page: http://github.com/amperser/proselint
Author: Amperser Labs
Author-email: hello at amperser.com
License: BSD
-Download-URL: http://github.com/amperser/proselint/tarball/0.5.3
+Download-URL: http://github.com/amperser/proselint/tarball/0.7.0
Description: UNKNOWN
Platform: UNKNOWN
diff --git a/README.md b/README.md
index 6a3d672..c5f6feb 100644
--- a/README.md
+++ b/README.md
@@ -3,11 +3,11 @@
[![Build Status](https://travis-ci.org/amperser/proselint.svg)](https://travis-ci.org/amperser/proselint)
[![Build status](https://ci.appveyor.com/api/projects/status/hfgv05nkjxkg2gcc/branch/master?svg=true)](https://ci.appveyor.com/project/suchow/proselint-knwyf/branch/master)
[![Code Climate](https://codeclimate.com/repos/5538989ee30ba0793100090f/badges/e10a2fe18a9256d69e2a/gpa.svg)](https://codeclimate.com/repos/5538989ee30ba0793100090f/feed)
-[![Coverage Status](https://coveralls.io/repos/amperser/proselint/badge.svg?branch=master&service=github&t=2lhJpx)](https://coveralls.io/github/amperser/proselint?branch=master)
-![Lint score](http://img.shields.io/badge/lintscore_v0.1.0-98.8-blue.svg)
+[![Coverage Status](https://coveralls.io/repos/github/amperser/proselint/badge.svg?branch=master)](https://coveralls.io/github/amperser/proselint?branch=master)
[![Dependency Status](https://gemnasium.com/amperser/proselint.svg)](https://gemnasium.com/amperser/proselint)
+[![License](https://img.shields.io/badge/License-BSD-blue.svg)](https://en.wikipedia.org/wiki/BSD_licenses)
-Writing is notoriously hard, even for the best writers. Yet there is a tremendous amount of knowledge about the discipline strewn across usage guides, dictionaries, technical manuals, essays, pamphlets, websites, and the hearts and minds of great authors and editors. But poring over Strunk & White hardly makes one a better writer — it turns you into neither Strunk nor White. And nobody has the capacity to apply all the advice from *Garner’s Modern American Usage*, a 975-page usage guide, [...]
+Writing is notoriously hard, even for the best writers, and it's not for lack of good advice — a tremendous amount of knowledge about the craft is strewn across usage guides, dictionaries, technical manuals, essays, pamphlets, websites, and the hearts and minds of great authors and editors. But poring over Strunk & White hardly makes one a better writer — it turns you into neither Strunk nor White. And nobody has the capacity to apply all the advice from *Garner’s Modern American Usage*, [...]
We devised a simple solution: `proselint`, a linter for prose. (A linter is a computer program that, like a spell checker, scans through a document and analyzes it.)
@@ -19,15 +19,33 @@ We devised a simple solution: `proselint`, a linter for prose. (A linter is a co
To get this up and running, install it using pip: `pip install proselint`.
+### Plugins for other software
+
+`proselint` is available on:
+
+- [x] A [demo editor](http://proselint.com/write)
+- [x] [Sublime Text](https://github.com/amperser/proselint/tree/master/plugins/sublime/SublimeLinter-contrib-proselint)
+- [x] [Atom Editor](https://github.com/smockle/linter-proselint) (thanks to [Clay Miller](https://github.com/smockle)).
+- [x] [Emacs via Flycheck](https://github.com/amperser/proselint/tree/master/plugins/flycheck) (thanks to [Aaron Jacobs](https://github.com/atheriel))
+- [x] [Vim](https://github.com/amperser/proselint/tree/master/plugins/vim) (thanks to [Matthias Bussonnier](https://github.com/Carreau))
+- [x] [Phabricator's `arc` CLI](https://github.com/google/arc-proselint) (thanks to [Jeff Verkoeyen](https://github.com/jverkoey))
+- [x] [Danger](https://github.com/dbgrandi/danger-prose) (thanks to [David Grandinetti](https://github.com/dbgrandi) and [Orta Therox](https://github.com/orta))
+
### Usage
-You can run `proselint` on a document:
+Suppose you had a document `text.md` with the following text:
+
+```
+John is very unique.
+```
+
+You can run `proselint` over the document using the command line:
```bash
❯ proselint text.md
```
-This prints a list of suggestions to stdout, one per line. Each suggestion will have the form:
+This prints a list of suggestions to stdout, one per line. Each suggestion has the form:
```bash
text.md:<line>:<column>: <check_name> <message>
@@ -36,10 +54,10 @@ text.md:<line>:<column>: <check_name> <message>
For example,
```bash
-text.md:0:10: wallace.uncomparables Comparison of an uncomparable: 'unique' can not be compared.
+text.md:0:10: wallace.uncomparables Comparison of an uncomparable: 'unique' cannot be compared.
```
-The command-line utility can also print the list of suggestions in JSON using the `--json` flag. In this case, the output is considerably richer:
+The command-line utility can also print suggestions in JSON using the `--json` flag. In this case, the output is considerably richer:
```javascript
{
@@ -47,7 +65,7 @@ The command-line utility can also print the list of suggestions in JSON using th
check: "wallace.uncomparables",
// Message to describe the suggestion.
- message: "Comparison of an uncomparable: 'unique' can not be compared.",
+ message: "Comparison of an uncomparable: 'unique' cannot be compared.",
// The person or organization giving the suggestion.
source: "David Foster Wallace"
@@ -82,16 +100,6 @@ The command-line utility can also print the list of suggestions in JSON using th
}
```
-### Available plugins for text editors
-
-`proselint` is available on:
-
-- [x] A live [demo page](http://proselint.com/write)
-- [x] [Sublime Text](https://github.com/amperser/proselint/tree/master/plugins/sublime/SublimeLinter-contrib-proselint)
-- [x] [Atom Editor](https://github.com/smockle/linter-proselint) (thanks to [Clay Miller](https://github.com/smockle)).
-- [x] [Emacs via Flycheck](https://github.com/amperser/proselint/tree/master/plugins/flycheck) (thanks to [Aaron Jacobs](https://github.com/atheriel))
-- [x] [Vim](https://github.com/amperser/proselint/tree/master/plugins/vim) (thanks to [Matthias Bussonnier](https://github.com/Carreau))
-
### Checks
You can disable any of the checks by modifying `.proselintrc`.
@@ -105,7 +113,7 @@ You can disable any of the checks by modifying `.proselintrc`.
| `cliches.misc` | Avoiding clichés |
| `consistency.spacing` | Consistent sentence spacing |
| `consistency.spelling` | Consistent spelling |
-| `corporate_speak.misc` | Avoiding corporate buzzwords` |
+| `corporate_speak.misc` | Avoiding corporate buzzwords |
| `cursing.filth` | Words to avoid |
| `cursing.nfl` | Avoiding words banned by the NFL |
| `dates_times.am_pm` | Using the right form for the time of day |
@@ -131,7 +139,7 @@ You can disable any of the checks by modifying `.proselintrc`.
| `misc.latin` | Avoiding overuse of Latin phrases |
| `misc.many_a` | Many a singular |
| `misc.metaconcepts` | Avoiding overuse of metaconcepts |
-| `misc.narcisissm` | Talking about the subject, not its study |
+| `misc.narcissism` | Talking about the subject, not its study |
| `misc.phrasal_adjectives` | Hyphenating phrasal adjectives |
| `misc.preferred_forms` | Miscellaneous preferred forms |
| `misc.pretension` | Avoiding being pretentious |
@@ -175,3 +183,25 @@ You can disable any of the checks by modifying `.proselintrc`.
### Contributing
Interested in contributing to `proselint`? Great — there are plenty of ways you can help. Read more on [our website](http://proselint.com/contributing/), where we describe how you can help us build `proselint` into the greatest writing tool in the world.
+
+- [Issue Tracker](http://github.com/amperser/proselint/issues)
+- [Source Code](http://github.com/amperser/proselint)
+
+### Support
+
+If you run into a problem, please [open an issue](http://github.com/amperser/proselint/issues) in or send an email to hello at amperser.com.
+
+### Running Automated Tests
+
+Automated tests are included in the `proselint/tests` directory. To run these tests locally, use the test runner [nose](http://nose.readthedocs.io/en/latest/) and run the following commands:
+```bash
+cd tests/
+nosetests
+```
+and watch the output. Nose is compatible with Python versions 2.7, 3.3, 3.4 and 3.5.
+
+All automated tests in `tests/` are run as part of each submitted pull request, including newly added tests.
+
+### License
+
+The project is licensed under the BSD license.
diff --git a/proselint.egg-info/PKG-INFO b/proselint.egg-info/PKG-INFO
index d76873c..8f19161 100644
--- a/proselint.egg-info/PKG-INFO
+++ b/proselint.egg-info/PKG-INFO
@@ -1,11 +1,11 @@
Metadata-Version: 1.1
Name: proselint
-Version: 0.5.3
+Version: 0.7.0
Summary: A linter for prose
Home-page: http://github.com/amperser/proselint
Author: Amperser Labs
Author-email: hello at amperser.com
License: BSD
-Download-URL: http://github.com/amperser/proselint/tarball/0.5.3
+Download-URL: http://github.com/amperser/proselint/tarball/0.7.0
Description: UNKNOWN
Platform: UNKNOWN
diff --git a/proselint.egg-info/SOURCES.txt b/proselint.egg-info/SOURCES.txt
index d06b072..526f5c6 100644
--- a/proselint.egg-info/SOURCES.txt
+++ b/proselint.egg-info/SOURCES.txt
@@ -48,6 +48,9 @@ proselint/checks/jargon/__init__.py
proselint/checks/jargon/misc.py
proselint/checks/lexical_illusions/__init__.py
proselint/checks/lexical_illusions/misc.py
+proselint/checks/lgbtq/__init__.py
+proselint/checks/lgbtq/offensive_terms.py
+proselint/checks/lgbtq/terms.py
proselint/checks/links/__init__.py
proselint/checks/links/broken.py
proselint/checks/malapropisms/__init__.py
@@ -71,7 +74,7 @@ proselint/checks/misc/latin.py
proselint/checks/misc/many_a.py
proselint/checks/misc/metaconcepts.py
proselint/checks/misc/metadiscourse.py
-proselint/checks/misc/narcisissm.py
+proselint/checks/misc/narcissism.py
proselint/checks/misc/not_guilty.py
proselint/checks/misc/phrasal_adjectives.py
proselint/checks/misc/preferred_forms.py
@@ -131,11 +134,34 @@ proselint/checks/weasel_words/very.py
tests/__init__.py
tests/_test_version.py
tests/check.py
+tests/test_annotations.py
+tests/test_archaism.py
tests/test_butterick_symbols.py
+tests/test_cliches.py
+tests/test_consistency_check.py
+tests/test_consistency_spacing.py
+tests/test_consistency_spelling.py
+tests/test_corporate_speak.py
+tests/test_cursing_filth.py
+tests/test_cursing_nfl.py
+tests/test_cursing_nword.py
+tests/test_dates_times_am_pm.py
+tests/test_dates_times_dates.py
tests/test_demo.py
tests/test_dfw_uncomparables.py
+tests/test_existence_check.py
tests/test_exit_codes.py
tests/test_garner_dates.py
+tests/test_hedging.py
+tests/test_hyperbole.py
+tests/test_illegal_chars.py
+tests/test_jargon.py
tests/test_junge_but.py
+tests/test_leonard.py
+tests/test_lexical_illusions.py
+tests/test_lgbtq_offensive_terms.py
+tests/test_lgbtq_terms.py
+tests/test_preferred_forms_check.py
tests/test_strunk_white_eos.py
+tests/test_tools.py
tests/test_topic_detector.py
\ No newline at end of file
diff --git a/proselint.egg-info/pbr.json b/proselint.egg-info/pbr.json
index 3e7b9be..fa316e6 100644
--- a/proselint.egg-info/pbr.json
+++ b/proselint.egg-info/pbr.json
@@ -1 +1 @@
-{"is_release": false, "git_version": "40297c6"}
\ No newline at end of file
+{"is_release": false, "git_version": "ac026b4"}
\ No newline at end of file
diff --git a/proselint/.proselintrc b/proselint/.proselintrc
index c6f9b16..9862298 100644
--- a/proselint/.proselintrc
+++ b/proselint/.proselintrc
@@ -37,7 +37,7 @@
"misc.many_a" : true,
"misc.metaconcepts" : true,
"misc.metadiscourse" : true,
- "misc.narcisissm" : true,
+ "misc.narcissism" : true,
"misc.not_guilty" : true,
"misc.phrasal_adjectives" : true,
"misc.preferred_forms" : true,
diff --git a/proselint/__init__.py b/proselint/__init__.py
index 9cd4315..5483d1f 100644
--- a/proselint/__init__.py
+++ b/proselint/__init__.py
@@ -1 +1,4 @@
"""Proselint applies advice from great writers to your writing."""
+from . import tools
+
+__all__ = ('tools')
diff --git a/proselint/checks/archaism/misc.py b/proselint/checks/archaism/misc.py
index aae1264..e42505e 100644
--- a/proselint/checks/archaism/misc.py
+++ b/proselint/checks/archaism/misc.py
@@ -75,7 +75,7 @@ def check(text):
# "designer", when used to mean a plotter against Christ
# "demean", when used to mean "to behave" in legal contexts
# "by the bye", # variant, modern is "by the by"
- # "comptroller" # in british english
+ # "comptroller" # in British English
# "abortive" Abortive is archaic in reference to abortions of fetuses,
# except in the sense “causing an abortion.”
]
diff --git a/proselint/checks/consistency/spelling.py b/proselint/checks/consistency/spelling.py
index 5582eba..e02b10f 100644
--- a/proselint/checks/consistency/spelling.py
+++ b/proselint/checks/consistency/spelling.py
@@ -33,6 +33,7 @@ def check(text):
["advisor", "adviser"],
# ["analyse", "analyze"],
["centre", "center"],
+ ["colour", "color"],
["emphasise", "emphasize"],
["finalise", "finalize"],
["focussed", "focused"],
diff --git a/proselint/checks/corporate_speak/misc.py b/proselint/checks/corporate_speak/misc.py
index 30cd9e6..320eff2 100644
--- a/proselint/checks/corporate_speak/misc.py
+++ b/proselint/checks/corporate_speak/misc.py
@@ -17,7 +17,7 @@ from proselint.tools import existence_check, memoize
@memoize
-def check_repeated_exclamations(text):
+def check(text):
"""Check the text."""
err = "corporate_speak.misc"
msg = u"Minimize your use of corporate catchphrases like this one."
diff --git a/proselint/checks/cursing/filth.py b/proselint/checks/cursing/filth.py
index 5f5ef51..a21b461 100644
--- a/proselint/checks/cursing/filth.py
+++ b/proselint/checks/cursing/filth.py
@@ -17,7 +17,7 @@ from proselint.tools import existence_check, memoize
@memoize
-def check_debased_language(text):
+def check(text):
"""Check the text."""
err = "cursing.filth"
msg = u"""Nobody ever tells you this as a kid, but you're supposed to avoid
diff --git a/proselint/checks/cursing/nfl.py b/proselint/checks/cursing/nfl.py
index 708615d..9659d47 100644
--- a/proselint/checks/cursing/nfl.py
+++ b/proselint/checks/cursing/nfl.py
@@ -17,7 +17,7 @@ from proselint.tools import existence_check, memoize
@memoize
-def check_debased_language(text):
+def check(text):
"""Check the text."""
err = "cursing.nfl"
msg = u"The NFL won't print this word on a jersey."
diff --git a/proselint/checks/cursing/nword.py b/proselint/checks/cursing/nword.py
index 5b90a53..bff0484 100644
--- a/proselint/checks/cursing/nword.py
+++ b/proselint/checks/cursing/nword.py
@@ -17,7 +17,7 @@ from proselint.tools import existence_check, memoize
@memoize
-def check_repeated_exclamations(text):
+def check(text):
"""Check the text."""
err = "cursing.nword"
msg = u"Take responsibility for the shitty words you want to say."
diff --git a/proselint/checks/hedging/misc.py b/proselint/checks/hedging/misc.py
index 3150903..c7daba4 100644
--- a/proselint/checks/hedging/misc.py
+++ b/proselint/checks/hedging/misc.py
@@ -22,10 +22,10 @@ def check(text):
err = "hedging.misc"
msg = "Hedging. Just say it."
- narcisissm = [
+ narcissism = [
"I would argue that",
", so to speak",
"to a certain degree",
]
- return existence_check(text, narcisissm, err, msg)
+ return existence_check(text, narcissism, err, msg)
diff --git a/proselint/checks/lexical_illusions/misc.py b/proselint/checks/lexical_illusions/misc.py
index f43e289..19489b5 100644
--- a/proselint/checks/lexical_illusions/misc.py
+++ b/proselint/checks/lexical_illusions/misc.py
@@ -9,7 +9,7 @@ date: 2014-06-10 12:31:19
categories: writing
---
-A lexical illusion happens when a word word is unintentiall repeated twice, and
+A lexical illusion is when a word word is unintentionally repeated twice, and
and this happens most often between line breaks.
"""
diff --git a/proselint/checks/lgbtq/__init__.py b/proselint/checks/lgbtq/__init__.py
new file mode 100644
index 0000000..a0d0603
--- /dev/null
+++ b/proselint/checks/lgbtq/__init__.py
@@ -0,0 +1 @@
+"""GLAAD."""
diff --git a/proselint/checks/lgbtq/offensive_terms.py b/proselint/checks/lgbtq/offensive_terms.py
new file mode 100644
index 0000000..daf9694
--- /dev/null
+++ b/proselint/checks/lgbtq/offensive_terms.py
@@ -0,0 +1,41 @@
+# -*- coding: utf-8 -*-
+"""GLAAD.
+
+---
+layout: post
+source: GLAAD Media Reference Guide - 9th Edition
+source_url: http://www.glaad.org/reference
+title: GLAAD Guidelines
+date: 2016-07-06
+categories: writing
+---
+
+This check looks for offensive terms related to LGBTQ issues and
+raises an error marking them as offensive. The New York Times and
+Associated Press have also adopted this style guide.
+
+"""
+from proselint.tools import memoize, existence_check
+
+
+ at memoize
+def check(text):
+ """Flag offensive words based on the GLAAD reference guide."""
+ err = "glaad.offensive_terms"
+ msg = "Offensive term. Remove it or consider the context."
+
+ list = [
+ "fag",
+ "faggot",
+ "dyke",
+ "sodomite",
+ "homosexual agenda",
+ "gay agenda",
+ "transvestite",
+ "homosexual lifestyle",
+ "gay lifestyle"
+ # homo - may create false positives without additional context
+ # FIXME use topic detetor to decide whether "homo" is offensive
+ ]
+
+ return existence_check(text, list, err, msg, join=True, ignore_case=False)
diff --git a/proselint/checks/lgbtq/terms.py b/proselint/checks/lgbtq/terms.py
new file mode 100644
index 0000000..67bf378
--- /dev/null
+++ b/proselint/checks/lgbtq/terms.py
@@ -0,0 +1,39 @@
+# -*- coding: utf-8 -*-
+"""GLAAD.
+
+---
+layout: post
+source: GLAAD Media Reference Guide - 9th Edition
+source_url: http://www.glaad.org/reference
+title: GLAAD Guidelines
+date: 2016-07-06
+categories: writing
+---
+
+This check looks for possibly offensive terms related to LGBTQ issues and
+makes more acceptable recommendations. TheNew York Times and
+Associated Press have also adopted this style guide.
+
+"""
+from proselint.tools import memoize, preferred_forms_check
+
+
+ at memoize
+def check(text):
+ """Suggest preferred forms given the reference document."""
+ err = "glaad.terms"
+ msg = "Possibly offensive term. Consider using '{}' instead of '{}'."
+
+ list = [
+ ["gay man", ["homosexual man"]],
+ ["gay men", ["homosexual men"]],
+ ["lesbian", ["homosexual woman"]],
+ ["lesbians", ["homosexual women"]],
+ ["gay people", ["homosexual people"]],
+ ["gay couple", ["homosexual couple"]],
+ ["sexual orientation", ["sexual preference"]],
+ ["openly gay", ["admitted homosexual", "avowed homosexual"]],
+ ["equal rights", ["special rights"]]
+ ]
+
+ return preferred_forms_check(text, list, err, msg, ignore_case=False)
diff --git a/proselint/checks/links/broken.py b/proselint/checks/links/broken.py
index 5ba9dcc..fc66f4f 100644
--- a/proselint/checks/links/broken.py
+++ b/proselint/checks/links/broken.py
@@ -10,7 +10,7 @@ date: 2014-06-10 12:31:19
categories: writing
---
-Check that links are not not broken.
+Check that links are not broken.
"""
from proselint.tools import memoize
@@ -45,7 +45,7 @@ def check(text):
url = "http://" + url
if is_broken_link(url):
- errors.append((m.start(), m.end(), err, msg.format(url)))
+ errors.append((m.start(), m.end(), err, msg.format(url), None))
return errors
diff --git a/proselint/checks/misc/apologizing.py b/proselint/checks/misc/apologizing.py
index 25ac4ef..17a4bbd 100644
--- a/proselint/checks/misc/apologizing.py
+++ b/proselint/checks/misc/apologizing.py
@@ -22,8 +22,8 @@ def check(text):
err = "pinker.apologizing"
msg = "Excessive apologizing."
- narcisissm = [
+ narcissism = [
"More research is needed",
]
- return existence_check(text, narcisissm, err, msg)
+ return existence_check(text, narcissism, err, msg)
diff --git a/proselint/checks/misc/composition.py b/proselint/checks/misc/composition.py
index a5d0fab..9f8b744 100644
--- a/proselint/checks/misc/composition.py
+++ b/proselint/checks/misc/composition.py
@@ -23,10 +23,11 @@ Strunk & White say:
a double negative.
* Ex: He was not very often on time. -> He usually came late.
* Ex:
-4.1. Placing negative and positive in oposition makes for a stronger structure.
+4.1. Placing negative and positive in opposition makes for a stronger
+structure.
* Ex. Not charity, but simple justice.
* Not that I loved Caesar less, but that I loved Rome more.
-4.2. Do not use unnecessary auxillaries or conditionals.
+4.2. Do not use unnecessary auxiliaries or conditionals.
5. Use definite, specific, concrete language.
* A period of unfavorable weather set in. ->It rained every day for a week.
6. Omit needless words.
@@ -35,7 +36,7 @@ Strunk & White say:
7. Avoid a succession of loose sentences.
* MDPNB Principle of brevity. Take 2.
8. Express coordinate ideas in similar form.
- * MDPNB: Prinicple of parrallel structure.
+ * MDPNB: Principle of parallel structure.
* MDPNB: This one will be hard...
9. Keep related words together.
* MDPNB: Principle of localism in semantics.
diff --git a/proselint/checks/misc/greylist.py b/proselint/checks/misc/greylist.py
index d04d10b..aa112e5 100644
--- a/proselint/checks/misc/greylist.py
+++ b/proselint/checks/misc/greylist.py
@@ -39,7 +39,11 @@ def check(text):
for word in bad_words:
occ = [m for m in re.finditer(word, text.lower())]
for o in occ:
- errors.append((o.start(), o.end(), err,
- msg.format(word, explanations[word])))
+ errors.append((
+ o.start(),
+ o.end(),
+ err,
+ msg.format(word, explanations[word]),
+ None))
return errors
diff --git a/proselint/checks/misc/metaconcepts.py b/proselint/checks/misc/metaconcepts.py
index b312636..b8c9693 100644
--- a/proselint/checks/misc/metaconcepts.py
+++ b/proselint/checks/misc/metaconcepts.py
@@ -22,8 +22,8 @@ Point out misuse of scare quotes.
# err = "pinker.metaconcepts"
# msg = "Misuse of 'scare quotes'. Delete them."
-# narcisissm = [
+# narcissism = [
# "the 'take-home message'",
# ]
-# return existence_check(text, narcisissm, err, msg)
+# return existence_check(text, narcissism, err, msg)
diff --git a/proselint/checks/misc/narcisissm.py b/proselint/checks/misc/narcissism.py
similarity index 58%
rename from proselint/checks/misc/narcisissm.py
rename to proselint/checks/misc/narcissism.py
index e1365a2..4df1008 100644
--- a/proselint/checks/misc/narcisissm.py
+++ b/proselint/checks/misc/narcissism.py
@@ -1,16 +1,16 @@
# -*- coding: utf-8 -*-
-"""Professional narcisissm.
+"""Professional narcissism.
---
layout: post
source: Pinker's book on writing
source_url: ???
-title: professional narcisissm
+title: professional narcissism
date: 2014-06-10 12:31:19
categories: writing
---
-Points out academic narcisissm.
+Points out academic narcissism.
"""
from proselint.tools import memoize, existence_check
@@ -19,11 +19,11 @@ from proselint.tools import memoize, existence_check
@memoize
def check(text):
"""Suggest the preferred forms."""
- err = "pinker.narcisissm"
- msg = "Professional narcisissm. Talk about the subject, not its study."
+ err = "pinker.narcissism"
+ msg = "Professional narcissism. Talk about the subject, not its study."
- narcisissm = [
+ narcissism = [
"In recent years, an increasing number of [a-zA-Z]{3,}sts have",
]
- return existence_check(text, narcisissm, err, msg)
+ return existence_check(text, narcissism, err, msg)
diff --git a/proselint/checks/misc/phrasal_adjectives.py b/proselint/checks/misc/phrasal_adjectives.py
index 3ac6ab7..a085207 100644
--- a/proselint/checks/misc/phrasal_adjectives.py
+++ b/proselint/checks/misc/phrasal_adjectives.py
@@ -42,6 +42,7 @@ def check_examples(text):
["criminal-law professor", ["criminal law professor"]],
["cut-and-dried issue", ["cut and dried issue"]],
["downward-sloping line", ["downward sloping line"]],
+ ["English-language learners", ["English language learners"]],
["English-speaking people", ["English speaking people"]],
["even-numbered", ["even numbered"]],
["face-to-face meeting", ["fact to face meeting"]],
@@ -93,6 +94,7 @@ def check_examples(text):
["razor-sharp wit", ["razor sharp wit"]],
["larger-than-life personality", ["larger than life personality"]],
["real-estate prices", ["real estate prices"]],
+ ["real-estate tycoon", ["real estate tycoon"]],
["right-wing militia", ["right wing militia"]],
["round-trip flight", ["round trip flight"]],
["search-and-rescue operation", ["search and rescue operation"]],
diff --git a/proselint/checks/misc/scare_quotes.py b/proselint/checks/misc/scare_quotes.py
index 4895ae3..1b3ad5d 100644
--- a/proselint/checks/misc/scare_quotes.py
+++ b/proselint/checks/misc/scare_quotes.py
@@ -22,8 +22,8 @@ def check(text):
err = "pinker.scare_quotes"
msg = "Misuse of 'scare quotes'. Delete them."
- narcisissm = [
+ narcissism = [
"the 'take-home message'",
]
- return existence_check(text, narcisissm, err, msg)
+ return existence_check(text, narcissism, err, msg)
diff --git a/proselint/checks/misc/tense_present.py b/proselint/checks/misc/tense_present.py
index 7945303..8015470 100644
--- a/proselint/checks/misc/tense_present.py
+++ b/proselint/checks/misc/tense_present.py
@@ -41,6 +41,11 @@ def check(text):
for i in illogics:
for m in re.finditer(u"\s{}\s".format(i), text, flags=re.U | re.I):
txt = m.group(0).strip()
- errors.append((m.start() + 1, m.end(), err, msg.format(txt)))
+ errors.append((
+ m.start() + 1,
+ m.end(),
+ err,
+ msg.format(txt),
+ None))
return errors
diff --git a/proselint/checks/misc/usage.py b/proselint/checks/misc/usage.py
index 18e7fdd..881ac7d 100644
--- a/proselint/checks/misc/usage.py
+++ b/proselint/checks/misc/usage.py
@@ -10,7 +10,7 @@ categories: writing
---
Strunk & White say:
-1. Form the possesive singular of nouns by adding 's.
+1. Form the possessive singular of nouns by adding 's.
2. In a series of three or more terms with a conjunction, use a comma after
each term except the last.
3. Enclose parenthetic expressions between commas. ("This rule is difficult to
@@ -19,8 +19,8 @@ apply.")
5. Do not join independent clauses with a comma; use a semi-colon. Or a period.
6. Do not break sentences in two. Do not use periods for the role of commas.
7. Use a colon after an independent clause if you introduce: a list of
-particulars, an appositive, an application, or an illustative quotation.
-8. Use a dash to set off an aburpt break or interruption and to announce a
+particulars, an appositive, an application, or an illustrative quotation.
+8. Use a dash to set off an abrupt break or interruption and to announce a
long appositive or summary.
9. The number of the subject determines the number of the verb. (MDPNB: This
will require nltk & syntactic parsing)
diff --git a/proselint/checks/redundancy/misc.py b/proselint/checks/redundancy/misc.py
index 594aade..1a46d90 100644
--- a/proselint/checks/redundancy/misc.py
+++ b/proselint/checks/redundancy/misc.py
@@ -139,3 +139,361 @@ def check_nordquist(text):
["p.m.", ["p.m. at night"]],
]
return preferred_forms_check(text, redundancies, err, msg)
+
+
+ at memoize
+def check_atd(text):
+ """Check for redundancies from After the Deadline."""
+ err = "after_the_deadline.redundancy"
+ msg = "Redundancy. Use '{}' instead of '{}'."
+
+ redundancies = [
+ [u"Bō", ["Bo Staff"]],
+ ["Challah", ["Challah bread"]],
+ ["Hallah", ["Hallah bread"]],
+ ["Challah", ["Challah bread"]],
+ ["I", ["I myself", "I personally"]],
+ ["Mount Fuji", ["Mount Fujiyama"]],
+ ["Milky Way", ["Milky Way galaxy"]],
+ ["Rio Grande", ["Rio Grande river"]],
+ ["adage", ["old adage"]],
+ ["add", ["add a further", "add an additional"]],
+ ["advance", ["advance forward"]],
+ ["alternative", ["alternative choice"]],
+ ["amaretto", ["amaretto almond"]],
+ ["annihilate", ["completely annihilate"]],
+ ["anniversary", ["annual anniversary"]],
+ ["anonymous", ["unnamed anonymous"]],
+ ["as", ["equally as"]],
+ ["ascend", ["ascend up"]],
+ ["ask", ["ask the question"]],
+ ["assemble", ["assemble together"]],
+ ["at present the", ["at the present time the"]],
+ ["at this point", ["at this point in time"]],
+ ["attach", ["attach together"]],
+ ["autumn", ["autumn season"]],
+ ["bald", ["bald-headed"]],
+ ["balsa", ["balsa wood"]],
+ ["belongings", ["personal belongings"]],
+ ["benefits", ["desirable benefits"]],
+ ["bento", ["bento box"]],
+ ["best", ["best ever"]],
+ ["bit", ["tiny bit"]],
+ ["blend", ["blend together"]],
+ ["bond", ["common bond"]],
+ ["bonus", ["added bonus", "extra bonus"]],
+ ["bouquet", ["bouquet of flowers"]],
+ ["breakthrough", ["major breakthrough"]],
+ ["bride", ["new bride"]],
+ ["brief", ["brief in duration"]],
+ ["bruin", ["bruin bear"]],
+ ["hot", ["burning hot"]],
+ ["cacophony", ["cacophony of sound"]],
+ ["cameo", ["brief cameo", "cameo appearance"]],
+ ["cancel", ["cancel out"]],
+ ["cash", ["cash money"]],
+ ["chai", ["chai tea"]],
+ ["chance", ["random chance"]],
+ ["charm", ["personal charm"]],
+ ["circle", ["circle around", "round circle"]],
+ ["circulate", ["circulate around"]],
+ ["classify", ["classify into groups"]],
+ ["classmates", ["fellow classmates"]],
+ ["cliche", ["old cliche", "overused cliche"]],
+ ["climb", ["climb up"]],
+ ["clock", ["time clock"]],
+ ["collaborate", ["collaborate together"]],
+ ["collaboration", ["joint collaboration"]],
+ ["colleague", ["fellow colleague"]],
+ ["combine", ["combine together"]],
+ ["commute", ["commute back and forth"]],
+ ["compete", ["compete with each other"]],
+ ["comprise", ["comprise of"]],
+ ["comprises", ["comprises of"]],
+ ["conceived", ["first conceived"]],
+ ["conclusion", ["final conclusion"]],
+ ["confer", ["confer together"]],
+ ["confrontation", ["direct confrontation"]],
+ # ["confused", ["confused state"]],
+ ["connect", ["connect together", "connect up"]],
+ ["consensus", ["consensus of opinion", "general consensus"]],
+ ["consult", ["consult with"]],
+ ["conversation", ["oral conversation"]],
+ ["cool", ["cool down"]],
+ ["cooperate", ["cooperate together"]],
+ ["cooperation", ["mutual cooperation"]],
+ ["copy", ["duplicate copy"]],
+ ["core", ["inner core"]],
+ ["cost", ["cost the sum of"]],
+ ["could", ["could possibly"]],
+ ["coupon", ["money-saving coupon"]],
+ ["created", ["originally created"]],
+ ["crisis", ["crisis situation"]],
+ ["crouch", ["crouch down"]],
+ ["currently", ["now currently"]],
+ ["custom", ["old custom", "usual custom"]],
+ ["danger", ["serious danger"]],
+ ["dates", ["dates back"]],
+ ["decision", ["definite decision"]],
+ ["depreciate", ["depreciate in value"]],
+ ["descend", ["descend down"]],
+ ["destroy", ["totally destroy"]],
+ ["destroyed", ["completely destroyed"]],
+ ["destruction", ["total destruction"]],
+ ["details", ["specific details"]],
+ ["dilemma", ["difficult dilemma"]],
+ ["disappear", ["disappear from sight"]],
+ ["discovered", ["originally discovered"]],
+ ["dive", ["dive down"]],
+ ["done", ["over and done with"]],
+ ["drawing", ["illustrated drawing"]],
+ ["drop", ["drop down"]],
+ ["dune", ["sand dune"]],
+ ["during", ["during the course of"]],
+ ["dwindle", ["dwindle down"]],
+ ["dwindled", ["dwindled down"]],
+ ["every", ["each and every"]],
+ ["earlier", ["earlier in time"]],
+ ["eliminate", ["completely eliminate", "eliminate altogether",
+ "entirely eliminate"]],
+ ["ember", ["glowing ember"]],
+ ["embers", ["burning embers"]],
+ ["emergency", ["emergency situation", "unexpected emergency"]],
+ ["empty", ["empty out"]],
+ ["enclosed", ["enclosed herein"]],
+ ["end", ["final end"]],
+ ["engulfed", ["completely engulfed"]],
+ ["enter", ["enter in", "enter into"]],
+ ["equal", ["equal to one another"]],
+ ["eradicate", ["eradicate completely"]],
+ ["essential", ["absolutely essential"]],
+ ["estimated at", ["estimated at about",
+ "estimated at approximately",
+ "estimated at around"]],
+ ["etc.", ["and etc."]],
+ ["evolve", ["evolve over time"]],
+ ["exaggerate", ["over exaggerate"]],
+ ["exited", ["exited from"]],
+ ["experience", ["actual experience", "past experience"]],
+ ["experts", ["knowledgeable experts"]],
+ ["extradite", ["extradite back"]],
+ ["face the consequences", ["face up to the consequences"]],
+ ["face the fact", ["face up to the fact"]],
+ ["face the challenge", ["face up to the challenge"]],
+ ["face the problem", ["face up to the problem"]],
+ ["facilitate", ["facilitate easier"]],
+ ["fact", ["established fact"]],
+ ["facts", ["actual facts", "hard facts", "true facts"]],
+ ["fad", ["passing fad"]],
+ ["fall", ["fall down"]],
+ ["fall", ["fall season"]],
+ ["feat", ["major feat"]],
+ ["feel", ["feel inside"]],
+ ["feelings", ["inner feelings"]],
+ ["few", ["few in number"]],
+ ["filled", ["completely filled", "filled to capacity"]],
+ ["first", ["first of all"]],
+ ["first time", ["first time ever"]],
+ ["fist", ["closed fist"]],
+ ["fly", ["fly through the air"]],
+ ["focus", ["focus in", "main focus"]],
+ ["follow", ["follow after"]],
+ ["for example", ["as for example"]],
+ # ["foremost", ["first and foremost"]],
+ ["forever", ["forever and ever"]],
+ ["free", ["for free"]],
+ ["friend", ["personal friend"]],
+ ["friendship", ["personal friendship"]],
+ ["full", ["full to capacity"]],
+ ["fundamentals", ["basic fundamentals"]],
+ ["fuse", ["fuse together"]],
+ ["gather", ["gather together", "gather up"]],
+ ["get up", ["get up on his feet", "get up on your feet"]],
+ ["gift", ["free gift"]],
+ ["gifts", ["free gifts"]],
+ ["goal", ["ultimate goal"]],
+ # ["graduate", ["former graduate"]],
+ ["grow", ["grow in size"]],
+ ["guarantee", ["absolute guarantee"]],
+ ["gunman", ["armed gunman"]],
+ ["gunmen", ["armed gunmen"]],
+ ["habitat", ["native habitat"]],
+ ["had done", ["had done previously"]],
+ ["halves", ["two equal halves"]],
+ # ["has", ["has got"]],
+ # ["have", ["have got"]],
+ ["haven", ["safe haven"]],
+ # ["he", ["he himself"]],
+ ["heat", ["heat up"]],
+ ["history", ["past history"]],
+ ["hoist", ["hoist up"]],
+ ["hole", ["empty hole"]],
+ ["honcho", ["head honcho"]],
+ ["ice", ["frozen ice"]],
+ ["ideal", ["perfect ideal"]],
+ ["identical", ["same identical"]],
+ ["identification", ["positive identification"]],
+ ["imports", ["foreign imports"]],
+ ["impulse", ["sudden impulse"]],
+ ["in fact", ["in actual fact"]],
+ ["in the yard", ["outside in the yard"]],
+ ["inclusive", ["all inclusive"]],
+ ["incredible", ["incredible to believe"]],
+ ["incumbent", ["present incumbent"]],
+ # ["indicted", ["indicted on a charge"]],
+ ["industry", ["private industry"]],
+ ["injuries", ["harmful injuries"]],
+ ["innovation", ["new innovation"]],
+ ["innovative", ["innovative new", "new innovative"]],
+ # ["input", ["input into"]],
+ ["instinct", ["natural instinct", "naturally instinct"]],
+ ["integrate", ["integrate together",
+ "integrate with each other"]],
+ ["interdependent", ["interdependent on each other",
+ "mutually interdependent"]],
+ ["introduced", ["introduced for the first time"]],
+ ["invention", ["new invention"]],
+ ["kneel", ["kneel down"]],
+ ["knots", ["knots per hour"]],
+ # ["last", ["last of all"]],
+ # ["later", ["later time"]],
+ ["lift", ["lift up"]],
+ ["lingers", ["still lingers"]],
+ ["look to the future", ["look ahead to the future"]],
+ ["love triangle", ["three-way love triangle"]],
+ ["maintained", ["constantly maintained"]],
+ ["manually", ["manually by hand"]],
+ ["marina", ["boat marina"]],
+ ["may", ["may possibly"]],
+ ["meet", ["meet together", "meet with each other"]],
+ ["memories", ["past memories"]],
+ ["merge", ["merge together"]],
+ ["merged", ["merged together"]],
... 1726 lines suppressed ...
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python3-proselint.git
More information about the Python-modules-commits
mailing list