Fix typos and formatting in comments, docstrings, and markdown#2223
Open
chienyuanchang wants to merge 2 commits into
Open
Fix typos and formatting in comments, docstrings, and markdown#2223chienyuanchang wants to merge 2 commits into
chienyuanchang wants to merge 2 commits into
Conversation
Comment/docstring typo fixes: - _base_converter.py: fix 'steam_info' -> 'stream_info', missing 'on', duplicated 'MUST be reset', 'advances' -> 'advance', 'used to in cases' -> 'used in cases', 'charset, set' -> 'charset, etc.' - _markitdown.py: 'legaxy' -> 'legacy', 'User' -> 'Use' in DEPRECATED docstring, second 'PRIORITY_SPECIFIC_FILE_FORMAT (== 10)' -> 'PRIORITY_GENERIC_FILE_FORMAT (== 10)', 'Plugins converters' -> 'Plugin converters' - __main__.py: 'e.g,' -> 'e.g.,' in --charset help - _exceptions.py: 'an a single' -> 'a single' - _docx_converter.py, _epub_converter.py: 'e.g.m headings' -> 'e.g., headings' - _epub_converter.py: remove stray closing triple-quote in comment - _outlook_msg_converter.py: 'Brue force' -> 'Brute force' - _markdownify.py: 'Javascript' -> 'JavaScript' - _bing_serp_converter.py: remove stray '"' in Base64URL comment - sample plugin _plugin.py: 'RTF file to in the simplest' -> 'RTF file in the simplest'; 'into an str using hte' -> 'into a str using the' Markdown formatting fixes: - README.md: 'Youtube URLs' -> 'YouTube URLs' - markitdown-mcp/README.md: remove trailing tab characters after ```bash code fences; convert tab-indented JSON array elements to 8-space indentation for consistency - markitdown-sample-plugin/README.md: 'Next, implement' -> 'First, implement' for the initial step (no prior step exists); normalize tab-indented lines inside Python code samples to 4/8-space indentation; strip trailing spaces
Test files:
- test_sample_plugin.py: 'dirctly' -> 'directly'
- test_cli_vectors.py: 'readds' -> 'reads'
- test_module_misc.py: 'targted' -> 'targeted' (2 occurrences)
Source files:
- _doc_intel_converter.py: 'availiable' -> 'available' in docstring
Verified clean with:
codespell --skip='.git,test_files,ThirdPartyNotices.md,SECURITY.md,\
SUPPORT.md,CODE_OF_CONDUCT.md,latex_dict.py,omml.py,ocr_test_data,\
*.pdf,*.docx,*.pptx,*.xlsx,*.xls,*.png,*.jpg,*.jpeg,*.wav,*.mp3,\
*.mp4,*.zip,*.epub,*.msg,*.rtf' packages/ README.md
There was a problem hiding this comment.
Pull request overview
This PR performs a repo-wide prose cleanup focused on correcting typos and improving formatting in comments, docstrings, and Markdown documentation, without changing runtime behavior.
Changes:
- Corrected numerous typos/grammar issues in Python comments and docstrings across core converters and utilities.
- Normalized Markdown code-fence whitespace/indentation in package READMEs for cleaner rendering.
- Fixed minor wording issues in tests’ docstrings/comments.
Reviewed changes
Copilot reviewed 16 out of 17 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| README.md | Fixes product-name capitalization in the supported-formats list (“YouTube”). |
| packages/markitdown/src/markitdown/_base_converter.py | Clarifies/repairs accepts()/convert() docstring wording (stream_info, reset semantics, etc.). |
| packages/markitdown/src/markitdown/_markitdown.py | Fixes typos and adjusts docstring wording around plugin enabling and converter priorities. |
| packages/markitdown/src/markitdown/_exceptions.py | Fixes a grammatical error in a class docstring. |
| packages/markitdown/src/markitdown/main.py | Fixes punctuation in CLI help text. |
| packages/markitdown/src/markitdown/converters/_bing_serp_converter.py | Fixes a stray quote in a comment. |
| packages/markitdown/src/markitdown/converters/_doc_intel_converter.py | Fixes typo in a helper docstring. |
| packages/markitdown/src/markitdown/converters/_docx_converter.py | Fixes punctuation in a converter class docstring. |
| packages/markitdown/src/markitdown/converters/_epub_converter.py | Fixes punctuation/typos in class docstring and a comment. |
| packages/markitdown/src/markitdown/converters/_markdownify.py | Fixes capitalization in a method docstring. |
| packages/markitdown/src/markitdown/converters/_outlook_msg_converter.py | Fixes typo in a comment. |
| packages/markitdown/tests/test_cli_vectors.py | Fixes typo in a test docstring. |
| packages/markitdown/tests/test_module_misc.py | Fixes typo in test comments. |
| packages/markitdown-mcp/README.md | Normalizes code-fence whitespace and JSON indentation in examples. |
| packages/markitdown-sample-plugin/src/markitdown_sample_plugin/_plugin.py | Fixes typos in docstring/comment text. |
| packages/markitdown-sample-plugin/tests/test_sample_plugin.py | Fixes typo in a test docstring. |
| packages/markitdown-sample-plugin/README.md | Improves step wording (“First…”) and normalizes indentation/trailing spaces in code samples. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
673
to
+676
| Priorities work as follows: By default, most converters get priority | ||
| DocumentConverter.PRIORITY_SPECIFIC_FILE_FORMAT (== 0). The exception | ||
| is the PlainTextConverter, HtmlConverter, and ZipConverter, which get | ||
| priority PRIORITY_SPECIFIC_FILE_FORMAT (== 10), with lower values | ||
| priority PRIORITY_GENERIC_FILE_FORMAT (== 10), with lower values |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cleanup pass fixing typos and formatting issues in comments, docstrings, and markdown files. No functional/API code was changed — only prose inside comments, docstrings, and Markdown, plus a few code-fence whitespace normalizations in READMEs.
Verified clean at the end with
codespell2.4.2 across the entire repo (excluding binary test fixtures, third-party notices, Microsoft boilerplate, and the vendored dwml code underconverter_utils/docx/math/).Fixes by file
Comments & docstrings
packages/markitdown/src/markitdown/_base_converter.pysteam_info→stream_infopackages/markitdown/src/markitdown/_markitdown.py# Add legaxy kwargs→# Add legacy kwargs"""DEPRECATED: User register_converter instead."""→Use register_converterPRIORITY_SPECIFIC_FILE_FORMAT (== 10)→PRIORITY_GENERIC_FILE_FORMAT (== 10)inregister_converterdocstring (was referencing the wrong constant)"Plugins converters are already enabled."→"Plugin converters are already enabled."packages/markitdown/src/markitdown/__main__.py—(e.g, UTF-8)→(e.g., UTF-8)in--charsethelppackages/markitdown/src/markitdown/_exceptions.py—"Represents an a single attempt"→"Represents a single attempt"packages/markitdown/src/markitdown/converters/_docx_converter.py,_epub_converter.py—(e.g.m headings)→(e.g., headings)packages/markitdown/src/markitdown/converters/_epub_converter.py— stray closing"""inside a#comment removedpackages/markitdown/src/markitdown/converters/_outlook_msg_converter.py—# Brue force→# Brute forcepackages/markitdown/src/markitdown/converters/_markdownify.py—Javascript→JavaScriptin docstringpackages/markitdown/src/markitdown/converters/_bing_serp_converter.py— stray"afterBase64URLremovedpackages/markitdown/src/markitdown/converters/_doc_intel_converter.py—availiable→availablein_analysis_featuresdocstringpackages/markitdown-sample-plugin/src/markitdown_sample_plugin/_plugin.py"""Converts an RTF file to in the simplest possible way."""→"""Converts an RTF file in the simplest possible way."""# Read the file stream into an str using hte provided charset→into a str using the provided charsetTest files
packages/markitdown-sample-plugin/tests/test_sample_plugin.py—Tests the RTF converter dirctly→directlypackages/markitdown/tests/test_cli_vectors.py—Test that the CLI readds from stdin correctly→readspackages/markitdown/tests/test_module_misc.py—# Make sure the targted attribute→targeted(×2)Markdown formatting
README.md—Youtube URLs→YouTube URLs(consistent withYouTube video transcriptionelsewhere in the file)packages/markitdown-mcp/README.mdpackages/markitdown-sample-plugin/README.mdNext, implement your custom DocumentConverter:→First, implement...(there is no prior step for "Next" to follow from — the following two blocks correctly say "Next" and "Finally")Deliberately not changed
SECURITY.md,SUPPORT.md,CODE_OF_CONDUCT.md— Microsoft boilerplate, left as-ispackages/markitdown/ThirdPartyNotices.md— contains a verbatim Apache-2.0 license copy, must not be modifiedpackages/markitdown/src/markitdown/converter_utils/docx/math/{latex_dict.py,omml.py}— vendored from dwml (Apache-2.0), kept verbatim per the noticetest_files/andocr_test_data/— expected outputs used for comparisonVerification