Skip to content

Commit 47226f6

Browse files
committed
correct _logger.call decorators
1 parent 693a876 commit 47226f6

File tree

9 files changed

+16
-15
lines changed

9 files changed

+16
-15
lines changed

robotcode/language_server/common/parts/diagnostics.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ async def start_publish_diagnostics_task(self, document: TextDocument) -> None:
215215
self._delete_entry,
216216
)
217217

218-
@_logger.call(entering=True, exiting=True, exception=True)
218+
@_logger.call
219219
async def publish_diagnostics(self, document_uri: DocumentUri, cancelation_token: CancelationToken) -> None:
220220
document = await self.parent.documents.get(document_uri)
221221
if document is None:

robotcode/language_server/common/text_document.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ async def get_cache(
207207

208208
return cast("_T", e.data)
209209

210-
@_logger.call(entering=True, exiting=True, exception=True)
210+
@_logger.call
211211
async def remove_cache_entry(
212212
self, entry: Union[Callable[[TextDocument], Awaitable[_T]], Callable[..., Awaitable[_T]]]
213213
) -> None:

robotcode/language_server/robotframework/parts/completion.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ async def get_section_style(self, document: TextDocument) -> str:
9999
# @all_commit_characters(['\n'])
100100
@language_id("robotframework")
101101
@threaded()
102-
@_logger.call(entering=True, exiting=True, exception=True)
102+
@_logger.call
103103
async def collect(
104104
self, sender: Any, document: TextDocument, position: Position, context: Optional[CompletionContext]
105105
) -> Union[List[CompletionItem], CompletionList, None]:
@@ -117,6 +117,7 @@ async def collect(
117117

118118
@language_id("robotframework")
119119
@threaded()
120+
@_logger.call
120121
async def resolve(self, sender: Any, completion_item: CompletionItem) -> CompletionItem:
121122

122123
if completion_item.data is not None:

robotcode/language_server/robotframework/parts/diagnostics.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def _create_error_from_token(self, token: Token, source: Optional[str] = None) -
7070
)
7171

7272
@language_id("robotframework")
73-
@_logger.call(entering=True, exiting=True, exception=True)
73+
@_logger.call
7474
async def collect_token_errors(
7575
self, sender: Any, document: TextDocument, cancelation_token: CancelationToken
7676
) -> DiagnosticsResult:
@@ -133,7 +133,7 @@ async def collect_token_errors(
133133

134134
@language_id("robotframework")
135135
@threaded()
136-
@_logger.call(entering=True, exiting=True, exception=True)
136+
@_logger.call
137137
async def collect_walk_model_errors(
138138
self, sender: Any, document: TextDocument, cancelation_token: CancelationToken
139139
) -> DiagnosticsResult:

robotcode/language_server/robotframework/parts/document_symbols.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def __init__(self, parent: RobotLanguageServerProtocol) -> None:
2727

2828
@language_id("robotframework")
2929
@threaded()
30-
@_logger.call(entering=True, exiting=True, exception=True)
30+
@_logger.call
3131
async def collect(
3232
self, sender: Any, document: TextDocument
3333
) -> Optional[Union[List[DocumentSymbol], List[SymbolInformation], None]]:

robotcode/language_server/robotframework/parts/folding_range.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def __init__(self, parent: RobotLanguageServerProtocol) -> None:
2525

2626
@language_id("robotframework")
2727
@threaded()
28-
@_logger.call(entering=True, exiting=True, exception=True)
28+
@_logger.call
2929
async def collect(self, sender: Any, document: TextDocument) -> Optional[List[FoldingRange]]:
3030

3131
from ..utils.async_ast import AsyncVisitor

robotcode/language_server/robotframework/parts/robocop_diagnostics.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ async def get_config(self, document: TextDocument) -> Optional[RoboCopConfig]:
4646

4747
@language_id("robotframework")
4848
@threaded()
49-
@_logger.call(entering=True, exiting=True, exception=True)
49+
@_logger.call
5050
async def collect_diagnostics(
5151
self, sender: Any, document: TextDocument, cancelation_token: CancelationToken
5252
) -> DiagnosticsResult:
@@ -63,7 +63,7 @@ async def collect_diagnostics(
6363

6464
return DiagnosticsResult(self.collect_diagnostics, [])
6565

66-
@_logger.call(entering=True, exiting=True, exception=True)
66+
@_logger.call
6767
async def collect(
6868
self,
6969
document: TextDocument,

robotcode/language_server/robotframework/parts/semantic_tokens.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,7 @@ async def generate_run_kw_if() -> AsyncGenerator[Tuple[Token, ast.AST], None]:
578578
for a in arguments:
579579
yield a, node
580580

581-
@_logger.call(entering=True, exiting=True, exception=True)
581+
@_logger.call
582582
async def collect(
583583
self,
584584
model: ast.AST,
@@ -672,7 +672,7 @@ async def get_tokens() -> AsyncGenerator[Tuple[Token, ast.AST], None]:
672672

673673
return SemanticTokens(data=data)
674674

675-
@_logger.call(entering=True, exiting=True, exception=True)
675+
@_logger.call
676676
async def collect_threading(
677677
self, document: TextDocument, range: Optional[Range]
678678
) -> Union[SemanticTokens, SemanticTokensPartialResult, None]:
@@ -702,23 +702,23 @@ async def collect_threading(
702702

703703
@language_id("robotframework")
704704
@threaded()
705-
@_logger.call(entering=True, exiting=True, exception=True)
705+
@_logger.call
706706
async def collect_full(
707707
self, sender: Any, document: TextDocument, **kwargs: Any
708708
) -> Union[SemanticTokens, SemanticTokensPartialResult, None]:
709709
return await self.collect_threading(document, None)
710710

711711
@language_id("robotframework")
712712
@threaded()
713-
@_logger.call(entering=True, exiting=True, exception=True)
713+
@_logger.call
714714
async def collect_range(
715715
self, sender: Any, document: TextDocument, range: Range, **kwargs: Any
716716
) -> Union[SemanticTokens, SemanticTokensPartialResult, None]:
717717
return await self.collect_threading(document, range)
718718

719719
@language_id("robotframework")
720720
@threaded()
721-
@_logger.call(entering=True, exiting=True, exception=True)
721+
@_logger.call
722722
async def collect_full_delta(
723723
self, sender: Any, document: TextDocument, previous_result_id: str, **kwargs: Any
724724
) -> Union[SemanticTokens, SemanticTokensDelta, SemanticTokensDeltaPartialResult, None]:

robotcode/language_server/robotframework/parts/signature_help.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def _find_method(self, cls: Type[Any]) -> Optional[_SignatureHelpMethod]:
7474
@threaded()
7575
@trigger_characters([" ", "\t"])
7676
@retrigger_characters([" ", "\t"])
77-
@_logger.call(entering=True, exiting=True, exception=True)
77+
@_logger.call
7878
async def collect(
7979
self, sender: Any, document: TextDocument, position: Position, context: Optional[SignatureHelpContext] = None
8080
) -> Optional[SignatureHelp]:

0 commit comments

Comments
 (0)