This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Codespell

Project Description

Fix common misspellings in text files. It’s designed primarily for checking misspelled words in source code, but it can be used with other files as well.

Requirements

Python 2.7 or above.

Installation

You can use pip to install codespell with e.g.:

pip install codespell

Usage

Check usage with codespell -h. There are a few command line options. Note that upon installation with “make install” we don’t have the “py” suffix. We ship a dictionary that is an improved version of the one available on Wikipedia after applying them in projects like Linux Kernel, EFL, oFono among others. You can provide your own version of the dictionary, but patches for new/different entries are very welcome.

Dictionary format

The format of the dictionary was influenced by the one it originally came from, i.e. from Wikipedia. The difference is how multiple options are treated and that the last argument is the reason why a certain entry could not be applied directly, but instead be manually inspected. E.g.:

  1. Simple entry: one wrong word / one suggestion:

    calulated->calculated
    
  2. Entry with more than one suggested fix:

    fiel->feel, field, file, phial,
    

    Note the last comma! You need to use it, otherwise the last suggestion will be discarded (see below for why). When there is more than one suggestion, an automatic fix is not possible and the best we can do is to give the user the file and line where the error occurred as well as the suggestions.

  3. Entry with one word, but with automatically fix disabled:

    clas->class, disabled because of name clash in c++
    

    Note that there isn’t a comma in the end of the line. The last argument is treated as the reason why a suggestion cannot be automatically applied.

License

The Python script codespell with its library codespell_lib is available with the following terms: (tl;dr: GPL v2)

Copyright (C) 2010-2011 Lucas De Marchi <lucas.de.marchi@gmail.com>

Copyright (C) 2011 ProFUSION embedded systems

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, see <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>.

dictionary.txt is a derived work of English Wikipedia and is released under the Creative Commons Attribution-Share-Alike License 3.0 http://creativecommons.org/licenses/by-sa/3.0/

Release History

Release History

This version
History Node

1.10.0

History Node

1.9.2

History Node

1.9.1

History Node

1.9.0

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
codespell-1.10.0.tar.gz (46.5 kB) Copy SHA256 Checksum SHA256 Source Mar 15, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting