diff --git a/packages/markitdown-sample-plugin/src/markitdown_sample_plugin/_plugin.py b/packages/markitdown-sample-plugin/src/markitdown_sample_plugin/_plugin.py index 1ca00ccc5..b21068cf7 100644 --- a/packages/markitdown-sample-plugin/src/markitdown_sample_plugin/_plugin.py +++ b/packages/markitdown-sample-plugin/src/markitdown_sample_plugin/_plugin.py @@ -60,7 +60,7 @@ def convert( stream_info: StreamInfo, **kwargs: Any, ) -> DocumentConverterResult: - # Read the file stream into an str using hte provided charset encoding, or using the system default + # Read the file stream into an str using the provided charset encoding, or using the system default encoding = stream_info.charset or locale.getpreferredencoding() stream_data = file_stream.read().decode(encoding) diff --git a/packages/markitdown-sample-plugin/tests/test_sample_plugin.py b/packages/markitdown-sample-plugin/tests/test_sample_plugin.py index 696824742..0ffaa663f 100644 --- a/packages/markitdown-sample-plugin/tests/test_sample_plugin.py +++ b/packages/markitdown-sample-plugin/tests/test_sample_plugin.py @@ -13,7 +13,7 @@ def test_converter() -> None: - """Tests the RTF converter dirctly.""" + """Tests the RTF converter directly.""" with open(os.path.join(TEST_FILES_DIR, "test.rtf"), "rb") as file_stream: converter = RtfConverter() result = converter.convert( diff --git a/packages/markitdown/src/markitdown/converters/_doc_intel_converter.py b/packages/markitdown/src/markitdown/converters/_doc_intel_converter.py index fd843f231..ef60b2226 100644 --- a/packages/markitdown/src/markitdown/converters/_doc_intel_converter.py +++ b/packages/markitdown/src/markitdown/converters/_doc_intel_converter.py @@ -207,7 +207,7 @@ def accepts( def _analysis_features(self, stream_info: StreamInfo) -> List[str]: """ Helper needed to determine which analysis features to use. - Certain document analysis features are not availiable for + Certain document analysis features are not available for office filetypes (.xlsx, .pptx, .html, .docx) """ mimetype = (stream_info.mimetype or "").lower() diff --git a/packages/markitdown/tests/test_module_misc.py b/packages/markitdown/tests/test_module_misc.py index 8e3acc23d..75aa28b5e 100644 --- a/packages/markitdown/tests/test_module_misc.py +++ b/packages/markitdown/tests/test_module_misc.py @@ -126,7 +126,7 @@ def test_stream_info_operations() -> None: **{keyword: f"{keyword}.2"} ) - # Make sure the targted attribute is updated + # Make sure the targeted attribute is updated assert getattr(updated_stream_info, keyword) == f"{keyword}.2" # Make sure the other attributes are unchanged @@ -143,7 +143,7 @@ def test_stream_info_operations() -> None: StreamInfo(**{keyword: f"{keyword}.2"}) ) - # Make sure the targted attribute is updated + # Make sure the targeted attribute is updated assert getattr(updated_stream_info, keyword) == f"{keyword}.2" # Make sure the other attributes are unchanged