1Metadata-Version: 2.1
2Name: codespell
3Version: 2.1.0
4Summary: Codespell
5Home-page: https://github.com/codespell-project/codespell/
6Maintainer: Lucas De Marchi
7Maintainer-email: lucas.de.marchi@gmail.com
8License: GPL v2
9Download-URL: https://github.com/codespell-project/codespell/
10Description: codespell
11        =========
12
13        Fix common misspellings in text files. It's designed primarily for checking
14        misspelled words in source code, but it can be used with other files as well.
15
16        Useful links
17        ------------
18
19        * `GitHub project <https://github.com/codespell-project/codespell>`_
20
21        * Mailing list: <codespell@googlegroups.com> with web archives/interface
22          `here <https://groups.google.com/forum/?fromgroups#!forum/codespell>`_
23
24        * `Repository <https://github.com/codespell-project/codespell>`_
25
26        * `Releases <https://github.com/codespell-project/codespell/releases>`_
27
28        Requirements
29        ------------
30
31        Python 3.5 or above.
32
33        Installation
34        ------------
35
36        You can use ``pip`` to install codespell with e.g.::
37
38            pip install codespell
39
40        Usage
41        -----
42
43        For more in depth info please check usage with ``codespell -h``.
44
45        Some noteworthy flags::
46
47            codespell -w, --write-changes
48
49        The ``-w`` flag will actually implement the changes recommended by codespell. Not running with ``-w`` flag is the same as with doing a dry run. It is recommended to run this with the ``-i`` or ``--interactive`` flag.::
50
51            codespell -I FILE, --ignore-words=FILE
52
53        The ``-I`` flag can be used for a list of certain words to allow that are in the codespell dictionaries. The format of the file is one word per line. Invoke using: ``codespell -I path/to/file.txt`` to execute codespell referencing said list of allowed words. **Important note:** The list passed to ``-I`` is case-sensitive based on how it is listed in the codespell dictionaries. ::
54
55            codespell -L word1,word2,word3,word4
56
57        The ``-L`` flag can be used to allow certain words that are comma-separated placed immediately after it.  **Important note:** The list passed to ``-L`` is case-sensitive based on how it is listed in the codespell dictionaries. ::
58
59            codespell -S, --skip=
60
61        Comma-separated list of files to skip. It accepts globs as well.  Examples:
62
63        * to skip .eps & .txt files, invoke ``codespell --skip="*.eps,*.txt"``
64
65        * to skip directories, invoke ``codespell --skip="./src/3rd-Party,./src/Test"``
66
67
68        Useful commands::
69
70            codespell -d -q 3 --skip="*.po,*.ts,./src/3rdParty,./src/Test"
71
72        List all typos found except translation files and some directories.
73        Display them without terminal colors and with a quiet level of 3. ::
74
75            codespell -i 3 -w
76
77        Run interactive mode level 3 and write changes to file.
78
79        We ship a collection of dictionaries that are an improved version of the one available
80        `on Wikipedia <https://en.wikipedia.org/wiki/Wikipedia:Lists_of_common_misspellings/For_machines>`_
81        after applying them in projects like Linux Kernel, EFL, oFono among others.
82        You can provide your own version of the dictionary, but patches for
83        new/different entries are very welcome.
84
85        Want to know if a word you're proposing exists in codespell already? It is possible to test a word against the current set dictionaries that exist in ``codespell_lib/data/dictionary*.txt`` via::
86
87            echo "word" | codespell -
88            echo "1stword,2ndword" | codespell -
89
90        You can select the optional dictionaries with the ``--builtin`` option.
91
92        Using a config file
93        -------------------
94
95        Command line options can also be specified in a config file.
96
97        When running ``codespell``, it will check in the current directory for a file
98        named ``setup.cfg`` or ``.codespellrc`` (or a file specified via ``--config``),
99        containing an entry named ``[codespell]``. Each command line argument can
100        be specified in this file (without the preceding dashes), for example::
101
102            [codespell]
103            skip = *.po,*.ts,./src/3rdParty,./src/Test
104            count =
105            quiet-level = 3
106
107        This is equivalent to running::
108
109            codespell --quiet-level 3 --count --skip "*.po,*.ts,./src/3rdParty,./src/Test"
110
111        Any options specified in the command line will *override* options from the
112        config file.
113
114        Dictionary format
115        -----------------
116
117        The format of the dictionaries was influenced by the one they originally came from,
118        i.e. from Wikipedia. The difference is how multiple options are treated and
119        that the last argument is an optional reason why a certain entry could not be
120        applied directly, but should instead be manually inspected. E.g.:
121
122        1. Simple entry: one wrong word / one suggestion::
123
124                calulated->calculated
125
126        2. Entry with more than one suggested fix::
127
128               fiel->feel, field, file, phial,
129
130           Note the last comma! You need to use it, otherwise the last suggestion
131           will be discarded (see below for why). When there is more than one
132           suggestion, an automatic fix is not possible and the best we can do is
133           to give the user the file and line where the error occurred as well as
134           the suggestions.
135
136        3. Entry with one word, but with automatic fix disabled::
137
138               clas->class, disabled because of name clash in c++
139
140           Note that there isn't a comma at the end of the line. The last argument is
141           treated as the reason why a suggestion cannot be automatically applied.
142
143           There can also be multiple suggestions but any automatic fix will again be
144           disabled::
145
146               clas->class, clash, disabled because of name clash in c++
147
148        Development Setup
149        -----------------
150
151        You can install required dependencies for development by running the following within a checkout of the codespell source::
152
153               pip install -e ".[dev]"
154
155        To run tests against the codebase run::
156
157               make check
158
159        Sending Pull Requests
160        ---------------------
161
162        If you have a suggested typo that you'd like to see merged please follow these steps:
163
164        1. Make sure you read the instructions mentioned in the ``Dictionary format`` section above to submit correctly formatted entries.
165
166        2. Choose the correct dictionary file to add your typo to. See `codespell --help` for explanations of the different dictionaries.
167
168        3. Sort the dictionaries. This is done by invoking (in the top level directory of ``codespell/``)::
169
170               make check-dictionaries
171
172           If the make script finds that you need to sort a dictionary, please then run::
173
174               make sort-dictionaries
175
176        4. Only after this process is complete do we recommend you submit the PR.
177
178        **Important Notes:**
179
180        * If the dictionaries are submitted without being pre-sorted the PR will fail via our various CI tools.
181        * Not all PRs will be merged. This is pending on the discretion of the devs, maintainers, and the community.
182
183        Updating
184        --------
185
186        To stay current with codespell developments it is possible to build codespell from GitHub via::
187
188            pip install --upgrade git+https://github.com/codespell-project/codespell.git
189
190        **Important Notes:**
191
192        * Sometimes installing via ``pip`` will complain about permissions. If this is the case then run with ::
193
194            pip install --user --upgrade git+https://github.com/codespell-project/codespell.git
195
196        * It has been reported that after installing from ``pip``, codespell can't be located. Please check the $PATH variable to see if ``~/.local/bin`` is present. If it isn't then add it to your path.
197        * If you decide to install via ``pip`` then be sure to remove any previously installed versions of codespell (via your platform's preferred app manager).
198
199        Updating the dictionaries
200        -------------------------
201
202        In the scenario where the user prefers not to follow the development version of codespell yet still opts to benefit from the frequently updated dictionary files, we recommend running a simple set of commands to achieve this ::
203
204            wget https://raw.githubusercontent.com/codespell-project/codespell/master/codespell_lib/data/dictionary.txt
205            codespell -D dictionary.txt
206
207        The above simply downloads the latest ``dictionary.txt`` file and then by utilizing the ``-D`` flag allows the user to specify the freshly downloaded ``dictionary.txt`` as the custom dictionary instead of the default one.
208
209        You can also do the same thing for the other dictionaries listed here:
210            https://github.com/codespell-project/codespell/tree/master/codespell_lib/data
211
212        License
213        -------
214
215        The Python script ``codespell`` with its library ``codespell_lib`` is available
216        with the following terms:
217        (*tl;dr*: `GPL v2`_)
218
219           Copyright (C) 2010-2011  Lucas De Marchi <lucas.de.marchi@gmail.com>
220
221           Copyright (C) 2011  ProFUSION embedded systems
222
223           This program is free software; you can redistribute it and/or modify
224           it under the terms of the GNU General Public License as published by
225           the Free Software Foundation; version 2 of the License.
226
227           This program is distributed in the hope that it will be useful,
228           but WITHOUT ANY WARRANTY; without even the implied warranty of
229           MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
230           GNU General Public License for more details.
231
232           You should have received a copy of the GNU General Public License
233           along with this program; if not, see
234           <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>.
235
236        .. _GPL v2: http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
237
238        ``dictionary.txt`` and the other ``dictionary_*.txt`` files are a derived work of
239        English Wikipedia and are released under the Creative Commons
240        Attribution-Share-Alike License 3.0
241        http://creativecommons.org/licenses/by-sa/3.0/
242
243Platform: any
244Classifier: Intended Audience :: Developers
245Classifier: License :: OSI Approved
246Classifier: Programming Language :: Python
247Classifier: Topic :: Software Development
248Classifier: Operating System :: Microsoft :: Windows
249Classifier: Operating System :: POSIX
250Classifier: Operating System :: Unix
251Classifier: Operating System :: MacOS
252Requires-Python: >=3.5
253Provides-Extra: dev
254Provides-Extra: hard-encoding-detection
255