Skip to content

Commit fb324e2

Browse files
committed
correct duplicate finding of references
1 parent 5ef3a25 commit fb324e2

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

robotcode/language_server/robotframework/parts/references.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ def _find_method(self, cls: Type[Any]) -> Optional[_ReferencesMethod]:
8383
return None
8484

8585
@language_id("robotframework")
86+
@_logger.call
8687
async def collect(
8788
self, sender: Any, document: TextDocument, position: Position, context: ReferenceContext
8889
) -> Optional[List[Location]]:

robotcode/language_server/robotframework/utils/ast.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -238,8 +238,6 @@ def iter_over_keyword_names_and_owners(full_name: str) -> Iterator[Tuple[Optiona
238238
yield None, full_name
239239

240240
tokens = full_name.split(".")
241-
if len(tokens) == 1:
242-
yield None, tokens[0]
243-
else:
241+
if len(tokens) > 1:
244242
for i in range(1, len(tokens)):
245243
yield ".".join(tokens[:i]), ".".join(tokens[i:])

0 commit comments

Comments
 (0)