From 94ec4b873a458ccfffe631e0d49f2c233960fda2 Mon Sep 17 00:00:00 2001 From: HairlessVillager <64526732+HairlessVillager@users.noreply.github.com> Date: Thu, 28 Dec 2023 13:26:12 +0800 Subject: [PATCH] Fix some misalignment of docstrings --- jedi/api/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jedi/api/__init__.py b/jedi/api/__init__.py index 9620ea719..aa4ffa8af 100644 --- a/jedi/api/__init__.py +++ b/jedi/api/__init__.py @@ -216,7 +216,6 @@ def complete(self, line=None, column=None, *, fuzzy=False): @validate_line_column def infer(self, line=None, column=None, *, only_stubs=False, prefer_stubs=False): - self._inference_state.reset_recursion_limitations() """ Return the definitions of under the cursor. It is basically a wrapper around Jedi's type inference. @@ -232,6 +231,7 @@ def infer(self, line=None, column=None, *, only_stubs=False, prefer_stubs=False) :param prefer_stubs: Prefer stubs to Python objects for this method. :rtype: list of :class:`.Name` """ + self._inference_state.reset_recursion_limitations() pos = line, column leaf = self._module_node.get_name_of_position(pos) if leaf is None: @@ -262,7 +262,6 @@ def infer(self, line=None, column=None, *, only_stubs=False, prefer_stubs=False) @validate_line_column def goto(self, line=None, column=None, *, follow_imports=False, follow_builtin_imports=False, only_stubs=False, prefer_stubs=False): - self._inference_state.reset_recursion_limitations() """ Goes to the name that defined the object under the cursor. Optionally you can follow imports. @@ -276,6 +275,7 @@ def goto(self, line=None, column=None, *, follow_imports=False, follow_builtin_i :param prefer_stubs: Prefer stubs to Python objects for this method. :rtype: list of :class:`.Name` """ + self._inference_state.reset_recursion_limitations() tree_name = self._module_node.get_name_of_position((line, column)) if tree_name is None: # Without a name we really just want to jump to the result e.g.