From 76ed2bb9c501b8712d85c2651012a51181d992d4 Mon Sep 17 00:00:00 2001 From: hanjinpeng Date: Sun, 13 Sep 2026 21:43:17 -0400 Subject: [PATCH] Fix spelling mistakes in docstrings and tests - ini.py: 'Compatiable' -> 'Compatible', 'conveninet' -> 'convenient' - utils.py: 'This functions makes' -> 'This function makes' - test_compat.py: 'existance' -> 'existence', 'nonexistant' -> 'nonexistent' - test_misc.py: rename test_dyanamic() to test_dynamic() --- iniparse/ini.py | 4 ++-- iniparse/utils.py | 2 +- tests/test_compat.py | 8 ++++---- tests/test_misc.py | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/iniparse/ini.py b/iniparse/ini.py index 548c794..d7feadc 100644 --- a/iniparse/ini.py +++ b/iniparse/ini.py @@ -1,9 +1,9 @@ """Access and/or modify INI files -* Compatiable with ConfigParser +* Compatible with ConfigParser * Preserves order of sections & options * Preserves comments/blank lines/etc -* More conveninet access to data +* More convenient access to data Example: diff --git a/iniparse/utils.py b/iniparse/utils.py index b3cc59e..cee88ba 100644 --- a/iniparse/utils.py +++ b/iniparse/utils.py @@ -10,7 +10,7 @@ def tidy(cfg: compat.RawConfigParser): """Clean up blank lines. - This functions makes the configuration look clean and + This function makes the configuration look clean and handwritten - consecutive empty lines and empty lines at the start of the file are removed, and one is guaranteed to be at the end of the file. diff --git a/tests/test_compat.py b/tests/test_compat.py index 611e743..b672857 100644 --- a/tests/test_compat.py +++ b/tests/test_compat.py @@ -137,11 +137,11 @@ def test_basic(self): # Make sure the right things happen for remove_option(); # added to include check for SourceForge bug #123324: self.assertTrue(cf.remove_option('Foo Bar', 'foo'), - "remove_option() failed to report existance of option") + "remove_option() failed to report existence of option") self.assertFalse(cf.has_option('Foo Bar', 'foo'), "remove_option() failed to remove option") self.assertFalse(cf.remove_option('Foo Bar', 'foo'), - "remove_option() failed to report non-existance of option" + "remove_option() failed to report non-existence of option" " that was removed") self.assertRaises(ConfigParser.NoSectionError, @@ -471,7 +471,7 @@ def test_read_returns_file_list(self): file1 = test_support.findfile("configdata/cfgparser.1") # check when we pass a mix of readable and non-readable files: cf = self.newconfig() - parsed_files = cf.read([file1, "nonexistant-file"]) + parsed_files = cf.read([file1, "nonexistent-file"]) self.assertEqual(parsed_files, [file1]) self.assertEqual(cf.get("Foo Bar", "foo"), "newbar") # check when we pass only a filename: @@ -481,7 +481,7 @@ def test_read_returns_file_list(self): self.assertEqual(cf.get("Foo Bar", "foo"), "newbar") # check when we pass only missing files: cf = self.newconfig() - parsed_files = cf.read(["nonexistant-file"]) + parsed_files = cf.read(["nonexistent-file"]) self.assertEqual(parsed_files, []) # check when we pass no files: cf = self.newconfig() diff --git a/tests/test_misc.py b/tests/test_misc.py index b54af40..98dba10 100644 --- a/tests/test_misc.py +++ b/tests/test_misc.py @@ -77,7 +77,7 @@ def test_assignment(self): self.assertEqual(c.get('foo', 'bar'), 'a') self.assertEqual(c.get('foo', 'Bar'), 'b') - def test_dyanamic(self): + def test_dynamic(self): """ :id: 30b18b29-2e11-43e1-9615-2739021c4910 :title: Dynamically changing optionxform affects key resolution