Skip to content

Commit 07b8b2c

Browse files
authored
Use pyspelling to check spelling.
In addition to checking the spelling in our documentation, we are now also checking the spelling of the README.md and similar files as well as comments in our Python code.
1 parent be1c283 commit 07b8b2c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+544
-480
lines changed

.pyspelling.yml

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
spellchecker: aspell
2+
3+
matrix:
4+
- name: mkdocs
5+
group: docs
6+
sources:
7+
- site/**/*.html
8+
aspell:
9+
lang: en
10+
d: en_US
11+
dictionary:
12+
wordlists:
13+
- .spell-dict
14+
output: build/dictionary/mkdocs.dic
15+
pipeline:
16+
- pyspelling.filters.html:
17+
comments: false
18+
attributes:
19+
- title
20+
- alt
21+
ignores:
22+
- 'code, pre'
23+
captures:
24+
- '[role=main] *|*:not(script,style)'
25+
- pyspelling.filters.context:
26+
context_visible_first: true
27+
delimiters:
28+
# Ignore possessive endings
29+
- open: '(?<=\w)’s(?!\w)'
30+
close: '\b'
31+
- pyspelling.filters.url:
32+
33+
- name: markdown
34+
group: docs
35+
sources:
36+
- README.md
37+
- INSTALL.md
38+
- LICENSE.md
39+
- CODE_OF_CONDUCT.md
40+
aspell:
41+
lang: en
42+
d: en_US
43+
mode: markdown
44+
dictionary:
45+
wordlists:
46+
- .spell-dict
47+
output: build/dictionary/markdown.dic
48+
49+
- name: python
50+
group: source
51+
sources:
52+
- '{markdown,tests}/**/*.py'
53+
aspell:
54+
lang: en
55+
d: en_US
56+
mode: markdown
57+
dictionary:
58+
wordlists:
59+
- .spell-dict
60+
output: build/dictionary/python.dic
61+
pipeline:
62+
- pyspelling.filters.python:
63+
group_comments: true
64+
- pyspelling.flow_control.wildcard:
65+
allow:
66+
- py-comment
67+
- pyspelling.filters.context:
68+
context_visible_first: true
69+
delimiters:
70+
# Ignore lint (noqa) and coverage (pragma) as well as shebang (#!)
71+
- open: '^(?: *(?:noqa\b|pragma: no cover)|!)'
72+
close: '$'
73+
# Ignore Python encoding string -*- encoding stuff -*-
74+
- open: '^ *-\*-'
75+
close: '-\*-$'
76+
# Ignore possessive endings
77+
- open: '(?<=\w)''s(?!\w)'
78+
close: '\b'
79+
- pyspelling.filters.context:
80+
context_visible_first: true
81+
escapes: '\\[\\`]'
82+
delimiters:
83+
# Ignore lines which are inedented at least one level (Markdown code block)
84+
# For some reason indented code blocks are not properly ignored by aspell in markdown mode.
85+
# Warning: This could ignore a nested list item
86+
- open: '^ {4,}'
87+
close: '$'
88+
- pyspelling.filters.url:

.spell-dict

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ Fortin
3838
GitHub
3939
globals
4040
Gruber
41+
Gruber's
4142
GSoC
4243
hacky
4344
HeaderId
@@ -59,6 +60,7 @@ Manfed
5960
markdownFromFile
6061
Maruku
6162
md
63+
merchantability
6264
metadata
6365
MkDocs
6466
multi
@@ -88,6 +90,8 @@ PYTHONPATH
8890
PyTidyLib
8991
PyYAML
9092
rc
93+
redistribution
94+
redistributions
9195
refactor
9296
refactored
9397
refactors
@@ -104,6 +108,7 @@ setuptools
104108
Sergej
105109
serializer
106110
serializers
111+
sexualized
107112
Shachnev
108113
sitemap
109114
slugify
@@ -119,7 +124,7 @@ SuperFences
119124
svn
120125
Swartz
121126
Szakmeister
122-
Takteyev
127+
Takhteyev
123128
Tiago
124129
toc
125130
tokenized
@@ -161,3 +166,24 @@ plugins
161166
configs
162167
pre
163168
formatters
169+
170+
dedented
171+
Setext
172+
unindented
173+
monkeypatch
174+
TODO
175+
Nko
176+
Thaana
177+
Tifinagh
178+
backport
179+
Fredrik
180+
Lundh
181+
subclass
182+
tortious
183+
performantly
184+
Seemant
185+
Kulleen
186+
Serafim
187+
overridable
188+
unescaped
189+
APIs

checkspelling.sh

Lines changed: 0 additions & 38 deletions
This file was deleted.

docs/authors.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Primary Authors
2222
and has been assisting with maintenance, reviewing pull requests and ticket
2323
triage.
2424

25-
* __[Yuri Takteyev](https://github.com/yuri)__
25+
* __[Yuri Takhteyev](https://github.com/yuri)__
2626

2727
Yuri wrote most of the code found in version 1.x while procrastinating his
2828
Ph.D. Various pieces of his code still exist, most notably the basic

docs/change_log/index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,10 +182,10 @@ August 18 2008: Reorganized directory structure. Added a 'docs' directory
182182
and moved all extensions into a 'markdown-extensions' package.
183183
Added additional documentation and a few bug fixes. (v2.0-beta)
184184

185-
August 4 2008: Updated included extensions to ElementTree. Added a
185+
August 4 2008: Updated included extensions to `ElementTree`. Added a
186186
separate command line script. (v2.0-alpha)
187187

188-
July 2008: Switched from home-grown NanoDOM to ElementTree and
188+
July 2008: Switched from home-grown `NanoDOM` to `ElementTree` and
189189
various related bugs (thanks Artem Yunusov).
190190

191191
June 2008: Fixed issues with nested inline patterns and cleaned
@@ -310,7 +310,7 @@ syntax in headers (e.g. links) and got the lists to use p-tags
310310
correctly (v. 0.8)
311311

312312
Aug. 29, 2005: Added flexible tabs, fixed a few small issues, added
313-
basic support for footnotes. Got rid of xml.dom.minidom and added
313+
basic support for footnotes. Got rid of `xml.dom.minidom` and added
314314
pretty-printing. (v. 0.7)
315315

316316
Aug. 13, 2005: Fixed a number of small bugs in order to conform to the

docs/change_log/release-3.3.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ The following new features have been included in the 3.3 release:
6666
blocks when the `attr_list` extension is enabled (#816).
6767

6868
* The HTML parser has been completely replaced. The new HTML parser is built on Python's
69-
[html.parser.HTMLParser](https://docs.python.org/3/library/html.parser.html), which
69+
[`html.parser.HTMLParser`](https://docs.python.org/3/library/html.parser.html), which
7070
alleviates various bugs and simplify maintenance of the code (#803, #830).
7171

7272
* The [Markdown in HTML](../extensions/md_in_html.md) extension has been rebuilt on the

docs/contributing.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -421,8 +421,9 @@ following steps:
421421

422422
- Deploy an update to the documentation using [MkDocs]. The following example
423423
assumes that local clones of the [Python-Markdown/markdown] and
424-
[Python-Markdown/Python-Markdown.github.io] repositories are in sibling
425-
directories named `markdown` and `Python-Markdown.github.io` respectively.
424+
[`Python-Markdown/Python-Markdown.github.io`][Python-Markdown/Python-Markdown.github.io]
425+
repositories are in sibling directories named `markdown` and `Python-Markdown.github.io`
426+
respectively.
426427

427428
cd Python-Markdown.github.io
428429
mkdocs gh-deploy --config-file ../markdown/mkdocs.yml --remote-branch master

docs/test_tools.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Therefore, the tools are importable from `markdown.test_tools`.
1212
The test tools include two different `unittest.TestCase` subclasses:
1313
`markdown.test_tools.TestCase` and `markdown.test_tools.LegacyTestCase`.
1414

15-
## markdown.test_tools.TestCase
15+
## `markdown.test_tools.TestCase`
1616

1717
The `markdown.test_tools.TestCase` class is a `unittest.TestCase` subclass with
1818
a few additional helpers to make testing Markdown output easier.
@@ -66,7 +66,7 @@ class TestHr(TestCase):
6666
)
6767
```
6868

69-
## markdown.test_tools.LegacyTestCase
69+
## `markdown.test_tools.LegacyTestCase`
7070

7171
In the past Python-Markdown exclusively used file-based tests. Many of those
7272
tests still exist in Python-Markdown's test suite, including the test files from

markdown/__main__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,6 @@ def run(): # pragma: no cover
146146

147147

148148
if __name__ == '__main__': # pragma: no cover
149-
# Support running module as a commandline command.
150-
# `python -m markdown [options] [args]`.
149+
# Support running module as a command line command.
150+
# python -m markdown [options] [args]
151151
run()

markdown/__meta__.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@
2020
"""
2121

2222
# __version_info__ format:
23-
# (major, minor, patch, dev/alpha/beta/rc/final, #)
24-
# (1, 1, 2, 'dev', 0) => "1.1.2.dev0"
25-
# (1, 1, 2, 'alpha', 1) => "1.1.2a1"
26-
# (1, 2, 0, 'beta', 2) => "1.2b2"
27-
# (1, 2, 0, 'rc', 4) => "1.2rc4"
28-
# (1, 2, 0, 'final', 0) => "1.2"
23+
# (major, minor, patch, dev/alpha/beta/rc/final, #)
24+
# (1, 1, 2, 'dev', 0) => "1.1.2.dev0"
25+
# (1, 1, 2, 'alpha', 1) => "1.1.2a1"
26+
# (1, 2, 0, 'beta', 2) => "1.2b2"
27+
# (1, 2, 0, 'rc', 4) => "1.2rc4"
28+
# (1, 2, 0, 'final', 0) => "1.2"
2929
__version_info__ = (3, 4, 3, 'final', 0)
3030

3131

0 commit comments

Comments
 (0)