|
13 | 13 |
|
14 | 14 |
|
15 | 15 | def setup(app): |
16 | | - version = importlib_metadata.version('sphinxcontrib-spelling') |
17 | | - logger.info('Initializing Spelling Checker %s', version) |
| 16 | + version = importlib_metadata.version("sphinxcontrib-spelling") |
| 17 | + logger.info("Initializing Spelling Checker %s", version) |
18 | 18 | app.add_builder(builder.SpellingBuilder) |
19 | 19 | # Register the 'spelling' directive for setting parameters within |
20 | 20 | # a document |
21 | | - app.add_directive('spelling', directive.LegacySpellingDirective) |
| 21 | + app.add_directive("spelling", directive.LegacySpellingDirective) |
22 | 22 | app.add_domain(domain.SpellingDomain) |
23 | 23 | # Register an environment collector to merge data gathered by the |
24 | 24 | # directive in parallel builds |
25 | 25 | app.add_env_collector(asset.SpellingCollector) |
26 | 26 | # Report guesses about correct spelling |
27 | | - app.add_config_value('spelling_show_suggestions', False, 'env') |
| 27 | + app.add_config_value("spelling_show_suggestions", False, "env") |
28 | 28 | # Limit the number of suggestions output |
29 | | - app.add_config_value('spelling_suggestion_limit', 0, 'env') |
| 29 | + app.add_config_value("spelling_suggestion_limit", 0, "env") |
30 | 30 | # Report the whole line that has the error |
31 | | - app.add_config_value('spelling_show_whole_line', True, 'env') |
| 31 | + app.add_config_value("spelling_show_whole_line", True, "env") |
32 | 32 | # Emit misspelling as a sphinx warning instead of info message |
33 | | - app.add_config_value('spelling_warning', False, 'env') |
| 33 | + app.add_config_value("spelling_warning", False, "env") |
34 | 34 | # Set the language for the text |
35 | | - app.add_config_value('spelling_lang', 'en_US', 'env') |
| 35 | + app.add_config_value("spelling_lang", "en_US", "env") |
36 | 36 | # Set the language for the tokenizer |
37 | | - app.add_config_value('tokenizer_lang', 'en_US', 'env') |
| 37 | + app.add_config_value("tokenizer_lang", "en_US", "env") |
38 | 38 | # Set a user-provided list of words known to be spelled properly |
39 | | - app.add_config_value('spelling_word_list_filename', None, 'env') |
| 39 | + app.add_config_value("spelling_word_list_filename", None, "env") |
40 | 40 | # Assume anything that looks like a PyPI package name is spelled properly |
41 | | - app.add_config_value('spelling_ignore_pypi_package_names', False, 'env') |
| 41 | + app.add_config_value("spelling_ignore_pypi_package_names", False, "env") |
42 | 42 | # Assume words that look like wiki page names are spelled properly |
43 | | - app.add_config_value('spelling_ignore_wiki_words', True, 'env') |
| 43 | + app.add_config_value("spelling_ignore_wiki_words", True, "env") |
44 | 44 | # Assume words that are all caps, or all caps with trailing s, are |
45 | 45 | # spelled properly |
46 | | - app.add_config_value('spelling_ignore_acronyms', True, 'env') |
| 46 | + app.add_config_value("spelling_ignore_acronyms", True, "env") |
47 | 47 | # Assume words that are part of __builtins__ are spelled properly |
48 | | - app.add_config_value('spelling_ignore_python_builtins', True, 'env') |
| 48 | + app.add_config_value("spelling_ignore_python_builtins", True, "env") |
49 | 49 | # Assume words that look like the names of importable modules are |
50 | 50 | # spelled properly |
51 | | - app.add_config_value('spelling_ignore_importable_modules', True, 'env') |
| 51 | + app.add_config_value("spelling_ignore_importable_modules", True, "env") |
52 | 52 | # Treat contributor names from git history as spelled correctly |
53 | | - app.add_config_value('spelling_ignore_contributor_names', True, 'env') |
| 53 | + app.add_config_value("spelling_ignore_contributor_names", True, "env") |
54 | 54 | # Add any user-defined filter classes |
55 | | - app.add_config_value('spelling_filters', [], 'env') |
| 55 | + app.add_config_value("spelling_filters", [], "env") |
56 | 56 | # Set a user-provided list of files to ignore |
57 | | - app.add_config_value('spelling_exclude_patterns', [], 'env') |
| 57 | + app.add_config_value("spelling_exclude_patterns", [], "env") |
58 | 58 | # Choose whether or not the misspelled output should be displayed |
59 | 59 | # in the terminal |
60 | | - app.add_config_value('spelling_verbose', True, 'env') |
| 60 | + app.add_config_value("spelling_verbose", True, "env") |
61 | 61 | return { |
62 | 62 | "parallel_read_safe": True, |
63 | 63 | "parallel_write_safe": True, |
|
0 commit comments