Skip to content

Commit

Permalink
Update examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Moosems committed Sep 8, 2024
1 parent c44639a commit 0746f62
Show file tree
Hide file tree
Showing 11 changed files with 9 additions and 87 deletions.
2 changes: 1 addition & 1 deletion docs/source/example-usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Now that you have ``Salve`` installed, let's try running a simple example that p
sleep(1)
# If there is no response we give None instead of raising an Exception
output: Response | None = context.get_response(HIGHLIGHT)
output: Response | None = context.get_response(HIGHLIGHT) # type: ignore
print(output)
# Finally, if you are done with the IPC before the rest of the program, you can
Expand Down
43 changes: 0 additions & 43 deletions docs/source/examples/highlight_logging_example.rst

This file was deleted.

2 changes: 1 addition & 1 deletion examples/example_usage.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def main():

# Check output
# context.cancel_request("autocomplete") # Uncommenting this line will cause the request to always be cancelled
output: Response | None = context.get_response(AUTOCOMPLETE)
output: Response | None = context.get_response(AUTOCOMPLETE) # type: ignore
if not output:
continue

Expand Down
2 changes: 1 addition & 1 deletion examples/gui_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def create_request(_) -> None:
label.pack()

def loop() -> None:
output: Response | None = context.get_response(AUTOCOMPLETE)
output: Response | None = context.get_response(AUTOCOMPLETE) # type: ignore
data: list[str] = [""]
if output is not None:
data: list[str] = output["result"] # type: ignore
Expand Down
35 changes: 0 additions & 35 deletions examples/highlight_logging_example.py

This file was deleted.

2 changes: 1 addition & 1 deletion examples/simple_autocomplete_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def main():

sleep(1)

output: Response | None = context.get_response(AUTOCOMPLETE)
output: Response | None = context.get_response(AUTOCOMPLETE) # type: ignore
print(output)
context.kill_IPC()

Expand Down
2 changes: 1 addition & 1 deletion examples/simple_definitions_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def main():
)

sleep(1)
output: Response | None = context.get_response(DEFINITION)
output: Response | None = context.get_response(DEFINITION) # type: ignore
print(output)
context.kill_IPC()

Expand Down
2 changes: 1 addition & 1 deletion examples/simple_editorconfig_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def main():
context.request(EDITORCONFIG, file_path=__file__)

sleep(1)
output: Response | None = context.get_response(EDITORCONFIG)
output: Response | None = context.get_response(EDITORCONFIG) # type: ignore
print(output)
context.kill_IPC()

Expand Down
2 changes: 1 addition & 1 deletion examples/simple_highlight_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def main():
)

sleep(1)
output: Response | None = context.get_response(HIGHLIGHT)
output: Response | None = context.get_response(HIGHLIGHT) # type: ignore
print(output)
context.kill_IPC()

Expand Down
2 changes: 1 addition & 1 deletion examples/simple_links_and_hidden_chars_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def main():
context.request(LINKS_AND_CHARS, file="test", text_range=(1, 30))

sleep(1)
output: Response | None = context.get_response(LINKS_AND_CHARS)
output: Response | None = context.get_response(LINKS_AND_CHARS) # type: ignore
print(output)
context.kill_IPC()

Expand Down
2 changes: 1 addition & 1 deletion examples/simple_replacements_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def main():
)

sleep(1)
output: Response | None = context.get_response(REPLACEMENTS)
output: Response | None = context.get_response(REPLACEMENTS) # type: ignore
print(output)
context.kill_IPC()

Expand Down

0 comments on commit 0746f62

Please sign in to comment.