pydsc - PYthon Documentation string Spell Checker
The pydsc module checks documentation strings and comments for spelling errors.
It is very easy to start using pydsc module - just import it:
import pydsc
and every module, that will be imported after it, in the current working directory will be checked. The errors will be printed to stdout.
For more information see pydsc module.
pydsc modules uses PyEnchant one.
python setup.py install
The pydsc module checks documentation strings and comments for spelling errors.
Usage example:
import pydsc
pydsc.include_paths( r'D:\pygccxml_dev\pygccxml' ) #check only pygccxml package
pydsc.ignore_words([ 'Yakovenko', 'www', 'org', 'py' ])
#if you use sphinx as a documentation tool:
pydsc.set_text_preprocessor( pydsc.sphinx_preprocessor )
Applies spell check process on every imported module.
Every documentation string within the imported modules will be checked. Some comments will be checked too. The inspect module is used to extract documentation strings and comments
initialization method
replaces __builtin__.__import__() function with checker_t.import_()
| Parameters: |
|
|---|
returns true if one of the directories is root directory for the path, false otherwise
| Parameters: |
|
|---|---|
| Return type: | bool |
adds all words from file to the “ignore” list
The file should contain one word per line
| Parameter: | path (str) – path to dictionary file |
|---|
adds what, word or list of words, to the ignore list.
what - word(string) or list of words(strings) to be ignored.
includes all modules, to the check process, that are lying in what directory(ies)
what - a path or list of paths, could be or contain file and/or directory names
returns True is the word represents an identifier, constructed from two or more words, False otherwise.
This function is used to filter out some errors, reported by spell checker.