From 17d8e36ca52506d4c42c9978b2e066b5f9f9b919 Mon Sep 17 00:00:00 2001 From: Kian-Meng Ang Date: Wed, 30 Nov 2022 10:22:58 +0800 Subject: [PATCH 1/4] Fix typos Found via `codespell -S .mypy_cache -L ream,selfs,froms,devision,fo` and `typos --format brief`. --- README.rst | 2 +- docs/library.rst | 4 ++-- rope/base/arguments.py | 2 +- rope/base/worder.py | 6 +++--- rope/contrib/codeassist.py | 6 +++--- rope/contrib/fixsyntax.py | 4 ++-- rope/refactor/extract.py | 10 +++++----- rope/refactor/inline.py | 2 +- ropetest/codeanalyzetest.py | 24 ++++++++++++------------ ropetest/contrib/codeassisttest.py | 12 ++++++------ ropetest/historytest.py | 10 +++++----- ropetest/objectinfertest.py | 7 ++++--- ropetest/projecttest.py | 2 +- ropetest/pycoretest.py | 4 ++-- ropetest/refactor/__init__.py | 4 ++-- ropetest/refactor/extracttest.py | 8 ++++---- ropetest/refactor/movetest.py | 4 ++-- ropetest/refactor/renametest.py | 2 +- 18 files changed, 57 insertions(+), 56 deletions(-) diff --git a/README.rst b/README.rst index bc20b33fe..c0fc8e1e6 100644 --- a/README.rst +++ b/README.rst @@ -42,7 +42,7 @@ releases. Getting Started =============== -* `Documentatation `_ +* `Documentation `_ * `How to use Rope in my IDE or Text editor? `_ * `Configuration `_ * `List of features `_ diff --git a/docs/library.rst b/docs/library.rst index a8b602806..1d1b13c7d 100644 --- a/docs/library.rst +++ b/docs/library.rst @@ -711,7 +711,7 @@ The ``get_changes()`` method of refactoring classes return a calling ``Project.do()``. But as explained above some IDEs need to perform the changes themselves. -Every change to the file-system in rope is commited using an object that +Every change to the file-system in rope is committed using an object that provides a ``rope.base.fscommands.FileSystemCommands`` interface. As explained above in `rope.base.fscommands`_ section, rope uses this interface to handle different VCSs. @@ -897,7 +897,7 @@ an example consider that we want to perform a rename refactoring: projects) -Here ``projects`` is the list of dependant projects. It does not +Here ``projects`` is the list of dependent projects. It does not include the main project. The first argument is the refactoring class (such as ``Rename``) or factory function (like ``create_move``). diff --git a/rope/base/arguments.py b/rope/base/arguments.py index 58583e763..12a626816 100644 --- a/rope/base/arguments.py +++ b/rope/base/arguments.py @@ -74,7 +74,7 @@ def get_instance_pyname(self): class MixedArguments: def __init__(self, pyname, arguments, scope): - """`argumens` is an instance of `Arguments`""" + """`arguments` is an instance of `Arguments`""" self.pyname = pyname self.args = arguments diff --git a/rope/base/worder.py b/rope/base/worder.py index 94089b5a8..19df58bc7 100644 --- a/rope/base/worder.py +++ b/rope/base/worder.py @@ -55,8 +55,8 @@ def get_word_at(self, offset): def get_primary_range(self, offset): return self._context_call("get_primary_range", offset) - def get_splitted_primary_before(self, offset): - return self._context_call("get_splitted_primary_before", offset) + def get_split_primary_before(self, offset): + return self._context_call("get_split_primary_before", offset) def get_word_range(self, offset): return self._context_call("get_word_range", offset) @@ -250,7 +250,7 @@ def get_primary_at(self, offset): start, end = self.get_primary_range(offset) return self.raw[start:end].strip() - def get_splitted_primary_before(self, offset): + def get_split_primary_before(self, offset): """returns expression, starting, starting_offset This function is used in `rope.codeassist.assist` function. diff --git a/rope/contrib/codeassist.py b/rope/contrib/codeassist.py index 334c78c4a..461880aab 100644 --- a/rope/contrib/codeassist.py +++ b/rope/contrib/codeassist.py @@ -66,7 +66,7 @@ def starting_offset(source_code, offset): """ word_finder = worder.Worder(source_code, True) - expression, starting, starting_offset = word_finder.get_splitted_primary_before( + expression, starting, starting_offset = word_finder.get_split_primary_before( offset ) return starting_offset @@ -361,7 +361,7 @@ def sorted_proposals(proposals, scopepref=None, typepref=None): def starting_expression(source_code, offset): """Return the expression to complete""" word_finder = worder.Worder(source_code, True) - expression, starting, starting_offset = word_finder.get_splitted_primary_before( + expression, starting, starting_offset = word_finder.get_split_primary_before( offset ) if expression: @@ -390,7 +390,7 @@ def __init__( self.expression, self.starting, self.offset, - ) = self.word_finder.get_splitted_primary_before(offset) + ) = self.word_finder.get_split_primary_before(offset) keywords = keyword.kwlist diff --git a/rope/contrib/fixsyntax.py b/rope/contrib/fixsyntax.py index aca48433c..b1e96935e 100644 --- a/rope/contrib/fixsyntax.py +++ b/rope/contrib/fixsyntax.py @@ -62,7 +62,7 @@ def old_pyname(): new_code = pymodule.source_code def new_pyname(): - newoffset = self.commenter.transfered_offset(offset) + newoffset = self.commenter.transferred_offset(offset) return rope.base.evaluate.eval_location(pymodule, newoffset) if new_code.startswith(self.code[: offset + 1]): @@ -97,7 +97,7 @@ def comment(self, lineno): self._set(line, self.lines[start]) self._fix_incomplete_try_blocks(lineno, indents) - def transfered_offset(self, offset): + def transferred_offset(self, offset): lineno = self.code.count("\n", 0, offset) diff = sum(self.diffs[:lineno]) return offset + diff diff --git a/rope/refactor/extract.py b/rope/refactor/extract.py index 529ee71f7..dfa56a298 100644 --- a/rope/refactor/extract.py +++ b/rope/refactor/extract.py @@ -98,7 +98,7 @@ def _validate_kind_prefix(kind, selected_kind): @classmethod def _get_kind(cls, kind): - raise NotImplementedError(f"You have to sublass {cls}") + raise NotImplementedError(f"You have to subclass {cls}") class ExtractMethod(_ExtractRefactoring): @@ -222,13 +222,13 @@ def scope_indents(self): def extracted(self): return self.source[self.region[0] : self.region[1]] - _cached_parsed_extraced = None + _cached_parsed_extracted = None @property def _parsed_extracted(self): - if self._cached_parsed_extraced is None: - self._cached_parsed_extraced = _parse_text(self.extracted) - return self._cached_parsed_extraced + if self._cached_parsed_extracted is None: + self._cached_parsed_extracted = _parse_text(self.extracted) + return self._cached_parsed_extracted _returned = None diff --git a/rope/refactor/inline.py b/rope/refactor/inline.py index 1644bb2c0..f7fbe3bfe 100644 --- a/rope/refactor/inline.py +++ b/rope/refactor/inline.py @@ -403,7 +403,7 @@ def _get_definition_params(self): or definition_info.keywords_arg is not None ): raise rope.base.exceptions.RefactoringError( - "Cannot inline functions with list and keyword arguements." + "Cannot inline functions with list and keyword arguments." ) if self.pyfunction.get_kind() == "classmethod": paramdict[ diff --git a/ropetest/codeanalyzetest.py b/ropetest/codeanalyzetest.py index 435192fb0..05b976d02 100644 --- a/ropetest/codeanalyzetest.py +++ b/ropetest/codeanalyzetest.py @@ -219,33 +219,33 @@ def test_functions_on_ending_parens(self): code = "A()" self.assertEqual("A()", self._find_primary(code, 2)) - def test_splitted_statement(self): + def test_split_statement(self): word_finder = worder.Worder("an_object.an_attr") self.assertEqual( - ("an_object", "an_at", 10), word_finder.get_splitted_primary_before(15) + ("an_object", "an_at", 10), word_finder.get_split_primary_before(15) ) - def test_empty_splitted_statement(self): + def test_empty_split_statement(self): word_finder = worder.Worder("an_attr") - self.assertEqual(("", "an_at", 0), word_finder.get_splitted_primary_before(5)) + self.assertEqual(("", "an_at", 0), word_finder.get_split_primary_before(5)) - def test_empty_splitted_statement2(self): + def test_empty_split_statement2(self): word_finder = worder.Worder("an_object.") self.assertEqual( - ("an_object", "", 10), word_finder.get_splitted_primary_before(10) + ("an_object", "", 10), word_finder.get_split_primary_before(10) ) - def test_empty_splitted_statement3(self): + def test_empty_split_statement3(self): word_finder = worder.Worder("") - self.assertEqual(("", "", 0), word_finder.get_splitted_primary_before(0)) + self.assertEqual(("", "", 0), word_finder.get_split_primary_before(0)) - def test_empty_splitted_statement4(self): + def test_empty_split_statement4(self): word_finder = worder.Worder("a_var = ") - self.assertEqual(("", "", 8), word_finder.get_splitted_primary_before(8)) + self.assertEqual(("", "", 8), word_finder.get_split_primary_before(8)) - def test_empty_splitted_statement5(self): + def test_empty_split_statement5(self): word_finder = worder.Worder("a.") - self.assertEqual(("a", "", 2), word_finder.get_splitted_primary_before(2)) + self.assertEqual(("a", "", 2), word_finder.get_split_primary_before(2)) def test_operators_inside_parens(self): code = "(a_var + another_var).reverse()" diff --git a/ropetest/contrib/codeassisttest.py b/ropetest/contrib/codeassisttest.py index 7d07bc2a0..f1eaf3e7b 100644 --- a/ropetest/contrib/codeassisttest.py +++ b/ropetest/contrib/codeassisttest.py @@ -835,7 +835,7 @@ def test_proposing_variables_defined_till_the_end_of_scope(self): result = self._assist(code, code.index("a_v") + 3) self.assert_completion_in_result("a_var", "global", result) - def test_completing_in_uncomplete_try_blocks(self): + def test_completing_in_incomplete_try_blocks(self): code = dedent("""\ try: a_var = 10 @@ -843,7 +843,7 @@ def test_completing_in_uncomplete_try_blocks(self): result = self._assist(code) self.assert_completion_in_result("a_var", "global", result) - def test_completing_in_uncomplete_try_blocks_in_functions(self): + def test_completing_in_incomplete_try_blocks_in_functions(self): code = dedent("""\ def a_func(): try: @@ -895,7 +895,7 @@ def test_already_complete_try_blocks_with_except2(self): result = self._assist(code, code.rindex("a_") + 2) self.assert_completion_in_result("a_var", "global", result) - def test_completing_ifs_in_uncomplete_try_blocks(self): + def test_completing_ifs_in_incomplete_try_blocks(self): code = dedent("""\ try: if True: @@ -904,7 +904,7 @@ def test_completing_ifs_in_uncomplete_try_blocks(self): result = self._assist(code) self.assert_completion_in_result("a_var", "global", result) - def test_completing_ifs_in_uncomplete_try_blocks2(self): + def test_completing_ifs_in_incomplete_try_blocks2(self): code = dedent("""\ try: if True: @@ -913,7 +913,7 @@ def test_completing_ifs_in_uncomplete_try_blocks2(self): result = self._assist(code) self.assert_completion_in_result("a_var", "global", result) - def test_completing_excepts_in_uncomplete_try_blocks(self): + def test_completing_excepts_in_incomplete_try_blocks(self): code = dedent("""\ try: pass @@ -1415,7 +1415,7 @@ def test_from_import_star2(self): self.assert_completion_in_result("sample_func", "imported", result) self.assert_completion_in_result("sample_var", "imported", result) - def test_from_import_star_not_imporing_underlined(self): + def test_from_import_star_not_importing_underlined(self): code = dedent("""\ from samplemod import * _under""") diff --git a/ropetest/historytest.py b/ropetest/historytest.py index ba6220428..0f39fa94f 100644 --- a/ropetest/historytest.py +++ b/ropetest/historytest.py @@ -133,14 +133,14 @@ def test_dropping_undone_changes(self): self.history.undo(drop=True) self.history.redo() - def test_undoing_choosen_changes(self): + def test_undoing_chosen_changes(self): change = rope.base.change.ChangeContents(self.file1, "1") self.history.do(change) self.history.undo(change) self.assertEqual("", self.file1.read()) self.assertFalse(self.history.undo_list) - def test_undoing_choosen_changes2(self): + def test_undoing_chosen_changes2(self): change1 = rope.base.change.ChangeContents(self.file1, "1") self.history.do(change1) self.history.do(rope.base.change.ChangeContents(self.file1, "2")) @@ -148,7 +148,7 @@ def test_undoing_choosen_changes2(self): self.assertEqual("", self.file1.read()) self.assertFalse(self.history.undo_list) - def test_undoing_choosen_changes_not_undoing_others(self): + def test_undoing_chosen_changes_not_undoing_others(self): change1 = rope.base.change.ChangeContents(self.file1, "1") self.history.do(change1) self.history.do(rope.base.change.ChangeContents(self.file2, "2")) @@ -226,7 +226,7 @@ def test_get_file_undo_list_for_moves(self): self.assertEqual({change}, set(self.history.get_file_undo_list(self.file1))) # XXX: What happens for moves before the file is created? - def xxx_test_get_file_undo_list_and_moving_its_contining_folder(self): + def xxx_test_get_file_undo_list_and_moving_its_containing_folder(self): folder = self.project.root.create_folder("folder") old_file = folder.create_file("file3.txt") change1 = rope.base.change.MoveResource(folder, "new_folder") @@ -256,7 +256,7 @@ def test_clearing_up_the_history(self): self.assertEqual(0, len(self.history.undo_list)) self.assertEqual(0, len(self.history.redo_list)) - def test_redoing_choosen_changes_not_undoing_others(self): + def test_redoing_chosen_changes_not_undoing_others(self): change1 = rope.base.change.ChangeContents(self.file1, "1") change2 = rope.base.change.ChangeContents(self.file2, "2") self.history.do(change1) diff --git a/ropetest/objectinfertest.py b/ropetest/objectinfertest.py index 578647243..2a37da03c 100644 --- a/ropetest/objectinfertest.py +++ b/ropetest/objectinfertest.py @@ -398,11 +398,12 @@ class C2(object): self.assertEqual(c1_class, a_var.get_type()) self.assertEqual(c2_class, b_var.get_type()) - def test_we_know_the_type_of_catched_exceptions(self): + def test_we_know_the_type_of_caught_exceptions(self): code = dedent("""\ class MyError(Exception): pass - try: + try::w + raise MyError() except MyError as e: pass @@ -412,7 +413,7 @@ class MyError(Exception): e_var = mod["e"].get_object() self.assertEqual(my_error, e_var.get_type()) - def test_we_know_the_type_of_catched_multiple_excepts(self): + def test_we_know_the_type_of_caught_multiple_excepts(self): code = dedent("""\ class MyError(Exception): pass diff --git a/ropetest/projecttest.py b/ropetest/projecttest.py index 8bf8b8e25..1a66bfd3d 100644 --- a/ropetest/projecttest.py +++ b/ropetest/projecttest.py @@ -833,7 +833,7 @@ def test_validating_get_files_list(self): self.project.validate() self.assertEqual(1, len(self.project.get_files())) - def test_clear_observered_resources_for_filtered_observers(self): + def test_clear_observed_resources_for_filtered_observers(self): sample_file = self.project.root.create_file("myfile.txt") sample_observer = _SampleObserver() filtered = FilteredResourceObserver(sample_observer) diff --git a/ropetest/pycoretest.py b/ropetest/pycoretest.py index 417c762d3..4ae90c369 100644 --- a/ropetest/pycoretest.py +++ b/ropetest/pycoretest.py @@ -388,7 +388,7 @@ def test_get_pyname_definition_location_reassigning(self): a_var = mod["a_var"] self.assertEqual((mod, 1), a_var.get_definition_location()) - def test_get_pyname_definition_location_importes(self): + def test_get_pyname_definition_location_imported(self): testutils.create_module(self.project, "mod") code = "import mod\n" mod = libutils.get_string_module(self.project, code) @@ -838,7 +838,7 @@ class SampleClass(object): sample_class, mod.get_attributes()["SampleClass"].get_object() ) - def test_from_import_star_not_imporing_underlined(self): + def test_from_import_star_not_importing_underlined(self): code = "from samplemod import *" mod = libutils.get_string_module(self.project, code) self.assertTrue("_underlined_func" not in mod.get_attributes()) diff --git a/ropetest/refactor/__init__.py b/ropetest/refactor/__init__.py index 27f4ecd0f..be2387282 100644 --- a/ropetest/refactor/__init__.py +++ b/ropetest/refactor/__init__.py @@ -517,7 +517,7 @@ def create(*args, **kwds): self._introduce_factory(mod, mod.read().index("a_class") + 1, "create") self.assertEqual(expected, mod.read()) - def test_changing_occurrs_in_the_same_module_with_conflict_ranges(self): + def test_changing_occurs_in_the_same_module_with_conflict_ranges(self): mod = testutils.create_module(self.project, "mod") code = dedent("""\ class C(object): @@ -908,7 +908,7 @@ def a_func(self, var): self.mod, self.mod.read().index("var") + 1 ) - # NOTE: This situation happens alot and is normally not an error + # NOTE: This situation happens a lot and is normally not an error # @testutils.assert_raises(RefactoringError) def test_not_rais_exception_when_there_is_a_field_with_the_same_name(self): code = dedent("""\ diff --git a/ropetest/refactor/extracttest.py b/ropetest/refactor/extracttest.py index b63dca55b..5294e8ee4 100644 --- a/ropetest/refactor/extracttest.py +++ b/ropetest/refactor/extracttest.py @@ -457,7 +457,7 @@ def a_func(arg): with self.assertRaises(rope.base.exceptions.RefactoringError): self.do_extract_method(code, start, end, "new_func") - def test_extract_method_containing_uncomplete_lines(self): + def test_extract_method_containing_incomplete_lines(self): code = dedent("""\ a_var = 20 another_var = 30 @@ -467,7 +467,7 @@ def test_extract_method_containing_uncomplete_lines(self): with self.assertRaises(rope.base.exceptions.RefactoringError): self.do_extract_method(code, start, end, "new_func") - def test_extract_method_containing_uncomplete_lines2(self): + def test_extract_method_containing_incomplete_lines2(self): code = dedent("""\ a_var = 20 another_var = 30 @@ -477,7 +477,7 @@ def test_extract_method_containing_uncomplete_lines2(self): with self.assertRaises(rope.base.exceptions.RefactoringError): self.do_extract_method(code, start, end, "new_func") - def test_extract_function_and_argument_as_paramenter(self): + def test_extract_function_and_argument_as_parameter(self): code = dedent("""\ def a_func(arg): print(arg) @@ -1666,7 +1666,7 @@ def new_func(): """) self.assertEqual(expected, refactored) - def test_where_to_seach_when_extracting_global_names(self): + def test_where_to_search_when_extracting_global_names(self): code = dedent("""\ def a(): return 1 diff --git a/ropetest/refactor/movetest.py b/ropetest/refactor/movetest.py index 7ad997e7b..4c3b67add 100644 --- a/ropetest/refactor/movetest.py +++ b/ropetest/refactor/movetest.py @@ -315,7 +315,7 @@ class TestClass: self.project, self.mod1, code.index("CONSTANT") + 1 ) - def test_raising_exception_for_mov_glob_elemnts_to_the_same_module(self): + def test_raising_exception_for_moving_glob_elements_to_the_same_module(self): self.mod1.write("def a_func():\n pass\n") with self.assertRaises(exceptions.RefactoringError): self._move(self.mod1, self.mod1.read().index("a_func"), self.mod1) @@ -808,7 +808,7 @@ def new_method(self): mover.get_new_method("new_method"), ) - def test_moving_methods_getting_new_method_passing_simple_paremters(self): + def test_moving_methods_getting_new_method_passing_simple_parameters(self): code = dedent("""\ class A(object): def a_method(self, p): diff --git a/ropetest/refactor/renametest.py b/ropetest/refactor/renametest.py index 237ee265e..6dc04a165 100644 --- a/ropetest/refactor/renametest.py +++ b/ropetest/refactor/renametest.py @@ -272,7 +272,7 @@ def __init__(self, new_param): """) self.assertEqual(expected, refactored) - def test_rename_functions_parameters_and_occurences_in_other_modules(self): + def test_rename_functions_parameters_and_occurrences_in_other_modules(self): mod1 = testutils.create_module(self.project, "mod1") mod2 = testutils.create_module(self.project, "mod2") mod1.write(dedent("""\ From 093094c1a74f4c0b266db6fbfedd732232eff106 Mon Sep 17 00:00:00 2001 From: Lie Ryan Date: Wed, 30 Nov 2022 16:53:31 +1100 Subject: [PATCH 2/4] Apply suggestions from code review Revert split -> splitted --- rope/base/worder.py | 6 +++--- rope/contrib/codeassist.py | 6 +++--- ropetest/codeanalyzetest.py | 12 ++++++------ 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/rope/base/worder.py b/rope/base/worder.py index 19df58bc7..94089b5a8 100644 --- a/rope/base/worder.py +++ b/rope/base/worder.py @@ -55,8 +55,8 @@ def get_word_at(self, offset): def get_primary_range(self, offset): return self._context_call("get_primary_range", offset) - def get_split_primary_before(self, offset): - return self._context_call("get_split_primary_before", offset) + def get_splitted_primary_before(self, offset): + return self._context_call("get_splitted_primary_before", offset) def get_word_range(self, offset): return self._context_call("get_word_range", offset) @@ -250,7 +250,7 @@ def get_primary_at(self, offset): start, end = self.get_primary_range(offset) return self.raw[start:end].strip() - def get_split_primary_before(self, offset): + def get_splitted_primary_before(self, offset): """returns expression, starting, starting_offset This function is used in `rope.codeassist.assist` function. diff --git a/rope/contrib/codeassist.py b/rope/contrib/codeassist.py index 461880aab..334c78c4a 100644 --- a/rope/contrib/codeassist.py +++ b/rope/contrib/codeassist.py @@ -66,7 +66,7 @@ def starting_offset(source_code, offset): """ word_finder = worder.Worder(source_code, True) - expression, starting, starting_offset = word_finder.get_split_primary_before( + expression, starting, starting_offset = word_finder.get_splitted_primary_before( offset ) return starting_offset @@ -361,7 +361,7 @@ def sorted_proposals(proposals, scopepref=None, typepref=None): def starting_expression(source_code, offset): """Return the expression to complete""" word_finder = worder.Worder(source_code, True) - expression, starting, starting_offset = word_finder.get_split_primary_before( + expression, starting, starting_offset = word_finder.get_splitted_primary_before( offset ) if expression: @@ -390,7 +390,7 @@ def __init__( self.expression, self.starting, self.offset, - ) = self.word_finder.get_split_primary_before(offset) + ) = self.word_finder.get_splitted_primary_before(offset) keywords = keyword.kwlist diff --git a/ropetest/codeanalyzetest.py b/ropetest/codeanalyzetest.py index 05b976d02..a1c52c26a 100644 --- a/ropetest/codeanalyzetest.py +++ b/ropetest/codeanalyzetest.py @@ -222,30 +222,30 @@ def test_functions_on_ending_parens(self): def test_split_statement(self): word_finder = worder.Worder("an_object.an_attr") self.assertEqual( - ("an_object", "an_at", 10), word_finder.get_split_primary_before(15) + ("an_object", "an_at", 10), word_finder.get_splitted_primary_before(15) ) def test_empty_split_statement(self): word_finder = worder.Worder("an_attr") - self.assertEqual(("", "an_at", 0), word_finder.get_split_primary_before(5)) + self.assertEqual(("", "an_at", 0), word_finder.get_splitted_primary_before(5)) def test_empty_split_statement2(self): word_finder = worder.Worder("an_object.") self.assertEqual( - ("an_object", "", 10), word_finder.get_split_primary_before(10) + ("an_object", "", 10), word_finder.get_splitted_primary_before(10) ) def test_empty_split_statement3(self): word_finder = worder.Worder("") - self.assertEqual(("", "", 0), word_finder.get_split_primary_before(0)) + self.assertEqual(("", "", 0), word_finder.get_splitted_primary_before(0)) def test_empty_split_statement4(self): word_finder = worder.Worder("a_var = ") - self.assertEqual(("", "", 8), word_finder.get_split_primary_before(8)) + self.assertEqual(("", "", 8), word_finder.get_splitted_primary_before(8)) def test_empty_split_statement5(self): word_finder = worder.Worder("a.") - self.assertEqual(("a", "", 2), word_finder.get_split_primary_before(2)) + self.assertEqual(("a", "", 2), word_finder.get_splitted_primary_before(2)) def test_operators_inside_parens(self): code = "(a_var + another_var).reverse()" From fc3f138ec7ba1b56e810564313d1816433134eb9 Mon Sep 17 00:00:00 2001 From: Lie Ryan Date: Wed, 30 Nov 2022 16:58:46 +1100 Subject: [PATCH 3/4] Remove stray `:w` --- ropetest/objectinfertest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ropetest/objectinfertest.py b/ropetest/objectinfertest.py index 2a37da03c..4a3ae9cde 100644 --- a/ropetest/objectinfertest.py +++ b/ropetest/objectinfertest.py @@ -402,7 +402,7 @@ def test_we_know_the_type_of_caught_exceptions(self): code = dedent("""\ class MyError(Exception): pass - try::w + try: raise MyError() except MyError as e: From c7c522e275f458642ca146f90ae349b2d562cf2f Mon Sep 17 00:00:00 2001 From: Lie Ryan Date: Wed, 30 Nov 2022 16:59:07 +1100 Subject: [PATCH 4/4] Fix typo in test name rais->raise --- ropetest/refactor/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ropetest/refactor/__init__.py b/ropetest/refactor/__init__.py index be2387282..17656f7b7 100644 --- a/ropetest/refactor/__init__.py +++ b/ropetest/refactor/__init__.py @@ -910,7 +910,7 @@ def a_func(self, var): # NOTE: This situation happens a lot and is normally not an error # @testutils.assert_raises(RefactoringError) - def test_not_rais_exception_when_there_is_a_field_with_the_same_name(self): + def test_not_raise_exception_when_there_is_a_field_with_the_same_name(self): code = dedent("""\ class A(object): def __init__(self):